Has anyone else had any trouble with the logrotate script working? My files are getting quite large and I don't have one compressed archive of older files. I did collapse my syslog server to write to only /var/log/messages and /var/log/mail. The script runs, but never rotates the files. Any ideas why? Here is some of my files: *ns1:/var/named/pz # cat /etc/logrotate.d/syslog * /var/log/messages { compress dateext maxage 365 rotate 99 missingok notifempty size +4096k create 640 root root sharedscripts postrotate /etc/init.d/syslog reload endscript } /var/log/mail { compress dateext maxage 365 rotate 99 missingok notifempty size +4096k create 640 root root sharedscripts postrotate /etc/init.d/syslog reload endscript } /var/log/clamd.log { compress dateext maxage 365 rotate 99 missingok notifempty size +2048k create 640 root root sharedscripts postrotate /etc/init.d/syslog reload endscript } *ns1:/var/named/pz # cat /etc/cron.daily/logrotate * #!/bin/sh /usr/sbin/logrotate /etc/logrotate.conf /usr/bin/reswatch *ns1:/var/named/pz # cat /etc/logrotate.conf * # see "man logrotate" for details # rotate log files weekly weekly # keep 4 weeks worth of backlogs rotate 4 # 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 #} # system-specific logs may be also be configured here. Thanks, Tim
Tim - moores.homeip.net wrote:
Has anyone else had any trouble with the logrotate script working? My files are getting quite large and I don't have one compressed archive of older files. I did collapse my syslog server to write to only /var/log/messages and /var/log/mail. The script runs, but never rotates the files. Any ideas why? Here is some of my files:
(...) I always had problems with logrotate: refusing to rotate all logs, one specific logfile, sometimes seems to stop working, didn't worked whell called by cron but works well when you call /etc/cron.daily/logrotate from a shell, ... Despite being a very essencial program, it still plays tricks with us all (well, at least me). Just to mention - had problems with logrotate in Redhat, Suse, Debian... Try /usr/sbin/logrotate -d /etc/logrotate.conf check the output to see what would be done - if you agree with it, then /usr/sbin/logrotate -v /etc/logrotate.conf After that, run again with '-d' to see if it wants to rotate the logs again. It should do nothing If everything fails, try '-v --force' - perhaps it resets the state file, and restore the sanity to logrotate. BTW - in my Suse 9.0, for some reason, after installing amavisd-new my /var/spool/amavis/amavis.log isn't rotated by default... probably they forgot, because /var/spool isn't a good place to put logfiles... Good luck, -- Marcos Lazarini
It works fine here. Tim - moores.homeip.net wrote:
Has anyone else had any trouble with the logrotate script working? My files are getting quite large and I don't have one compressed archive of older files. I did collapse my syslog server to write to only /var/log/messages and /var/log/mail. The script runs, but never rotates the files. Any ideas why? Here is some of my files:
*ns1:/var/named/pz # cat /etc/logrotate.d/syslog * /var/log/messages { compress dateext maxage 365 rotate 99 missingok notifempty size +4096k create 640 root root sharedscripts postrotate /etc/init.d/syslog reload endscript }
/var/log/mail { compress dateext maxage 365 rotate 99 missingok notifempty size +4096k create 640 root root sharedscripts postrotate /etc/init.d/syslog reload endscript }
/var/log/clamd.log { compress dateext maxage 365 rotate 99 missingok notifempty size +2048k create 640 root root sharedscripts postrotate /etc/init.d/syslog reload endscript }
*ns1:/var/named/pz # cat /etc/cron.daily/logrotate * #!/bin/sh
/usr/sbin/logrotate /etc/logrotate.conf /usr/bin/reswatch
*ns1:/var/named/pz # cat /etc/logrotate.conf * # see "man logrotate" for details # rotate log files weekly weekly
# keep 4 weeks worth of backlogs rotate 4
# 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 #}
# system-specific logs may be also be configured here.
Thanks, Tim
On Thursday 09 September 2004 22:35, Tim - moores.homeip.net wrote:
Has anyone else had any trouble with the logrotate script working? My files are getting quite large and I don't have one compressed archive of older files. I did collapse my syslog server to write to only /var/log/messages and /var/log/mail. The script runs, but never rotates the files. Any ideas why? Here is some of my files:
<SNIP> Yep... SusE 9 has trouble, here. I changed my specs to one day apiece & still they grew. You want them rotated...? Add '--force' to the /etc/cron.daily/ logrotate file. They'll rotate. -- ..."Yogi" CH Namasté Yoga Studio "If music be the food of love, why can't rabbits sing?"
On Fri, 10 Sep 2004 09:17:08 -0500
C Hamel
On Thursday 09 September 2004 22:35, Tim - moores.homeip.net wrote:
Has anyone else had any trouble with the logrotate script working? My files are getting quite large and I don't have one compressed archive of older files. I did collapse my syslog server to write to only/var/log/messages and /var/log/mail. The script runs, but never rotates the files. Any ideas why? Here is some of my files:
<SNIP> Yep... SusE 9 has trouble, here. I changed my specs to one day apiece & still they grew. You want them rotated...? Add '--force' to the /etc/cron.daily/ logrotate file. They'll rotate. My desktop is a SuSE 9.0 Pro with an AMD Athalon 700Mhz processor. I have had no problems with logrotate, and I have added a few other logs to the list.
--
Jerry Feldman
Tim - moores.homeip.net wrote:
Has anyone else had any trouble with the logrotate script working? My files are getting quite large and I don't have one compressed archive of older files. I did collapse my syslog server to write to only /var/log/messages and /var/log/mail. The script runs, but never rotates the files. Any ideas why? Here is some of my files:
I see you have found /etc/logrotate.d/ . Now do a 'man logrotate' and modify the options in the files in that directory as to me your maxage, rotate and size values are too high.
*ns1:/var/named/pz # cat /etc/logrotate.d/syslog *
[snip] -- The Little Helper ======================================================================== Hylton Conacher - Linux user # 229959 at http://counter.li.org Currently using SuSE 9.0 Professional with KDE 3.1 Licenced Windows user ========================================================================
participants (6)
-
C Hamel
-
Hylton Conacher (ZR1HPC)
-
James Knott
-
Jerry Feldman
-
Marcos Vinicius Lazarini
-
Tim - moores.homeip.net