Friday, September 18, 2009

Fedora 11: high CPU utilization, logrotate

I had a problem with my Fedora 11 system suddenly shooting into 100% CPU utilization. Looking at top, the culprit was a perl script, and tracing back up the process tree its parent was logrotate. After some searching, it turned out that the size of my /var/log/messages file had got way out of control – 5.5Gb. I thought the whole point of logrotate was to stop that sort of thing happening. Anyhoo, removing /var/log/messages, and /var/cache/logrotate/*, then kill -hup'ing the wayward perl process has restored CPU sanity to my system. I've added a size limit to /etc/logrotate.conf to try to ensure that it doesn't recur, though I'm still not quite sure how it got so bad in the first place. fedora, linux, cpu, system-maintenance