Red Hat Bugzilla – Bug 230974
false order in /etc/cron.daily
Last modified: 2008-05-21 11:59:45 EDT
Description of problem:
false order in /etc/cron.daily
logwatch and tmpwatch affected:
we get daily this error message from cron daemon:
You have old files in your logwatch tmpdir (/tmp):
The directories listed above were most likely created by a
logwatch run that failed to complete successfully. If so, you
may delete these directories."
This is because logwatch cronjob started before tmpwatch?
Version-Release number of selected component (if applicable):
everyday per cron
Steps to Reproduce:
error email message daily, tmp directory is cleaning only at the next night
no email, no directories like /tmp/logwatch.* after tmpwatch or (better)
logwatch has been done
Problem of logwatch.
This log message is generated by logwatch - logwatch tests whether in
/tmp/logwatch does not remain old tmp files. If there is any then logwatch
reports this error message - if everything works right logwatch removes the
files when it finish its work - so there should not remain any. There is no need
to clean this files - it is necessary only if logwatch was killed during its work.
So perhaps your logwatch process is killed or you call logwatch twice and the
second finds tmp files of the first (which is still running) and report it as a
logwatch don't be killed and nobody calls it twice. This work is handled by cron
service (at 4 a.m).
from cron log:
Mar 5 04:02:01 bbl1lnp8 crond: (root) CMD (run-parts /etc/cron.daily)
# ls /etc/cron.daily/
0anacron cups makewhatis.cron prelink rpm tmpwatch
0logwatch logrotate mlocate.cron RCS service_run yum.cron
The problem is the logwatch starts as first of the cron.daily scripts (because
0logwatch - leading zero) and the tmpwatch starts later. Supposedly logwatch
did't remain old tmp files. My opinion is the tmpwatch must do it before the
0logwatch script has been started.
Logwatch should remove its temporary files itself - and it works right for me.
Created attachment 149261 [details]
diff from logwatch.conf files
we have about 150 RHEL WS 3 and WS4 systems on our site. We have never this kind
of the problem with logwatch. recently we had installed three RHEL WS 5 beta 2
and they all have this problem. Not daily, but very frequently. We use for all
our systems same logwatch.conf file. The difference from the original
logwatch.conf file see pls. in attachment.
In rhel3,4 there were no test whether logwatch tmp files are removed. This test
was added to version which is in rhel5. Probably there could be add some option
which can switch off these messages.
thank you, this is a good news. And how we can add this option? I can't see any
reason for it, during the tmpwatch tool will do this work and the tmp dirs are
still very small for modern systems.
There is no option yet - but this bz should be take as a feature request for
tmp dirs should be quite large especially for web servers and if the tmp log
file remains there could be no process which will remove them so the log message
could be really useful in this case.
many thanks for your assistance. I don't have any questions yet.
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.