problem with logrotate
Hi
Very new newbie here so be gentle with me ! I have run logrotate from the desktop and got the following message error: etc/logrotate.conf:25 duplicate log entry for /var/log/wtmp and the log files were not rotated. When I commented out the wtmp rotation script from the logrotate.conf file and tried again, the logrotate seemed to work ok. Any ideas what may be causing this and how to rectify it ? Thanks, Tony |
Post /etc/logrotate.conf
The wtmp part should look something like: Code:
/var/log/wtmp { |
I tried setting up the WTMP script exactly as you suggested but I'm still getting the same message. Any ideas ?
|
Do you have an entry for wtmp in /etc/logrotate.d/ ?
Post logrotate.conf or have a look if you have /var/log/* there. |
Hi
Here is the wtmp entry in /etc/logrotate.d /var/log/wtmp { compress dateext maxage 365 rotate 99 size=+400k notifempty missingok copytruncate } and here is my logrotate.conf # see "man logrotate" for details # rotate log weekly #weekly # rotate log daily weekly # keep 2 weeks worth of backlogs rotate 2 # create new (empty) log files after rotating old ones create # uncomment this if you want your log files compressed compress # uncomment these to switch compression to bzip2 #compresscmd /usr/bin/bzip2 #uncompresscmd /usr/bin/bunzip2 # RPM packages drop log rotation information into this directory include /etc/logrotate.d # no packages own wtmp -- we'll rotate them here #/var/log/wtmp { # monthly # create 0664 root utmp # rotate 1 #} # no packages own wtmp -- we'll rotate them here /var/log/wtmp { missingok monthly create 0660 root utmp rotate 1 } # system-specific logs may be also be configured here. |
Well, you rotate wtmp from both the entry in /etc/logrotate.d and from logrotate.conf, hence duplicate entries. Just comment out the part in logrotate.conf.
|
That's done it. Many thanks for all your help.
|
All times are GMT -5. The time now is 03:41 PM. |