Bug 69187 - logrotate cron script is misplaced
Summary: logrotate cron script is misplaced
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: logrotate
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Elliot Lee
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-07-18 18:40 UTC by Florin Andrei
Modified: 2007-04-18 16:44 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-07-18 18:40:05 UTC
Embargoed:


Attachments (Terms of Use)

Description Florin Andrei 2002-07-18 18:40:01 UTC
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
/etc/cron.daily/logrotate
/etc/logrotate.conf
/etc/logrotate.d
/usr/sbin/logrotate
/usr/share/doc/logrotate-3.6.4
/usr/share/doc/logrotate-3.6.4/CHANGES
/usr/share/man/man8/logrotate.8.gz
/var/lib/logrotate.status
[root@vrazalla florin]#

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
job.
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):


How reproducible:
Always

Steps to Reproduce:
1.install logrotate
2.
3.
	

Actual Results:  the cron script is placed in cron.daily

Expected Results:  the cron script should be placed in cron.hourly

Additional info:

Comment 1 Elliot Lee 2002-08-08 16:00:18 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.