View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001163||CentOS-4||Other||public||2006-01-05 22:19||2013-03-23 20:24|
|Product Version||4.2 - i386|
|Summary||0001163: Logrotate is not roatating logs properly|
|Description||When logrotates the logs, say messages|
It will keep writing to the messages.1 on first rotation and then following rotation messages.2 will be the logfile being written too.
So it really doesn't rotate properly
|Tags||No tags attached.|
|wondering if there was any update on this logrotate issue?|
I am not sure what your issue is ... here is what my logrotate does:
-rw------- 1 root root 9517 Jan 24 18:07 messages
-rw------- 1 root root 94165 Jan 21 18:06 messages.1
-rw------- 1 root root 22025 Jan 14 09:24 messages.2
-rw------- 1 root root 38135 Jan 7 09:24 messages.3
-rw------- 1 root root 94381 Dec 31 19:32 messages.4
messages is always current ... after a rotate, what is messages becomes messages.1 ... messages.1 -> .2, .2 -> .3, .3 -> .4, and .4 goes away.
All active logging always goes into a messages ... .1 is always the most recent archived file, etc.
Is this not the behavior you see?
Basically the logs rotates, correctly like yours, but syslog doesn't get restarted on the weekly rotation so what happens is after it rotates:
-rw------- 1 root root 0 Jan 22 04:02 maillog
-rw------- 1 root root 23388353 Jan 25 08:16 maillog.1
messages.1 will continue to be the file that keeps getting written to and next week it will rotate but messages will be written to maillog.2 and so on til it reaches maillog.4 and it just keeps writing it to maillog.4
I have no idea why it is not restarting syslog as the logrotate.d/syslog file looks correct.
|Not sure if this was ever resolved, but I had this same problem, and I discovered it was because my /tmp partition was mounted 'noexec'. This prevented the postrotate script from running.|
AH ... OK, that would definitely do it :)
That is not a bug though, it is a difference in configuration from how the package was designed to operate.
The only thing I can think of to fix that is to change the TMPDIR to /var/tmp ... if that is not mounted as noexec.
Here is an example:
This bug has also been addressed in the fasttrack version of logrotate:
|CentOS4 is EOL.|
|2006-01-05 22:19||dtam||New Issue|
|2006-01-05 22:19||dtam||Status||new => assigned|
|2006-01-24 18:23||dtam||Note Added: 0003089|
|2006-01-25 02:50||JohnnyHughes||Note Added: 0003090|
|2006-01-25 16:25||dtam||Note Added: 0003093|
|2007-01-04 10:20||socheat||Note Added: 0004321|
|2007-01-04 11:22||JohnnyHughes||Note Added: 0004322|
|2007-01-04 11:38||JohnnyHughes||Note Added: 0004323|
|2013-03-23 20:24||tigalch||Note Added: 0016937|
|2013-03-23 20:24||tigalch||Status||assigned => closed|
|2013-03-23 20:24||tigalch||Resolution||open => suspended|