CentOS 6.5 server has a cron job that converts system activity files to system activity reports once per day. Periodically, sometimes as a one-off, sometimes every day for a week or more, the cron job fails saying that the system activity file (e.g. /var/log/sa/sa07) for that day is invalid. Indeed on those days the sa file is indeed only a couple of hundred bytes (of header information, e.g. hostname and kernel version) instead of the normal 1.5-2 Meg of activity log.

So the cause appears to not be the cron job itself, but the fact that for the 24 hours leading up to the cron job the system activity daemon is not writing to the log correctly.

The only advice I can find elsewhere is to let it fix itself over time, which is does appear to do sooner or later, but I'd prefer a more solid solution that allows for system activity logs to not be lost for days or weeks at a time.

Does anybody know how to fix this behaviour?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.