[CentOS] logrotate script not working

Thu Jan 8 03:07:15 UTC 2015
Mateusz Guz <Mateusz.Guz at itworks.pl>

Have u tried removing the 'weekly' directive?
You might consider replacing size with maxsize (details below)

maxsize size
Log files are rotated when they grow bigger than size bytes even before the additionally specified time interval (daily, weekly, monthly, or yearly). The related size option is similar except that it is mutually exclusive with the time interval options, and it causes log files to be rotated without regard for the last rotation time. When maxsize is used, both the size and timestamp of a log file are considered.


-----Original Message-----
From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On Behalf Of Tim Dunphy
Sent: Thursday, January 08, 2015 3:55 AM
To: CentOS mailing list
Subject: [CentOS] logrotate script not working

Hey guys,

 Got a quick question and I hope this is an easy one!

 In my /etc/logrotate.conf file I have the following entry:

 # rotate all of the apache logs  -- we'll rotate them here
/var/log/mysqld.log  {
    weekly
    size  50M
    create 0644 mysql mysql
    rotate 1
}

And from that I would expect the log to rotate when it reaches 50M in size.
However I just caught that log weighing in at 356MB!!  So how can I get
this log file to rotate when it hits 50MB?

Any ideas, advice and help at all would be appreciated.

Thanks
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
_______________________________________________
CentOS mailing list
CentOS at centos.org
http://lists.centos.org/mailman/listinfo/centos