There is actually a job in the standard cron configuration that is supposed
to maintain the cron log within a reasonable size:

        0 2 * * 0,4 /etc/cron.d/logchecker

When the cron log (/var/cron/log) reaches a max size, it will be renamed to
olog and an empty running cron log is created.  The only problem is that it
is checking the size against the ulimit setting, which is set by default on
AP/W5x systems to 'unlimited' in which case the script simply exits.  

We modify logchecker to limit log size as follows:

        LIMIT=`ulimit`
        if [ "${LIMIT}" = "unlimited" -o ${LIMIT} -gt 1024 ]
        then
          LIMIT=1024      # better than nothing: 0.5MB file
        fi

This gives us a reasonable cron history (2 * 1024 blocks = 2 * 512K), even
in an environment that uses quite a few cron jobs.  You can substitute
whatever limit you feel comfortable with on your limited /var partition
(specify the limit as disk blocks).

If you really want to regain some space in /var, schedule a job to reset
/var/adm/wtmp and /var/adm/wtmpx on a regular basis (e.g. weekly) - that
frees up significant space (in some instances 15+MB, depends on age of
system).

Joachim Hirche
CIM Concepts Inc.
200 Continental Drive Ste 112  - Newark DE 19713 USA  - 302 368 8982
[EMAIL PROTECTED]
-----Original Message-----
From: Jack Easley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 09:23
To: [EMAIL PROTECTED]
Subject: Crontab Log




I believe recommended procedure to stop cron logging is to change the
statement
CRONLOG=YES to CRONLOG=NO in /etc/default/cron. You must stop/start the cron
process after this to make the changes take effect. From the borne shell,
use
/etc/init.d
/cron stop to stop cron, then /etc/init.d/cron start to start cron.I also
make
it a rule to
append every line I enter into cron with "> /dev/null 2>&1".
 The worst mistake I have ever made on the Fox occurred when the cronlog was
enabled
and a new scheduled cron process & errors was not redirected to cron. This
particular
dwprocess accidently created a large cronlog and filled the /var partition
overnite! Your
Fox machines will not run with a full /var partition as space is required
for a
lot of normal
Foxboro processes. The result was a lockup of all Foxboro machines. Not
Good!
For
 this reason, the lack of cron logging is minor as compared to the possible
consequences.




-----------------------------------------------------------------------
This list is neither sponsored nor endorsed by the Foxboro Company. All 
postings from this list are the work of list subscribers and no warranty 
is made or implied as to the accuracy of any information disseminated 
through this medium. By subscribing to this list you agree to hold the 
list sponsor(s) blameless for any and all mishaps which might occur due to 
your application of information received from this mailing list.

To be removed from this list, send mail to 
[EMAIL PROTECTED] 
with "unsubscribe foxboro" in the Subject. Or, send any mail to
[EMAIL PROTECTED]

-----------------------------------------------------------------------
This list is neither sponsored nor endorsed by the Foxboro Company. All 
postings from this list are the work of list subscribers and no warranty 
is made or implied as to the accuracy of any information disseminated 
through this medium. By subscribing to this list you agree to hold the 
list sponsor(s) blameless for any and all mishaps which might occur due to 
your application of information received from this mailing list.

To be removed from this list, send mail to 
[EMAIL PROTECTED] 
with "unsubscribe foxboro" in the Subject. Or, send any mail to
[EMAIL PROTECTED]

Reply via email to