2

I collect performance data like this:

# Activity reports every 10 minutes everyday
*/10 * * * * root [ -x /usr/lib64/sa/sa1 ] && exec /usr/lib64/sa/sa1 -S ALL 1 1

# Update reports every 6 hours
55 5,11,17,23 * * *     root [ -x /usr/lib64/sa/sa2 ] && exec /usr/lib64/sa/sa2 -A

Two files get generated per day: saDD and sarDD

I tried to find the file type, but failed:

server:/var/log/sa # file 201906/sar26
201906/sar26: ASCII text

server:/var/log/sa # file 201906/sa26
201906/sa26: data

What are saXX and sarXX? What is the difference?

guettli
  • 1,309
  • 3
  • 22
  • 40

1 Answers1

5

The difference is that the sa files are specific data files that can only be read an interrogated using the sar package. If you want to extract and analyze data from sa files, use sar -f [filename].

The sar files are just ASCII files that can be read with anything you want (cat for example), so sar files can be directly analyzed, they don't need anything extra.

Overmind
  • 153
  • 7
  • In my cronjob (see question above) there is no `sar`. I guess `/usr/lib64/sa/sa2` is the equivalent. – guettli Jul 01 '19 at 07:39
  • /usr/lib64/sa/sa2 is used for daily reporting. Cron'ed, it will generate a daily report called /var/log/sa/sardd (where dd is the day). – Overmind Jul 01 '19 at 07:42
  • this is the answer I was looking for all over the internet. sa is the binary version of the output whereas sar is the human readable version of that – asgs May 18 '20 at 15:15