LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Logrotate Help! (https://www.linuxquestions.org/questions/linux-software-2/logrotate-help-147883/)

MaverickApollo 02-19-2004 12:23 AM

Logrotate Help!
 
I have logrotate set up on my system, but the log files are not being rotated, and I am calling it from cron, and getting the email telling me that it has run, just it always says "Log does not need rotating" However some of the logs are 20+Mb in size, and over the date for rotation I have, which is weekly. Do I have to restart services after logrotate has run? I dont really understand what it needs in the config file, but here is what the file currently looks like

Code:

# rotate log files weekly
weekly
#daily

# 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

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

notifempty
nomail
noolddir

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

# system-specific logs may be also be configured here.

/var/log/clam-update.log {
        monthly
        create
        rotate 12
}

/var/log/emerge.log {
        monthly
        create
        rotate 12
}

/var/log/ntp.log {
        monthly
        create
        rotate 12
}

/var/log/net-snmpd.log {
        monthly
        create
        rotate 12
}

/var/log/xferlog {
        monthly
        create
        rotate 12
}

/var/log/apache2/* {
        monthly
        create
        rotate 12
}

/var/log/mysql/* {
        monthly
        create
        rotate 12
}

/var/log/samba/* {
        monthly
        create
        rotate 12
}

/var/log/log.nmbd {
        monthly
        create
        rotate 12
}

/var/log/log.smbd {
        monthly
        create
        rotate 12
}

Any Help appreciated!!!!!

jib2 02-19-2004 05:02 AM

it happened to me too.
then i ran logrotate with the --force option from a terminal and everything got back to normal.

MaverickApollo 02-19-2004 12:00 PM

Do I need to stop and restart services after running their log files thru logrotate? Thats the bit I dont really understand

jib2 02-19-2004 12:09 PM

No you don't (well, i never did and it works just fine).


All times are GMT -5. The time now is 06:20 PM.