LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-03-2003, 10:00 AM   #1
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
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:
Quote:
# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

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

# uncomment this if you want your log files compressed
compress

# 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 {
monthly
create 0664 root utmp
rotate 1
}

/var/log/lastlog {
monthly
rotate 1
}

# system-specific logs may be configured here
Any help would be appreciated. TIA.
 
Old 02-03-2003, 11:46 AM   #2
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
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 {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}

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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rotating X display fubzot Linux - General 1 04-10-2005 02:03 PM
rotating wallpapers? greythorne Mandriva 3 12-08-2004 01:07 PM
rotating server in LAN rblampain Linux - Networking 0 12-06-2004 01:18 AM
problems rotating logs uros678 Linux - Software 0 12-15-2003 02:55 AM
Rotating X with xrandr antifelix Linux - Newbie 3 08-22-2003 10:56 PM


All times are GMT -5. The time now is 01:51 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration