Bug 69187

Summary: logrotate cron script is misplaced
Product: [Retired] Red Hat Linux Reporter: Florin Andrei <florin>
Component: logrotateAssignee: Elliot Lee <sopwith>
Status: CLOSED WONTFIX QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-07-18 18:40:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.