[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cron job runs twice



On Thu, 2 Aug 2001 23:18:25 +0300 (IDT), Tzafrir Cohen <tzafrir@technion.ac.il> wrote:
> 
> A couple of days ago suddenly many processes got SIGKILL over a period of
> ~30 minutes. The only reason I can think of is some run-away process, that
> eventually got killed.
> 
> I restarted a couple of the daemons that got killed (luckily sshd was not
> one of them. Crond was one of them). But ever since then I noticed a
> couple of problems. One of them, which I have not managed to solve:

In a situation like this (where the cause of the problem is unsure) I would
rather boot the machine then try to fix what I think is wrong.

> 1. the mrtg cron job occasionally gives me:
>     ERROR: I guess another mrtg is running. A lockfile
>     (/home/httpd/html/mrtg/mrtg.cfg_l) aged
>     1 seconds is hanging around. If you are sure that no other mrtg
>     is running you can remove the lockfile
>    cron running the same job twice?
>    This doesn't always happen.
> 
> On /etc/cron.d/local I have:
> 
> # mrtg: update load graph every 5 minutes
> 0-59/5 * * * * tzafrir /usr/bin/mrtg /home/httpd/html/mrtg/mrtg.cfg
> 
> "mrtg" is not mentioned otherwise under /etc/cron*
> 
> 'crontab -l' for the user 'tzafrir' does not mention anything about mrtg.
> 
> The username that appears in the subject of the cornjob message is
> 'tzafrir', so I figure it runs as 'tzafrir' . I suspect root is also
> running those cron jobs. It used to run them in the past, and I see files
> created by root.
> 
> However there is no /var/spool/crontab/root , and in the general crontab
> this is not mentioned, as I said before.
> 
> Anything I'm missing?

It seems that you have 2 crons concurrently running. Can you check if 
other cron tasks are also running in pairs ?           

Ehud.


-- 
 Ehud Karni     Mivtach - Simon  Insurance   /"\
 Tel: +972-3-6212-757 Fax: +972-3-6292-544   \ /  ASCII Ribbon Campaign
 (USA) Fax and  voice  mail: 1-815-5509341    X   Against  HTML  Mail
     Better     Safe     Than     Sorry      / \
     mailto:ehud@unix.simonwiesel.co.il    http://www.simonwiesel.co.il




=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il