Sometimes a logrotate process might take a lot of CPU resources. What could be wrong?

Article ID: 926 
Last Review: Oct,6 2008
Author: Maxim Kutov
Last updated by: system APPLIES TO:
  • Expand 1.x

Resolution

It might happen because Logrotate saves information about all the files ever processed inĀ  /var/lib/logrotate.status. If this file is too big, then, Logrotate spends a lot of time for reading and checking each entry. In this case you can clean up logrotate.status with the following command lines:

# grep -v '"/usr/local/expand/var/log/action/act_' /var/lib/logrotate.status > /var/lib/logrotate.status.new
# mv /var/lib/logrotate.status.new /var/lib/logrotate.status


Subscription for this article changesSubscription for this article changes

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
* - required fields