Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem wirh cron daemon

Status
Not open for further replies.

tech123786

Technical User
Nov 13, 2006
31
US
Hello,
On one of our aix 5.3 servers, cron daemon keeps dying without any reason. I checked /etc/inittab file,/usr/sbin/cron was setup with respawn option, all the permission of cron file are fine.Everything looks normal to me. I have started it again using nohup /usr/sbin/cron &.But after two days I noticed that cron is not runing on thix box. Any suggestions/ideas why this is happening?


Thanks
 
have you checked the cron log?

/var/spool/cron/log I think



HTH,

p5wizard
 
P5wizard,
I do not see any log files under /var/spool/cron directory.



Thanks
 
My mistake, cron logfile is /var/adm/cron/log


HTH,

p5wizard
 
There must be a schedueled job in the cron itself that kills it!!!

could u list your cron?

cron -l

regards,
Khalid
 
P5,
It doesn't have any directory like /var/spool/cron/log.
Khalidaa,
Here is the crontab file..
0 3 * * * /usr/sbin/skulker
45 2 * * 0 /usr/lib/spell/compress
45 23 * * * ulimit 5000; /usr/lib/smdemon.cleanu > /dev/null
0 11 * * * /usr/bin/errclear -d S,O 30
0 12 * * * /usr/bin/errclear -d H 90
0 15 * * * /usr/lib/ras/dumpcheck >/dev/null 2>&1
05 00 * * * /opt/hd/sc/bin/sc_clr_tmp >/dev/null 2>&1
# SSA warning : Deleting the next two lines may cause errors in redundant
# SSA warning : hardware to go undetected.
01 5 * * * /usr/lpp/diagnostics/bin/run_ssa_ela 1>/dev/null 2>/dev/null
0 * * * * /usr/lpp/diagnostics/bin/run_ssa_healthcheck 1>/dev/null 2>/dev/null
# SSA warning : Deleting the next line may allow enclosure hardware errors to go undetected
30 * * * * /usr/lpp/diagnostics/bin/run_ssa_encl_healthcheck 1>/dev/null 2>/dev/null
# SSA warning : Deleting the next line may allow link speed exceptions to go undetected
30 4 * * * /usr/lpp/diagnostics/bin/run_ssa_link_speed 1>/dev/null 2>/dev/null
 
P5wizard,
My bad, Yes there is a cron file under /var/adm/cron..But I do not see any Fail cronjobs in it.

Thanks
 
Are there any obscure messages on the system's console?

You can redirect console output to a file so you can look at the console messages later on.

# swcons /tmp/console.20070218

The file specified must be full pathname. Then afterwards you can just more or pg through the file.

Turn console redirect off by running

# swcons

without any parameters.


HTH,

p5wizard
 
Even if something's killing cron, it should pop right back up.

What's the ouput of "lsitab cron" (requires root privileges).

- Rod


IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

Wish you could view posts with a fixed font? Got Firefox & Greasemonkey? Give yourself the option.
 
A "respawn" entry in inittab will result in automatically restarting a process from init when it is killed by someone or something, unless init detects that it needs to respawn that process too rapidly. If so, init will halt the "respawning", and will show some (terse) info on the console, hence my question about console messages.

In first post, tech123786 already stated that entry fro cron is set to "respawn".


HTH,

p5wizard
 
Thanks for your inputs guys!
I think I found the problem that was causing the issue.One of the scripts in crontab entry is for clearing logs and /tmp file on daily basis (.opt/hd/sc/bin/sc_clr_tmp), yesterday I checked that script and commented in the crontab, after this change cron is running without any problems.
The thing is,this same script is running fine with cron on the other systems.


Thanks
 
p5wizard,

init doesn't really halt the respawning, it pauses it. If the command returns more than five times in 225 seconds, it waits 60 seconds to run it again and will only try to launch it five times every 240 seconds thereafter. (source}

tech123786,

Given this, it's really strange that commenting out a cron job that only runs once a day would fix the problem. Even if it was killing cron, cron would be able to start back up within five minutes of of /opt/hd/sc/bin/sc_clr_tmp finishing.

Oh well, I guess it's just one of those things. :)

- Rod


IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

Wish you could view posts with a fixed font? Got Firefox & Greasemonkey? Give yourself the option.
 
Rod,

If there would be something amiss with cron itself (missing FIFO, corrupt cron executable or the like), the "pausing" would essentially lead to "halting"...
One would still see traces of this happening on the system's console:

init: cron respawning too rapidly

or something like that.

But it's all water under the bridge now...


HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top