cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Cloud



Etc


Reference














.

os:linux:command:iostat.html



iostat : How to use iostat command in Linux with examples

Note

  • First time average of from the machine start-up

iostat Option

       -d     The -d option is exclusive of the -c option and displays only the device utilization report.
       -k     Display statistics in kilobytes per second instead of blocks per second.
       -t     Print the time for each report displayed.
       -x     Display  extended  statistics.


Example

$ iostat 1 2
Linux 2.6.18-274.el5 (myserver1)        11/09/15

avg-cpu:  %user   %nice %system %iowait  %steal   %idle                                  <- First time average of from the machine start-up
           0.11    0.22    8.08    0.02    0.00   91.57

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
sda               0.83        19.56         7.50     625971     240102
sda1              0.00         0.06         0.00       1967         14
sda2              0.82        19.44         7.50     621946     240088
sda3              0.00         0.05         0.00       1618          0

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.00    0.00    9.28    0.00    0.00   90.72

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
sda               0.00         0.00         0.00          0          0
sda1              0.00         0.00         0.00          0          0
sda2              0.00         0.00         0.00          0          0
sda3              0.00         0.00         0.00          0          0

$
$ iostat -xtk  1 2
Linux 2.6.18-274.el5 (myserver1)        11/09/15

Time: 17:24:45                                                              <- First time average of from the machine start-up
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.11    0.22    8.08    0.02    0.00   91.57

Device:         rrqm/s   wrqm/s   r/s   w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util
sda               0.24     0.55  0.44  0.39     9.77     3.75    32.75     0.00    3.08   1.10   0.09
sda1              0.05     0.00  0.00  0.00     0.03     0.00    23.58     0.00    2.12   2.04   0.00
sda2              0.17     0.55  0.44  0.39     9.71     3.75    32.77     0.00    3.09   1.10   0.09
sda3              0.02     0.00  0.00  0.00     0.03     0.00    52.19     0.00    0.94   0.77   0.00

Time: 17:24:46
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.00    0.00    7.14    0.00    0.00   92.86

Device:         rrqm/s   wrqm/s   r/s   w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util
sda               0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sda1              0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sda2              0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sda3              0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
$ iostat -dxtk 1 2
Linux 2.6.18-274.el5 (myserver1)        11/18/15

Time: 07:41:47                                                                <- First time average of from the machine start-up
Device:         rrqm/s   wrqm/s   r/s   w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util
sda              33.73    12.37 22.02 12.22   913.93    98.33    59.13     0.11    3.11   0.91   3.12
sda1              7.89     0.00  0.35  0.01     4.52     0.01    25.19     0.00    0.81   0.68   0.02
sda2             22.43    12.37 21.43 12.21   904.67    98.32    59.64     0.11    3.15   0.92   3.08
sda3              3.26     0.00  0.14  0.00     3.73     0.00    53.93     0.00    0.60   0.57   0.01

Time: 07:41:48
Device:         rrqm/s   wrqm/s   r/s   w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util
sda               0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sda1              0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sda2              0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sda3              0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00





Linux Commands Cheat Sheet




os/linux/command/iostat.html.txt ยท Last modified: 2021/03/04 by admin

Page Tools