I once had issues with malformed cron entry constantly spawing new process which never end (wrong syntax for instance iostat or alike,bad scripts ), reaching queuedefs limit (maximum concurent cron/at jobs limitation).
So roots cron was malformed hitting the limit, and all other users cron's didn't work.
If this works the other way (i don't see why not), a user could compromise cron of the entire system with a simple entry
I had one recently where the disc cabinet containing some of the scripts mentioned in root crontab failed. The cron daemon soon reached the queue limit as it queued more and more impossible jobs with hung I/O.
Well worth speed reading the cron log.
As a minimum:
grep "max run limit" /usr/adm/cron/log
I assume that /home/report is on a normal mounted partition (not NFS or whatever).
To all that contributed to this issue, many thansk for the support. Problem now solved, with a reboot. But it would help to know why this was happening
crontab again not working,
Amit_Chopra: I am not english native, sorry if its dumb question, what is "locale" of the server?
---------- Post updated at 08:54 AM ---------- Previous update was at 08:51 AM ----------
After running:
grep "max run limit" /var/adm/cron/log | more
I got the following result:
! c queue max run limit reached Fri Apr 13 14:50:00 SAST 2012
! c queue max run limit reached Fri Apr 13 14:50:00 SAST 2012
! c queue max run limit reached Fri Apr 13 14:50:00 SAST 2012
! c queue max run limit reached Fri Apr 13 14:50:00 SAST 2012
! c queue max run limit reached Fri Apr 13 14:51:00 SAST 2012
! c queue max run limit reached Fri Apr 13 14:51:00 SAST 2012
Is that something wrong?
But if I run
more /var/adm/cron/queuedefs
I have the following:
a.4j1n
b.2j2n90w
So no
c
is present
Please can you help
FR
---------- Post updated at 11:28 AM ---------- Previous update was at 08:54 AM ----------
Hi
I think now the problem is solved, what I did was to change the text "a.4j1n" to "a.10j1n" in file "/var/adm/cron/queuedefs", them stopt/start cron deamon. So
nothing appears now, when I run "grep "max run limit" /var/adm/cron/log | more" and entries in the crontab are being executed.
---------- Post updated at 11:30 AM ---------- Previous update was at 11:28 AM ----------
Hi
I think now the problem is solved, what I did was to change the text "a.4j1n" to "a.10j1n" in file
/var/adm/cron/queuedefs
, them stopt/start cron deamon. So
nothing appears now, when I run
The following are the alphabet codes for the queue types:
a For "at" jobs
b For "batch" jobs
c For "crontab" jobs
I think you need to add a c queue line in the queuedefs file, not change the a queue line. Be careful because the default is already 100 concurrent jobs. That is a lot of concurrent jobs so we do wonder what is happening in the other crontabs ?
The letter c at the start of the error message shows you that it is the c (crontab) queue.
(I had one yesterday for the a queue after a script containing at jobs went wrong).
I repeat that over 100 concurrent crontab jobs is worrying. Perhaps one of your other crontab files is faulty?
Check what's being ran inside those 100 concurrent jobs.
Are you really running 100 jobs concurrent jobs ?
Are they finishing properly ?
If all above is correct then increase concurrent jobs limit, unless you want the same to happen with 200 (or any) limit in future time
It's likely that some of that jobs are not exiting or hanging, occupying the one of the cron job slots forever ( until cron or machine is restarted/rebooted )
Peasant makes a vary good point.
My approach would be to look at every process in memory and account for each process, looking for processes which should not be there at that time of day. Particularly if there are lots of the same process which came from a crontab line which are still there long after they should have finished.
ps -ef | sort +8 | pg
The classic problem is where cron jobs connect to a remote database but never disconnect.
I am not having 100 crontab entries. there are 17 entries, 10 for root and 7 for a user.
What is intriguing is after I changed the line a.10j1n to a.30j1n, the entries in the cron, runned, BUT I beleive by changing "a" should not make a difference, only if I changed the line "c" for crontab, it should do something, but on my queuedefs file there is not a "c" line.
That cron alone was enough because it will try to start 119 concurrent jobs (one per minute between 10:00-11:59) .They do look faulty because they all started the day BEFORE you issued the ps -ef .
When you fix the process, note that the HP-UX ping command takes a parameter -n <number> to restrict the number of ping packets.
I can't explain why the ping jobs have PPID 1 unless cron has been stop/started since they started running or they were actually started with nohup command & .
A gash way of finding out what jobs are running directly from cron is to find out the PID of cron itself and then grep that as PPID from ps -ef . This will not tell you what is queued but might help diagnose where the 100 concurrent jobs are coming from (assuming it wasn't the faulty ping cron).
Thank you very much for your email, I did not noticed that by running between 10:00-11:00, I was puting so much "stress" in the crontab (running lots of jobs). I did start/stop the cron earlier. Because that entry was already commented out, can I kill those pids with related with ping command?
Yes you can kill the PIDs from the rogue "ping" processes.
Killing these processes may leave crout... files in /var/spool/cron/tmp . Just check that these files are not too big, otherwise they are harmless.
Footnote: Starting and stopping cron is the last resort and you need to be sure that cron is doing nothing at the time. I would only stop cron if I was doing something unusual like working on a database when I did not want any "interruptions".