-   Linux - General (
-   -   messages not rotating (

TruckStuff 02-03-2003 10:00 AM

messages not rotating
I finally have some time to sit down and figure out why my /var/log/messages log is not rotating (running Mandrak 8.0). All logging functions are working properly, but the messages log has not been rotated in about 6 months. The file is getting rather large and I would love to figure this out.

As far as I can tell my logrotate.conf file is set up correctly. When I attempted to run logrotate manually (# logrotate /etc/logrotate.conf), I recieved the following message:

Could not mv messages.5.gz to messages.6.gz

So my questions is why is it even trying to keep the oldest file when it should only keep 5 of them? Here is my logrotate.conf file:

# see "man logrotate" for details
# rotate log files weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones

# uncomment this if you want your log files compressed

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own lastlog or wtmp -- we'll rotate them here
/var/log/wtmp {
create 0664 root utmp
rotate 1

/var/log/lastlog {
rotate 1

# system-specific logs may be configured here
Any help would be appreciated. TIA.

nxny 02-03-2003 11:46 AM

Heres my /etc/logrotate.d/syslog

/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
/bin/kill -HUP `cat /var/run/ 2> /dev/null` 2> /dev/null || true

Check and see if you have a similar file. Grep for "/var/log/messages" under logrotate.d . If you dont, create one that looks like this and fits your needs.

All times are GMT -5. The time now is 03:10 AM.