Re: FC10 -- adding /var/log/messages to daily logrotate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/9/23 Robert Moskowitz <rgm@xxxxxxxxxxxxxxx>:
> I just discovered that /var/log/messages is NOT part of the daily logrotate
> on my FC10 netbook.  My drive was full with a 4Gb messages file.  Deleted it
> and now the system is working right again.
>
> So I want to add it to the daily rotate.  Is there an easy way to set this
> up?
>
> More importantly why is it NOT part of the daily rotate?

It has been part of the (weekly) log rotation for as long as I remember.

Is your /var/log/secure log rotated correctly?

- You should have /etc/cron.daily/logrotate, which runs logrotate daily.

- You should have /etc/logrotate.conf which sets some defaults, notably:
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

- You should then have something like the following script:

[sam@samlap ~]$ cat /etc/logrotate.d/syslog
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler
/var/log/boot.log /var/log/cron {
    sharedscripts
    postrotate
	/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
    endscript
}

But as I said before, I believe the messages log is on weekly
rotation, not daily and depends on cron.daily running...

-- 
Sam

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux