- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- crond stopped
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
Discussions
Discussions
Discussions
Forums
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
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
тАО03-31-2004 05:28 PM
тАО03-31-2004 05:28 PM
We have found nothing related in the syslog.
Can you suggest how to diagnose this problem ?
Or if any patches applicable ?
If it is not solvable, we plan to write another script to auto-restart crond if it goes away. Any advise ?
Best regards
CL
Solved! Go to Solution.
- Tags:
- cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2004 05:33 PM
тАО03-31-2004 05:33 PM
Re: crond stopped
Have a look at /var/adm/cron/log and see if you get any clue in there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2004 05:43 PM
тАО03-31-2004 05:43 PM
Re: crond stopped
I've read some other posts about the apmd in Linux that may kill the crond if the system is running in battery mode (and crond is configured to be killed when low power).
Can you relate anything like this in HPUX and I should pay attention to ?
If not, we plan to write a script to restart the crond automatically. Any comment on it and any sample script for this purpose to share with us ?
Best regards,
CL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2004 05:52 PM
тАО03-31-2004 05:52 PM
Re: crond stopped
check which cron script is run that time interval.
check any other messages in syslog.log like a syslogd stop.
Revert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2004 05:55 PM
тАО03-31-2004 05:55 PM
Re: crond stopped
http://www2.itrc.hp.com/service/patch/patchDetail.do?BC=patch.breadcrumb.main|patch.breadcrumb.search|&patchid=PHCO_27422&context=hpux:800:10:20
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2004 06:03 PM
тАО03-31-2004 06:03 PM
Re: crond stopped
First thing I would suggest for your "cron" monitoring job is not to run it from cron :)
Secondly, I don't like the idea of monitoring cron using the "ps" there are already too many "ps" jobs running around.
In your case, it would be a good idea if your script kept a log of each time it restarted cron. That way, you might determine what it is that is killing cron and therefore not need to monitor it at all.
I would actually get cron to sort of monitor itself. Create a cron job to "touch" a file like "/tmp/cronalive" every five minutes(you could even "touch" your own shell script file).
Then have your shell script a) exit if it is already running and b) check the modification time of the file and then sleep for 5 minutes. If the file is over five minutes old then cron has probably died you can check at this point with "ps".
The reason to get the script to exit if it is already running is so that you can get cron to attempt to restart it every five minutes too. That way you get the script restarting cron if it dies and cron restarting the script if it dies.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2004 06:55 PM
тАО03-31-2004 06:55 PM
Re: crond stopped
I don't know if anyone tried it, but you could try using init to restart cron if needed...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2004 07:03 PM
тАО03-31-2004 07:03 PM
Re: crond stopped
Do you mean that a cron script can kill the cron daemon ? We have quite a number of script running but they do not kill any process purposely.
> check any other messages in syslog.log like a syslogd stop.
We do not find anything like the syslogd stop. In case we find it later, what does it sugguest ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2004 07:09 PM
тАО03-31-2004 07:09 PM
Re: crond stopped
There is no special pattern. The recent instance was happening at the time that the system was not busy. Looks like only the cron daemon was killed. The cron tasks are normal application tasks and do not have any code to kill other process purposely.
> I don't know if anyone tried it, but you could try using init to restart cron if needed...
Can you elaborate how to use init to do this ? Is it safe and easy to do so ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2004 07:21 PM
тАО03-31-2004 07:21 PM
Re: crond stopped
Although Mark alleges that HP-UX never would kill crucial daemons such as cron, and in theory swap reservation should prevent this, I've experienced instances on few of our HP-UX boxes that occassionally did get under severe memory pressure where indeed daemons such as cron or sendmail disappeared.
At least what HP pretend, and how theory prescribes it, you may find hints on the OS's memory management from the documentation in /usr/share/doc/mem_mgmt*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2004 07:28 PM
тАО03-31-2004 07:28 PM
SolutionBecause init will respawn it if the script stops, you're sure the monitoring always runs.
Mind that cron will get into background by itself when started.
Test your script and mind you don't have a path.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2004 08:02 PM
тАО03-31-2004 08:02 PM
Re: crond stopped
I don't dispute that processes can die under heavy RAM pressure, I am saying that HPUX doesn't actively kill them off like Linux does.
Elmar,
Thanks for reminding me of the benefits of inittab. I often use this route myself but often forget it exists :) The only problem I can see with using inittab for cron though is that some things like to restart cron and they will fail if init is respawning them. Still could be the best option though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2004 08:29 PM
тАО03-31-2004 08:29 PM
Re: crond stopped
So from the recommendations, I shall write a script, which installed in the inittab with respawn option, and monitor & restart cron from this script.
I will try this out if no further comments/findings from you experts.
Thanks a lot !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2004 09:05 PM
тАО03-31-2004 09:05 PM
Re: crond stopped
I saw crond faults on systems with /tmp 100% full. Could you check this on the suspicious system ?
Regards