Red Hat Bugzilla – Bug 133077
logrotate script may cause lost data
Last modified: 2007-11-30 17:07:04 EST
The default logrotate script for psacct may cause lost data.
The prerotate script calls 'accton' with no arguments which stops
logging of process accounting until the postrotate script is called.
Any processes that exit during this period will not be properly
I've tested and verified that if you have process accounting enabled,
then run 'accton' pointing to a new file, it will auotmatically switch
logging over with no period for processes to exit and not get
accounted for. The kernel's logging is to the inode and not the
filename, so it will follow a file if its moved. As such, I suggest
removing the 'prerotate' script from the default logrotate config.
I've tested this for a few weeks and it works without problem. I read
the logrotate code and verified that the log file compression takes
place after the postrotate script, so that won't cause any problems
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.