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.
Have you enabled it in:
/etc/default/sysstat
and made sure thatSA1_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
?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.
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:
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.
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 informationsee
man 8 sdac
- there is also the following important note: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 yousar -m FAN
orsar -m TEMP
output, you have to installlm-sensors
and runsensors-detect
successfully)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"