diskstat
Name
diskstat -- Collects disk-related information (including transfers speeds,
queue waits, and more).
Description
The diskstat module collects hard disk information that can help
system administrators judge the performance of their drives. Using
the RSP monitoring infrastructure, thresholds can be set to alert
administrators of low-performing (or high-load) disks. Using the
diskstat module with RSP, system administrators can fine-tune
their system IO devices to get the best performance possible.
On Linux, diskstat can use several different files to determine disk
statistics. Specifically, it first checks the "/proc/diskstats" file,
then, failing that, checks "/sys/block", and, if neither of the first
two files can be found, it checks "/proc/partitions". In order for
the diskstat module to function properly, one of these three files
must be readable by the module.
On the Solaris OS, disk statistics are gathered using the "kstat"
programming interface.
On Windows 2000/XP/2003, diskstat uses the Performance Data Helper
to gather statistics. Unfortunately diskstat is not available
on older Windows platforms as such disk information is not
available.
Configuration
There are many possible pieces of information which can be
gathered on each device on the machine. Diskstat
needs to be told which statistics should be gathered, and
on which devices.
All of the drives on a machine may not be readily apparent.
Diskstat can display a list of all devices by
running it independently of RSPD. Simply execute the
module with the "-l" or "--list" option, and a list of
all possible drives will be printed to standard output.
Most linux kernels allow for partitions as well as drives
to be checked, although all statistics may not be available.
Although possible in Windows, executing with "-l" should not
be necessary as all devices will appear a list within the
Configuration tab of DiskStat, inside the configuration window of RSPD
(see Chapter 2 for more information).
Windows users may select each statistic they want from checkboxes.
Editting of the config file is not neccesary but maybe be done anyway.
Diskstat is configured in rspd.conf by listing each requested statistic
with the corresponding device in parentheses. If no device
is given, a default device will be used. This default depends
on the system. In Windows it is "C:". In Linux it is "hda".
The default for Solaris is "dad0". The following example should
help make this clear.
# Example configuration for diskstat
config
{
# Check the following stats for the default device.
# Assuming we are running linux, this is "hda".
transfers/s = 1
reads/s = 1
writes/s = 1
# Check these stats for hdb
avgQueueLength(hdb) = 1
avgRequestSize(hdb) = 1
}
|
Each stat is treated as a boolean variable. Setting it to
"1" or "yes" or "true" tells diskstat to check the given
stat for the given device. If a statistic is not listed, or
if it is set to "0" or "no" or "false", then it is not checked.
Therefore it should only be necessary to set the statistics
that you want checked.
Most stats are available for all platforms, but some are
platform specific. Here is a list of all possible stats,
along with their descriptions and on which platforms they
are available.
transfers/s - Transfers per second (all platforms)
readsMerged/s - Read requests merged per second (Linux only)
writesMerged/s - Write requests merged per second (Linux only)
reads/s - Read requests per second (all platforms)
writes/s - Write requests per second (all platforms)
sectorsRead/s - Sectors read per second (all platforms)
sectorsWritten/s - Sectors written per second (all platforms)
kBRead/s - kB read per second (all platforms)
kBWritten/s - kB written per second (all platforms)
avgRequestSize - Average size (in sectors) of requests issued (kilobytes in Windows) (all platforms)
avgQueueLength - Average queue length of requests issued (all platforms)
avgActiveQueueLength - Average active queue length of requests issued (Solaris only)
avgTimeToServe - Average time (in milliseconds) for I/O requests to be served (Linux and Solaris only)
avgServiceTime - Average service time (in milliseconds) for I/O requests issued (all platforms)
utilPercent - Percentage of CPU time during which I/O requests were issued (all platforms)
splits/s - Split I/Os per second (Windows only)
Thresholds
The diskstat module also supports threshold warnings. To specify a
threshold, simply specify one of the statistics listed above
along with a drive (or none for default). This can then
be compared against a value using any of the basic logical
operators (==, !=, <, >, <=, >=). It should
be noted that for a stat to appear in a threshold, it must
have been set to be checked by diskstat, or else it won't
be available to use in thresholds.
Here are some sample thresholds for diskstat:
# Example thresholds for diskstat
thresh1.threshold = DiskStat.transfers/s > 50
thresh2.threshold = DiskStat.reads/s(dad0) < 5
thresh3.threshold = DiskStat.avgQueueLength >= 100 AND DiskStat.avgServiceTime >= 100
|
History Data
The diskstat module will save all disk-related statistics
which have been specified by the module's configuration.
This data, using the RSP History Viewer or RSP Web tools, can be
used to show trends in the
disk activity levels, helping systems administrators pinpoint
performance issues and spot trouble situations.