Hi,

I have two suggestion for newsyslog(8) and periodic(8) entries in
default /etc/crontab file:

* nice(1) newsyslog and periodic entries to shape CPU load spikes;
* lockf(1) them to prevent simultaneous execution.

So instead
  1 3 * * * root periodic daily
there may be
  1 3 * * * root lockf -t0 /var/run/periodic.daily.lock nice -20 periodic daily

In case of collision we'll receive following email:

Date: Wed, 26 Nov 2008 18:16:00 +0200 (EET)
From: [EMAIL PROTECTED] (Cron Daemon)
To: [EMAIL PROTECTED]
Subject: Cron <[EMAIL PROTECTED]> lockf -t0 /var/run/periodic.daily.lock nice
-20 periodic daily

lockf: /var/run/periodic.daily.lock: already locked


The configuration has been working for years on my servers without any
visible drawbacks.

What do you think?

-- 
Artem Naluzhnyy
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to