-g group_name { device [...] | ALL } Display statistics for a group of devices. The iostat command reports statistics for each individual device in the list then a line of global statistics for the group displayed as group_name and made up of all the devices in the list. The ALL keyword means that all the block devices defined by the system shall be included in the group.
-h Make the Device Utilization Report easier to read by a human.
-j { ID | LABEL | PATH | UUID | ... } [ device [...] | ALL ] Display persistent device names. Options ID, LABEL, etc. specify the type of the persistent name. These options are not limited, only prerequisite is that directory with required persistent names is present in /dev/disk. Optionally, multiple devices can be specified in the chosen persistent name type. Because persistent device names are usually long, option -h is enabled implicitly with this option.
-k Display statistics in kilobytes per second.
-m Display statistics in megabytes per second.
-N Display the registered device mapper names for any device mapper devices. Useful for viewing LVM2 statistics.
-p [ { device [,...] | ALL } ] The -p option displays statistics for block devices and all their partitions that are used by the system. If a device name is entered on the command line, then statistics for it and all its partitions are displayed. Last, the ALL keyword indicates that statistics have to be displayed for all the block devices and partitions defined by the system, including those that have never been used. If option -j is defined before this option, devices entered on the command line can be specified with the chosen persistent name type.
-T This option must be used with option -g and indicates that only global statistics for the group are to be displayed, andnot statistics for individual devices in the group.
-t Print the time for each report displayed. The timestamp format may depend on the value of the S_TIME_FORMAT environment variable (see below).
-V Print version number then exit.
-x Display extended statistics.
-y Omit first report with statistics since system boot, if displaying multiple records at given interval.
-z Tell iostat to omit output for any devices for which there was no activity during the sample period.
Device Utilization Report rrqm/s The numberofread requests merged per second that were queued tothe device.
wrqm/s The numberofwrite requests merged per second that were queued tothe device.
r/s The number (after merges) ofread requests completed per secondforthe device.
w/s The number (after merges) ofwrite requests completed per secondforthe device.
rsec/s (rkB/s, rMB/s) The numberof sectors (kilobytes, megabytes) readfromthe device per second.
wsec/s (wkB/s, wMB/s) The numberof sectors (kilobytes, megabytes) written tothe device per second.
avgrq-sz The average size (in sectors) ofthe requests that were issued tothe device.
avgqu-sz The average queue lengthofthe requests that were issued tothe device.
await The averagetime (inmilliseconds) for I/O requests issued tothe device to be served. This includes thetime spent bythe requests in queue andthetime spent servicing them.
r_await The averagetime (inmilliseconds) forread requests issued tothe device to be served. This includes thetime spent bythe requests in queue andthetime spent servicing them. w_await The averagetime (inmilliseconds) forwrite requests issued tothe device to be served. This includes thetime spent bythe requests in queue andthetime spent servicing them.
svctm The average service time (inmilliseconds) for I/O requests that were issued tothe device. Warning! Do not trust this field any more. This field will be removed ina future sysstat version.
%util Percentage of elapsed time during which I/O requests were issued tothe device (bandwidth utilization forthe device). Device saturation occurs when this value is closeto100%.
上面的英文应该还是挺容易明白的,其中重点需要关注的是下面几个指标:
avgrq-sz:每个 IO 的平均扇区数,即所有请求的平均大小,以扇区(512字节)为单位
avgqu-sz:平均意义上的请求队列长度
await:平均每个 I/O 花费的时间,包括在队列中等待时间以及磁盘控制器中真正处理的时间
svctm:每个 I/O 的服务时间。但注意上面的解释 Warning! Do not trust this field any more。iostat 中关于每个 I/O 的真实处理时间不可靠
The /proc/diskstats file displays the I/O statistics of block devices. Each line contains the following 14 fields: 1 - major number 2 - minor mumber 3 - device name 4 - reads completed successfully 5 - reads merged 6 - sectors read 7 - time spent reading (ms) 8 - writes completed 9 - writes merged 10 - sectors written 11 - time spent writing (ms) 12 - I/Os currently in progress 13 - time spent doing I/Os (ms) 14 - weighted time spent doing I/Os (ms)