4

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 .

user53925
  • 141
  • 1
  • 3
  • 7

2 Answers2

2

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

user53925
  • 141
  • 1
  • 3
  • 7
2

In my case (I had the same problem) I needed to create /var/log/sa/ directory manually. And after that all problems were gone. It's strange that *nix utilite cannot create a logging directory for itself, but still, that worked.

user1858864
  • 225
  • 2
  • 5
  • 13