Red Hat Bugzilla – Bug 69187
logrotate cron script is misplaced
Last modified: 2007-04-18 12:44:17 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020606
Description of problem:
In the package provided by Red Hat, logrotate has its cron script in cron.daily:
[root@vrazalla florin]# rpm -ql logrotate
This is wrong, as it effectively prevents the "size" directive (see man
logrotate) to work efficiently.
"size" is designed to control rapid-growing logs and prevent them from eating up
entire partitions. But if logrotate is run only once a day, "size" cannot do its
In fact, "size" was created to perform a finer control where "daily" is not good
enough. But the current layout of the package is opposed to that.
It is much better to put logrotate's cron script in cron.hourly, hence allowing
"size" to perform a tighter control.
And logrotate, if it doesn't to anything (just wakes up, checks whether it needs
to rotate some files, then goes to sleep again) is "cheap" to run (as in CPU and
disk I/O resources).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Actual Results: the cron script is placed in cron.daily
Expected Results: the cron script should be placed in cron.hourly
If you have logfiles that are growing rapidly enough that you need hourly log rotation, you'll
have to make the change yourself. Unfortunately, many more users will be upset if
logrotate starts running every hour and taking CPU time from their stuff.