【Linux命令】iostat
NAMEiostat-Report Central Processing Unit (CPU) statistics and input/output statistics for devices, partitions and network filesystems (NFS).
SYNOPSIS
iostat [ -c ] [ -d ] [ -N ] [ -n ] [ -h ] [ -k | -m ] [ -t ] [ -V ] [ -x ] [ -y ] [ -z ] [ -j { ID |LABEL|PATH|
UUID | ... } [ device [...] | ALL ] ] [ device [...] | ALL ] [ -p [ device [,...] | ALL ] ] [ interval [ count ] ]
DESCRIPTION
Theiostatcommandisusedfor monitoring system input/output device loading by observing the time the devices are active in relation to their average transfer rates. The iostat command generates reports that canbe usedtochange system configuration to better balance the input/output load between physical disks.
When option -n is used, an NFS header row is displayed followedbyalineofstatisticsforeachnetwork
filesystem that is mounted.
Theintervalparameter specifies the amount of time in seconds between each report. The first report contains statistics for the time since system startup (boot), unless the -y option is used, when this report is omitted.Each subsequentreportcontainsstatistics collected during the interval since the previous report. The count parameter can be specified in conjunction with the interval parameter. If the count parameter is specified, the valueofcount determinesthenumberofreports generated at interval seconds apart. If the interval parameter is specified without the count parameter, the iostat command generates reports continuously.
REPORTS
The iostat command generates three types of reports, the CPU Utilization report, the Device Utilization report andthe Network Filesystem report.
CPU Utilization Report
Thefirst report generated by the iostat command is the CPU Utilization Report. For multiprocessor systems, the CPU values are global averages among all processors.The report has the following format: %user
Show the percentage of CPU utilization that occurred while executing at the user level (application).
%nice
Show the percentage of CPU utilization that occurred while executing at the user level withnicepriority.
%system
Show the percentage of CPU utilization that occurred while executing at the system level (kernel).
%iowait
Showthepercentageoftime that the CPU or CPUs were idle during which the system had an outstanding disk I/O request.
%steal
Show the percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was servicing another virtual processor.
%idle
Showthepercentageoftime that the CPU or CPUs were idle and the system did not have an outstandindisk I/O request.
Device Utilization Report(列出一部分)
tps
Indicatethe number of transfers per second that were issued to the device. A transfer is an I/O request
to the device. Multiple logical requests can be combined into a singleI/Orequesttothedevice.A
transfer is of indeterminate size.
rrqm/s
The number of read requests merged per second that were queued to the device.
wrqm/s
The number of write requests merged per second that were queued to the device.
avgrq-sz
The average size (in sectors) of the requests that were issued to the device.
avgqu-sz
The average queue length of the requests that were issued to the device.
await
Theaverage time (in milliseconds) for I/O requests issued to the device to be served. This includes the
time spent by the requests in queue and the time spent servicing them.
%util
Percentage of elapsed time during which I/O requests were issued to the device (bandwidth utilization for
the device). Device saturation occurs when this value is close to 100%.
OPTIONS
-c Display the CPU utilization report.
-d Display the device utilization report.
-k Displaystatisticsinkilobytesper second instead of blocks per second.Data displayed are valid only with kernels 2.4 and later.
-x Displayextendedstatistics.This option works with post 2.5 kernels since it needs /proc/diskstats file or a mounted sysfs to get the statistics. This option may also work with older kernels (e.g. 2.4)onlyifextended
statistics are available in /proc/partitions (the kernel needs to be patched for that).
页:
[1]