3

When I run sar -d I receive the error message:

Requested activities not available in file /var/log/sysstat/sa24

The file does exist, and I can run sar with other flags, but can't see these particular metrics. Is there something I need to enable in sysstat to collect what I need to see this report?

Server is Ubuntu 9.04.

5 Answers 5

3

Have you enabled it in: /etc/default/sysstat and made sure that SA1_OPTIONS="-S DISK" is not commented out?

Since you said you can get other information, I assume it is started it with /etc/init.d/sysstat start?

3
  • I did start sysstat with /etc/init.d/sysstat start, and /etc/default/sysstat contains the lines: ENABLED="true" SA1_OPTIONS="-S DISK" SA2_OPTIONS="" Maybe there ore other options I should have in SA1_OPTIONS or SA2_OPTIONS?
    – Ryan Olson
    May 24, 2010 at 19:18
  • That all works with my workstation (non-server). Maybe try stopping sysstat, moving the sa24 file somewhere else, and restarting sysstat? Perhaps your io device is a little bit non-standard and is not in sysstat.ioconf ? May 24, 2010 at 19:22
  • I just tried this on a testing Ubuntu Server VM I have to make sure that there weren't any issues with apparmour but there weren't any. All I had to do was make the appropriate changes in /etc/default/sysstat and run sudo /etc/init.d/sysstat start May 24, 2010 at 19:48
1

Can't speak for ubuntu but for red hat you have to change how it collects data in /usr/crond./sysstat:

from: /usr/lib/sa/sa1 1 1

to: /usr/lib/sa/sa1 -d 1 1

The -d says to collect disk stats. sa1 just calls /usr/lib/sa/sadc, if you want to see the doc for it do a man sadc.

This change doesn't take affect until the next time sa2 runs (I think). I always set it and then it starts collecting and working the next day.

1

I think sar -d is activated as default on Red Hat Enterprise Linux 6+ but not on 5 (I don't know about other distributions).

On RHEL 6 I edited a line in /etc/cron.d/sysstat to contain the "-d" option:

*/10 * * * * root /usr/lib64/sa/sa1 -d 1 1

Note: the "-S DISK" option, which is the default in RHEL 6+ (sysstat-9.0.4-18) did not work for RHEL 5 (sysstat-7.0.2-11).

The additional data is collected as soon as a new sa file is created the next day. If you are in a hurry, you could probably just delete today's sa file under /var/log/sa - but I did not try that out myself.

1

in debian based systems you have to set SA1_OPTIONS="-S DISK -S POWER -S ..." in /etc/sysstat/sysstat

You can also set -S XALL to collect all information

see man 8 sdac - there is also the following important note:

Important note: The activities (including optional ones) saved in an existing data file prevail over those selected with option -S. As a consequence, appending data to an existing data file will result in option -S being ignored.

Meaning, if todays sysstat-file already exists (e.g.: /var/log/sysstat/sa17) you have to remove that file first. So that sysstat can fill the new file with the additional information from -S DISK

(you could create a file manually with sdac, but deleting todays sysstat file ist easier)

(sidenote: to use -S POWER which will give you sar -m FAN or sar -m TEMP output, you have to install lm-sensors and run sensors-detect successfully)

0

there is no file :sysstat in the /etc/init/d directory, the ekernel version is 2.6.18-164.el5 and the sar -d is not working:"Requested activities not available in file /var/log/sa/sa11"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .