Linux – sa2 -A /var/log/sa/sa13: No such file or directory

linuxsar

I have systat version 7.0.2 and the /etc/sysconfig/sysstat has the entry HISTORY=27, this is on a redhat enterprise server 5.6, the cron setup for this is

# run system activity accounting tool every minute
* * * * * root /usr/lib64/sa/sa1 1 1
# generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib64/sa/sa2 -A

I get the following error from the cron sa2 -A find: /var/log/sa/sa13: No such file or directory,

Looking at the directory /var/log/sa the files are created from sa01 through sa10 (sa1 created on sep1, sa2 created on sep2 and so on), then the rest of the files are from sa14 through to sa 31 (created from Aug 14 to Aug 31).

I have not made any changes on the server so I am not sure why I am getting these error messages and is there a way to fix this?. Someone suggested creating empty files from sa11 through sa14 to fix this but I am not sure if this might mess up something .

Best Answer

The reason this was happening was due to the cron script was being executed twice, sa2 deletes the old file and when it executes and the second time it was showing this error message as the file had already been deleted on the first run

Related Topic