Where are my disk stats ?

8:24 PM

"On client X's servers, the SAR reports have statistics for each disk and partition. For client Y' servers, the SAR reports don't have any disk statistics. What gives?"
The sysstat package provides the sar, iostat, mpstat and utilities for collecting and displaying all kinds of OS statistics. Red Hat EL 4 ships version 5.0.5 of sysstat while Red Hat EL 5 ships version 7.0.5. In version 5.1.2 of sysstat, the disk statistics are no longer collected by the sadc program by default. You must specify the '-d' option to collect disk statistics.
"So, how do I fix this?"
Easy. Edit the /usr/lib/sa/sa1 script (/usr/lib64/sa/sa1 on 64-bit platforms) and add the '-d' switch to the sadc commands (2 places.) The resulting script should look like:
#!/bin/sh
# /usr/lib/sa/sa1.sh
# (C) 1999-2006 Sebastien Godard (sysstat <at> wanadoo.fr)
#
umask 0022
ENDIR=/usr/lib/sa
cd ${ENDIR}
if [ $# = 0 ]
then
# Note: Stats are written at the end of previous file *and* at the
# beginning of the new one (when there is a file rotation) only if
# outfile has been specified as '-' on the command line...
        exec ${ENDIR}/sadc -d -F -L 1 1 -
else
        exec ${ENDIR}/sadc -d -F -L $* -
fi

You Might Also Like

0 comments

Contact Form

Name

Email *

Message *

Translate

Wikipedia

Search results