- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: How can cron start itself?
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
06-30-2008 07:04 AM
06-30-2008 07:04 AM
First time I ever seen this on one of our Linux support servers.
$ ps -ef | grep cron
root 1991 1 0 2007 ? 00:00:15 crond
root 31933 1991 0 Jun24 ? 00:00:00 crond
boucherr 18032 17842 0 11:45 pts/1 00:00:00 grep cron
What could trigger cron to start itself?
Which log can I check to see when/how/why the second cron deamon was started?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2008 09:41 AM
06-30-2008 09:41 AM
Re: How can cron start itself?
Your system already auto starts cron with a softlink in /sbin/rc3.d or /sbin/rc2.d that points to /sbin/init.d/crond (or cron)
You can write yourself a script that does this, but cron can't be used to start itself.
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
06-30-2008 10:03 AM
06-30-2008 10:03 AM
Re: How can cron start itself?
I'm trying to find out how it happenned.
Stopping "cron" using the init.d script stopped the 1991 process but not the other.
RayB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2008 10:19 AM
06-30-2008 10:19 AM
SolutionFor example, when cron starts up a new process, it essentially branches off a copy of itself, then the copy replaces itself with whatever this particular cron job is supposed to be running.
It's possible that you simply caught cron "in the act" of forking itself. But the start time of the process 31933 is shown as "Jun24" i.e. a date, not a time. This indicates the process is older than 24 hours, so something has prevented the child-cron from performing the exec() syscall.
A NFS access problem at exactly the wrong moment might stop the exec() syscall and leave the child-cron in this state. A disk that's abruptly died or stuck in an infinite-retry loop might have similar results, if the disk is local.
Try getting some more facts. Look into /var/adm/cron/log to find out what was the command cron was trying to execute. When you find the line that refers to process number 31933 and has the correct date, look at the _previous_ line (it should begin with "CMD:") for the command line. Then find out on which disk the command was located and examine the health of that disk.
Also check the syslog and the dmesg listing. If the server is critically low on memory, it sometimes causes things to fail in non-obvious ways.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2008 12:04 PM
06-30-2008 12:04 PM
Re: How can cron start itself?
I couldn't find process 31933 in the /var/log/cron but found 31934 which checks on other systems being up at a time when we were experiencing network hiccups.
I'll pass this thread on to my coworkers so they know what to do next time this happens.
Take care all
RayB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2008 10:42 PM
06-30-2008 10:42 PM
Re: How can cron start itself?
# service crond stop
and to stop cron in all runlevel you can use the following command:
#chkconfig crond off
So after the reboot also cron will be in a stoped state.