Project

General

Profile

Bug #644

Message Log not rotating properly

Added by AfterSpencer about 9 years ago. Updated almost 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
09/29/2010
Due date:
% Done:

0%


Description

I was having an issue with the message log on my Amahi server not rotating properly. It was up to over the past few months and under previous install had filled up available space on root which resulted in me re-installing Amahi/Fedora.

After some digging and manually running they logrotate command ( logrotate -vf /etc/logrotate.conf ) and watching the output I determined that it was failing when it tried to run the postscript found in /etc/logrotate.d/syslog

Originally the file looked like this:

Code:
/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
}

I commented it out like this:

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

and it fixed the problem and rotated the message log properly.

I also disabled greyhole as found here (http://forums.amahi.org/viewtopic.php?f=39&t=1742&start=0) as I do not use it.

History

#1 Updated by AfterSpencer about 9 years ago

The second batch of code should look like this

Code:
/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
      }

#2 Updated by rgmhtt almost 9 years ago

Can we get logrotate fixed?

My messages is 3Mb and hda-updates.log is 1Mb. I suspect there are users out there where these files have gotten quite large.

#3 Updated by AfterSpencer almost 9 years ago

Like I said in the OP the file space on my box was totally full after about six months. The messages log was 250 GB. I would be surprised if others do not have this problem but don't know about it.

Also available in: Atom