Problem with logrotate

jiml
Posts: 28
Joined: Wed Jan 13, 2010 1:13 am

Problem with logrotate

Postby jiml » Wed Aug 04, 2010 4:20 pm

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!

Ubuntu 12.04 (64bit)

User avatar
radioz
Posts: 406
Joined: Tue Nov 24, 2009 1:07 pm

Re: Problem with logrotate

Postby radioz » Sun Aug 08, 2010 9:58 am

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 } ~

Who is online

Users browsing this forum: Google [Bot] and 10 guests