1838576 Members
4161 Online
110128 Solutions
New Discussion

Re: Problem with cron

 
Satish Y
Trusted Contributor

Problem with cron

Hi,

Greetings!....

We are facing problem with cron daemon.

What ever job we schedule in cron it is spawning one more cron daemon and not at all processing submitted job like this enormous number of cron daemons generated.

To test this we have put an entry in cron:

* * * * * date >> /tmp/datefile 2>&1

which has to put date into /tmp/datefile for every minute, but generating one more /usr/sbin/cron daemon. Even we tested increasing timespan too, but same problem persists.

Can anyone please advice?..

Cheers and regards,
satish.
Difference between good and the best is only a little effort
8 REPLIES 8
Steven Sim Kok Leong
Honored Contributor

Re: Problem with cron

Hi,

Just a hunch, what is the parent proces ID (PPID) of each of this /usr/sbin/cron processes?

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Paula J Frazer-Campbell
Honored Contributor

Re: Problem with cron

Hi
I sounds like you have two instances of cron running.

Try ps -ef|grep cron and see how many /usr/sbin/cron are running.

HTH

Paula
If you can spell SysAdmin then you is one - anon
Satish Y
Trusted Contributor

Re: Problem with cron

ppid of these processes is 1.

There are lot of processes which are spawned every minute... say 60 processes after 1hr(If cron job set to run for every minute).

Thanks and regards,
satish.
Difference between good and the best is only a little effort
Steven Sim Kok Leong
Honored Contributor

Re: Problem with cron

Hi,

Check that the pipe FIFO exists in /var/adm/cron. FIFO prevents duplicate cron processes from being run. If FIFO not existing in /var/adm/cron, a second cron process is allowed to startup.

# ll /var/adm/cron/FIFO
prw------- 1 root sys 0 Feb 16 14:22 /var/adm/cron/FIFO

Someone might have accidentally removed the FIFO file. If /usr/sbin/cron process has problems in creating the FIFO pipe, subsequent cron processes are allowed to startup.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Satish Y
Trusted Contributor

Re: Problem with cron

FIFO already existing with specified permissions and 0 size.... still facing problems...

Cheers....
Satish.
Difference between good and the best is only a little effort
Steven Sim Kok Leong
Honored Contributor

Re: Problem with cron

Hi,

Some possible further diagnostics:

1) What is the date/time of creation of the FIFO file? Is it created at the current time?

2) Are entries in /var/adm/cron/log updated?

3) What is the directory permissions of /var/adm/cron?

4) Does this phenomenon occur when you use "at" instead of "cron" to schedule a job?

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Satish Y
Trusted Contributor

Re: Problem with cron

Hi Steve,

1) ls -l output:
prw------- 1 root sys 0 Jun 30 1999 FIFO

2) Entries have been made in cron log.

3) Directory permissions:

drwxr-xr-x 2 adm adm 1024 Feb 16 12:35 /var/adm/cron

4) No, at is working fine.

By the way, how to create a FIFO file?....

Cheers...
Satish.
Difference between good and the best is only a little effort
Steven Sim Kok Leong
Honored Contributor

Re: Problem with cron

Hi,

To create a pipe, use mknod ie.

# mknod FIFO p

Regarding your cron problem, search the patch database for cron patches, install the latest and see if the problem occurs again. This is because it is not normal for multiple duplicates of /usr/sbin/cron to run with FIFO existing.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com