[GLLUG] Fedora Logrotate

Jan Henkins jan at henkins.za.net
Wed Nov 6 23:23:04 UTC 2013


Hello Mick,

On 06/11/13 18:47, Mick Farmer wrote:
> Dear GLLUGers,
>
> Yesterday I noticed that my log files haven't been rotated since March
> last year.  For example, here's just the system log set.
>
>   ls -l /var/log/messages*
> -rw-------  1 root root    368340 Nov  6 18:25 /var/log/messages
> -rw-------. 1 root root   1424138 Mar  4 2012 /var/log/messages-20120304
> -rw-------. 1 root root   1253862 Mar 11 2012 /var/log/messages-20120311
> -rw-------. 1 root root   1513071 Mar 19 2012 /var/log/messages-20120319
> -rw-------. 1 root root 116630092 Nov  5 9:46 /var/log/messages-20131105
>
> I immediately rotated them, as you can see from the large one rotated
> yesterday.
>
> I don't  know why logrotate stopped, but how do I ensure that it runs
> daily (it's in /etc/cron.daily)?

Check systemd whether crond is running, should look something like this 
(Fedora 19 in this case):


$ systemctl | grep crond
crond.service               loaded active running   Command Scheduler

If you don't see something like this, check whether you have cron 
installed (it would be *really* weird if you don't have it):

$ rpm -qa | grep cron
cronie-1.4.10-7.fc19.x86_64
cronie-anacron-1.4.10-7.fc19.x86_64
crontabs-1.11-5.20121102git.fc19.noarch

If you have the cron packages installed but you don't see it running in 
systemd, check the files installed by cron (in my case cronie, and you 
want to see the service file):

$ rpm -ql cronie
/etc/cron.d
[...snip...]
/lib/systemd/system/crond.service
[...snip...]

And then:

$ sudo systemctl enable crond.service
$ sudo systemctl start crond.service

End it off and see whether the crond,service is now running.

Hope this helps!

-- 

Regards,
Jan Henkins





More information about the GLLUG mailing list