logrotate tip of the day

David Kramer david-8uUts6sDVDvs2Lz0fTdYFQ at public.gmane.org
Tue Jan 12 22:40:21 EST 2010


I've know I've had logrotate issues for quite a while on my server.  My
/var/log files weren't being rotated properly.  But today I noticed
logrotate had been running for 3462:54, and was eating up about 60%-80%
of my CPU.  To rotate logfiles.

When you add your own logrotate rules, say to rotate files in
/home/david/log, DO NOT specify the wildcard as /home/david/log/*
instead of /home/david/log/*.log, as every gzipped archived log will
then also be rotated, and so on, and so on, and so on.

My server has been deleting *gz* for almost 20 minutes now.  Good times.





More information about the Discuss mailing list