Page 1 of 1

Problem with logrotate

Posted: Wed Aug 04, 2010 4:20 pm
by jiml
I noticed that I had some huge log files which hadn't been rotated in a long time. I ran

Code: Select all

/usr/sbin/logrotate -v -f /etc/logrotate.conf
but the process ground to a halt and appears to be caused by the pre script in the /etc/logrotate.d/syslog file. By commenting out the two lines (pre and post) referencing greyhole logrotate now runs correctly. As I don't use greyhole at the moment, it shouldn't cause any issues for me.

Jim!

Re: Problem with logrotate

Posted: Sun Aug 08, 2010 9:58 am
by radioz
I noticed that I had some huge log files which hadn't been rotated in a long time. I ran

Code: Select all

/usr/sbin/logrotate -v -f /etc/logrotate.conf
but the process ground to a halt and appears to be caused by the pre script in the /etc/logrotate.d/syslog file. By commenting out the two lines (pre and post) referencing greyhole logrotate now runs correctly. As I don't use greyhole at the moment, it shouldn't cause any issues for me.

Jim!
Thanks for that. I noticed the same problem.

For anyone else that might be confused about what to change, here is a copy of my edited /etc/logrotate.d/syslog file. Note the 4 lines that were commented out ('#'):

Code: Select all

/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron { sharedscripts #prerotate # /usr/bin/greyhole --prerotate #endscript postrotate #/usr/bin/greyhole --postrotate > /dev/null || true /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true endscript } ~