Linux iostat command

Source: Internet
Author: User

The Linux iostat command iostat is used to output statistics related to CPU and disk I/O. command syntax: www.2cto.com iostat [-c |-d] [-k |-m] [-t] [-V] [-x] [device [...] | ALL] [-p [device | ALL] [interval [count] Description of iostat parameters:-c only displays CPU statistics. mutually Exclusive with the-d option. -d only Displays disk statistics. mutually Exclusive with the-c option. -k indicates the number of disk requests per second in K. The default unit is block. -p device | ALL and-x options are mutually exclusive, used to display the statistics of Block devices and system partitions. you can also specify a device name after-p, for example, www.2cto.com # iostat-p hda or display ALL devices # iostat-p ALL-t when outputting data, print the data collection time. -V: print the version number and help information. -x output extension information. common usage iostat-d-k 1 10 # view TPS and throughput information iostat-d-x-k 1 10 # view device usage (% util), response time (await) iostat-c 1 10 # view cpu status 1. Use iostat directly as follows: [html] [root @ c1 ~] # Iostat Linux 2.6.18-164. el5 (c1) 03/01/2013 avg-cpu: % user % nice % system % iowait % steal % idle 3.16 0.05 10.26 5.71 Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn sda 28.26 1311.15 129.20 582688 57418 1.34 sda1 5.38 0.02 2389 10 sda2 26.86 1305.12 129.18 580010 sdb 57408 4.30 517.47 1.04 sdc 229969 463 1.54 10.35 0.14 64 sdc1 0.50 6.13 0.14 2726 64 sdd 0.71 5.50 1.10 2443 Sdd1 0.29 1.21 1.10 538 488 sde 2.46 41.10 7.92 18265 3520 sdf 0.21 2.20 0.16 977 72 sdg 9.35 26.15 2.48 11623 1104 sdg1 0.45 0.98 0.00 437 0 sdg2 0.01 0.01 0.00 5 0 sdg5 0.59 1.29 1.13 574 504 sdg6 0.48 2.12 0.11 942 48 sdg7 0.54 1.09 1.10 486 sdg8 488 0.43 1.11 0.14 64 sdg9 494 0.41 0.98 0.00 0 sdg10 437 0.43 0.89 0.00 0 dm-0 397 62.34 1858.20 138.30 dm-1 825802 2.02 0.00 896 0 hdc 0. 03 0.32 0.00 144 0 meaning: avg-cpu segment: % user: Percentage of CPU used for running at the user level. % nice: CPU time consumed by the priority process, percentage of all CPUs. % system: Percentage of CPU used to run at the system level (kernel. % iowait: CPU usage when the CPU waits for hardware I/O. % steal: Percentage of unconscious waiting time of the virtual CPU when the hypervisor maintains another virtual processor. % Idle: Percentage of idle CPU time. device segment: tps: the number of I/O requests sent per second. blk_read/s: number of blocks read per second. blk_wrtn/s: number of blocks written per second. blk_read: Total number of blocks read from startup to now. blk_wrtn: Total number of blocks written since startup. 2. iostat-d-k 1 1 uses the following parameter:-d indicates that the device (Disk) Usage Status (that is, the avg-cpu segment information is not displayed ); -k: Kilobytes is used as the unit in some major systems that use block as the unit. 1 indicates that the data is refreshed once every 1 second and displayed once in total. [Css] [root @ c1 ~] # Iostat-d-k 1 1 Linux 2.6.18-164. el5 (c1) 03/01/2013 Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn sda 6.73 104.39 20.59 341903 67437 0.18 sda1 0.37 0.00 1197 5 sda2 6.54 103.98 20.59 340561 sdb 67432 0.93 36.44 0.16 sdc 119344 531 0.21 0.70 0.01 32 sdc1 0.07 0.42 0.01 1363 32 sdd 0.38 0.37 1.23 1221 4016 sdd1 0.33 0.08 1.23 269 4016 sde 0.93 3.42 2.78 11200 9092 sdf 0.03 0.15 0.01 36 Sdg 1.84 1.77 2.47 5811 8096 sdg1 0.06 0.07 0.00 218 0 sdg2 0.00 0.00 0.00 2 0 sdg5 0.37 0.09 1.23 287 4024 sdg6 0.07 0.14 0.01 24 sdg7 471 0.36 0.07 1.23 sdg8 243 4016 0.06 0.08 247 32 sdg9 0.06 0.07 0.00 218 0 sdg10 0.06 0.06 0.00 198 0 dm-0 14.42 143.46 23.54 dm-1 469885 77091 0.03 0.14 0.00 0 hdc 448 0.00 0.02 72 0 3, iostat-x 11 for use [javascript] [root @ c1 ~] # Iostat-x 1 1 Linux 2.6.18-164. el5 (c1) 03/01/2013 avg-cpu: % user % nice % system % iowait % steal % idle 0.49 0.03 1.60 1.11 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm % util sda 2.29 2.93 3.96 1.72 170.80 37.20 36.60 0.03 5.01 2.42 1.38 sda1 0.15 0.00 0.15 0.00 0.60 0.00 4.02 0.00 0.74 0.61 0.01 sda2 2.14 2.93 3.81 1.72 170.13 37.20 37.51 0.03 5.13 2.47 1.37 Sdb 0.12 0.00 0.73 0.04 59.62 0.31 78.33 0.01 8.91 4.52 0.35 sdc 0.02 0.00 0.17 0.00 1.15 0.02 6.80 0.00 0.46 0.37 sdc1 0.01 0.00 0.00 0.05 0.00 0.68 0.02 12.57 0.00 1.10 sdd 0.86 0.00 0.01 0.00 0.31 0.61 2.49 8.27 0.00 0.84 0.82 0.03 sdd1 0.00 0.00 0.02 0.31 0.13 2.49 8.01 0.00 0.89 0.88 0.03 sde 0.01 0.14 0.31 0.54 5.64 5.45 12.98 0.00 3.29 sdf 2.16 0.18 0.00 0.00 0.02 0.00 0.24 0.02 11.28 0.00 2.49 2.38 0.01 sdg 0.16 0.00 1.00 0.63 2.90 5.01 4.86 0.00 0.84 0.45 sdg1 0.07 0.00 0.00 0.05 0.00 0.11 0.00 2.21 0.00 0.07 sdg2 0.07 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.67 0.00 0.00 0.00 sdg5 0.01 0.00 0.05 0.31 0.14 2.49 7.29 0.00 1.50 1.50 0.05 sdg6 0.00 0.00 0.05 0.00 0.24 0.01 4.65 0.00 0.49 0.49 sdg7 0.00 0.01 0.00 0.05 0.31 0.12 2.49 7.33 0.00 1.10 sdg8 1.10 0.04 0.01 0.00 0.05 0. 00 0.12 0.02 2.89 0.00 0.69 0.69 0.00 sdg9 0.00 0.00 0.05 0.00 0.11 0.00 2.38 0.00 0.48 0.48 0.00 sdg10 0.00 0.00 0.05 0.00 0.10 0.00 2.06 0.00 dm-0 0.24 0.24 0.00 0.00 0.00 6.98 5.37 0.07 6.01 1.37 1.69 dm-1 0.00 0.00 0.03 0.00 0.22 0.00 8.00 0.00 10.86 0.47 hdc 0.00 0.01 0.00 0.00 0.00 0.04 0.00 11.08 0.00 1.77 1.46 meaning rrqm/s: the number of merge read operations per second. That is, delta (rmerge)/swrqm/s: Number of merge write operations per second. That is, delta (wmerge)/s r/s: The number of read I/O devices per second. That is, delta (rio)/sw/s: the number of write I/O devices completed per second. That is, delta (wio)/s rsec/s: Number of read sectors per second. That is, delta (rsect)/swsec/s: Number of write sectors per second. That is, delta (wsect)/s avgrq-sz: average data size (slice) of each device I/O operation ). That is, delta (rsect + wsect)/delta (rio + wio) avgqu-sz: Average I/O queue length. That is, delta (aveq)/s/1000 (because aveq is measured in milliseconds ). Await: average wait time (in milliseconds) for each device I/O operation ). That is, delta (ruse + wuse)/delta (rio + wio) svctm: Average service time per device I/O operation (MS ). That is, delta (use)/delta (rio + wio) % util: the percentage of time in one second for I/O operations, or the number of I/O queues in one second is not empty. That is, delta (use)/s/1000 (because the Unit of use is millisecond) If % util is close to 100%, it indicates that too many I/O requests are generated and the I/O system is fully loaded, this disk may have a bottleneck. 4. Use [php] [root @ c1 ~] For iostat-c 1 2 # Iostat-c 1 2 Linux 2.6.18-164. el5 (c1) 03/01/2013 avg-cpu: % user % nice % system % iowait % steal % idle 0.44 0.02 1.37 0.91 0.00 avg-cpu: % user % nice % system % iowait % steal % idle 0.00 0.00 0.00 0.00 0.00

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.