General use of the Iostat command to monitor I/O performance
1.iostat command List of available parameters:
OPTIONS-C Display The CPU Utilization report. -d Display The device Utilization report. -H make the NFS report displayed by option-n easier to read by a human. -K Display StatisticsinchKilobytes per second instead of blocks per second. Data displayed is valid only with kernels2.4and later. -M Display StatisticsinchMegabytes per second instead of blocks or kilobytes per second. Data displayed is valid only with ker-Nels2.4and later. -N Display the registered device mapper names forAny device mapper devices. Useful forviewing LVM2 statistics. -N Display the network filesystem (NFS) report. This option works with kernel2.6. -and later. -P [{device [,...] |All }] the-P option displays statistics forblock devices and all their partitions is used by the system. If a device name is entered on the command line, ThenStatistics forIt and all its partitions is displayed. Last, the all keyword indicates that statistics has to be displayed forAll the blocks devices and partitions defined by the system, including those that has never been us Ed. Note that the This option works only with post2.5Kernels. -T Print the Time forEach report displayed. The timestamp format may depend on the value of the S_time_format environment vari-able (see below). -V Print version number Thenexit. -X Display extended statistics. This option works with post2.5Kernels since it needs/proc/diskstatsfileor a mounted sysfs to get the statistics. This option is also work with older kernels (e.g.2.4) onlyifExtended Statistics is availableinch/proc/partitions (the kernel needs to be patched forThat ). -Z tell Iostat to omit output forAny devices for whichThere was no activity during the sample period.
Examples of 2.iostat common parameters:
iostat-d-x-k 1 10
$ iostat-d-x-k1 TenLinux2.6. +-358. el6.x86_64 (Vnode1) February 25, 2015 _x86_64_ ( -CPU) DEVICE:RRQM/s wrqm/s r/sW/s rkb/s wkb/s avgrq-sz Avgqu-sz await SVCTM%UTILSDA7.23 2923.45 111.97 158.24 4305.81 12331.61 123.14 0.42 1.53 1.55 41.99DEVICE:RRQM/s wrqm/s r/sW/s rkb/s wkb/s avgrq-sz Avgqu-sz await SVCTM%UTILSDA0.00 0.00 1313.00 0.00 38884.00 0.00 59.23 13.14 10.14 0.76 100.10DEVICE:RRQM/s wrqm/s r/sW/s rkb/s wkb/s avgrq-sz Avgqu-sz await SVCTM%UTILSDA0.00 19604.00 587.00 361.00 8380.00 55624.00 135.03 80.47 64.34 1.05 100.00DEVICE:RRQM/s wrqm/s r/sW/s rkb/s wkb/s avgrq-sz Avgqu-sz await SVCTM%UTILSDA1.00 11641.00 93.00 1079.00 4436.00 67312.00 122.44 143.71 119.34 0.85 100.00DEVICE:RRQM/s wrqm/s r/sW/s rkb/s wkb/s avgrq-sz Avgqu-sz await SVCTM%UTILSDA0.00 12925.00 91.00 1036.00 6612.00 54072.00 107.69 142.63 133.53 0.89 100.00DEVICE:RRQM/s wrqm/s r/sW/s rkb/s wkb/s avgrq-sz Avgqu-sz await SVCTM%UTILSDA0.00 15597.00 66.00 1101.00 3284.00 69080.00 124.02 142.49 124.61 0.86 100.00DEVICE:RRQM/s wrqm/s r/sW/s rkb/s wkb/s avgrq-sz Avgqu-sz await SVCTM%UTILSDA4.00 6834.00 326.00 766.00 10532.00 37696.00 88.33 75.73 80.81 0.92 100.00DEVICE:RRQM/s wrqm/s r/sW/s rkb/s wkb/s avgrq-sz Avgqu-sz await SVCTM%UTILSDA0.00 7322.00 417.00 331.00 6796.00 22568.00 78.51 65.42 68.01 1.34 100.00DEVICE:RRQM/s wrqm/s r/sW/s rkb/s wkb/s avgrq-sz Avgqu-sz await SVCTM%UTILSDA0.00 12862.00 80.00 1464.00 1424.00 63416.00 83.99 121.29 87.37 0.65 100.00DEVICE:RRQM/s wrqm/s r/sW/s rkb/s wkb/s avgrq-sz Avgqu-sz await SVCTM%UTILSDA0.00 0.00 857.00 10.00 12512.00 1972.00 33.41 11.65 14.53 1.15 100.00
Iostat-d-K 1 10
$ iostat-d-K1 TenLinux2.6. +-358. el6.x86_64 (Vnode1) February 25, 2015 _x86_64_ ( -CPU) Device:tps Kb_read/s kb_wrtn/s Kb_read kb_wrtnsda270.40 4306.84 12331.65 23370851441 66917123180Device:tps Kb_read/s kb_wrtn/s Kb_read kb_wrtnsda812.00 35820.00 56.00 35820 AboutDevice:tps Kb_read/s kb_wrtn/s Kb_read kb_wrtnsda1175.00 24940.00 508.00 24940 508Device:tps Kb_read/s kb_wrtn/s Kb_read kb_wrtnsda910.00 10056.00 12224.00 10056 12224Device:tps Kb_read/s kb_wrtn/s Kb_read kb_wrtnsda733.00 2672.00 20064.00 2672 20064Device:tps Kb_read/s kb_wrtn/s Kb_read kb_wrtnsda836.00 712.00 10456.00 712 10456Device:tps Kb_read/s kb_wrtn/s Kb_read kb_wrtnsda995.00 604.00 13052.00 604 13052Device:tps Kb_read/s kb_wrtn/s Kb_read kb_wrtnsda966.00 104.00 14264.00 104 14264Device:tps Kb_read/s kb_wrtn/s Kb_read kb_wrtnsda811.00 268.00 19728.00 268 19728Device:tps Kb_read/s kb_wrtn/s Kb_read kb_wrtnsda1056.00 124.00 16788.00 124 16788
More instructions on the Iostat command can be found in the reprinted article: http://www.cnblogs.com/jyzhao/articles/4299419.html
IO Performance monitoring for Linux