- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Non-existent crons running
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2005 09:26 PM
11-24-2005 09:26 PM
Non-existent crons running
We have two old K250 running 10.20. One is a backup to the other. Periodically we swap from one to the other, so that the backup becomes the live box for a few months, and vice versa.
As part of this swapover, we copy the crons from the live box to the backup box, and vice versa.
However, on this occasion, after the two boxes were restarted after swapping identities we forgot to stop the cron daemon before swapping the crons.
So basically, the server that is now the backup box, appears to be running it's old cron jobs, even though they are no longer in the /usr/spool/cron/crontabs directory. The /var/adm/cron/log files shows entries for the non-existent jobs running, and i am receiving emails from the relevant cron jobs.
How can I find and stop these jobs. They don't show up in ps -eaf, and i have restarted the cron daemon a few times. I can restart the box if necessary, but thought I'd ask here first.
Thanks,
Dj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2005 09:30 PM
11-24-2005 09:30 PM
Re: Non-existent crons running
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2005 09:33 PM
11-24-2005 09:33 PM
Re: Non-existent crons running
Set up a little control file:
/etc/rc.config.d/machinestatus
# for example
It should say:
STATUS=LIVE
or
STATUS=STANDBY
Then you can have this code in a startup script:
. /etc/rc.config.d/machinestatus
if [ "$STATUS" = "STANDBY" ]
then
/sbin/initd/cron stop
fi
Now the real problem here is not having a switchover checklist for when you machine swap.
My code is totally unnecessary and actually redundant.
You can make a checklist for the admin doing the swap.
vi /etc/rc.config.d/cron
# Change the first variable in the file to 0 on the standby machine and 1 on the new live machine.
Boot them.
You are done, cron can't possibly be running unless some script fires it up.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2005 09:51 PM
11-24-2005 09:51 PM
Re: Non-existent crons running
There are no "at" jobs running. Thanks for the info Steven, but is there a way of seeing where the cron jobs that are currently running are coming from, and how to stop them.
Dj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2005 03:33 AM
11-25-2005 03:33 AM
Re: Non-existent crons running
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2005 03:55 AM
11-25-2005 03:55 AM
Re: Non-existent crons running
How about su'ing to each id that has cron jobs, do a crontab -e, save it, then watch...
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2005 04:03 AM
11-25-2005 04:03 AM
Re: Non-existent crons running
You shouldn't need to reboot the host.
If you have cleared the crontabs file out of /var/spool/cron/crontabs then you should be able to stop them by cycling the cron daemon.
cd /sbin/init.d
./cron stop
./cron start
That should take care of it for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2005 04:59 AM
11-25-2005 04:59 AM
Re: Non-existent crons running
Thanks for advice.
Dj