LoginSignup
0

More than 3 years have passed since last update.

iostatコマンドまとめ

Posted at

できること

CPU使用状況とディスクIOの監視

実行結果

使い方: iostat [オプション] [表示間隔秒] [回数]

最初の行:システムが起動してからの平均値が記載される。
2回目以降の行:前回の表示との差分

オプション 説明
-c CPU情報(2,3行目)のみ表示
-d IO情報(4,5行目)のみ表示
-m MB単位で表示(デフォルトはKB単位)
-t 時間を表示
$ iostat 1 3
Linux 3.10.0-957.12.2.el7.x86_64 (bench)    2019年09月11日   _x86_64_    (1 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           1.09    0.00    1.09    0.02    0.00   97.80

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
sda               1.36        30.10         7.67     735163     187402

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

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
sda               0.00         0.00         0.00          0          0

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

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
sda               0.00         0.00         0.00          0          0

2,3行目
avg-cpu: %user %nice %system %iowait %steal %idle

cpuの表示項目についてはtopコマンドと同じ

4,5行目
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn

項目 説明
tps I/O転送リクエスト数
kB_read/s ディスクからの読み出し量(KB/秒)
kB_wrtn/s ディスクへの書き込み量(KB/秒)
kB_read ディスクからの読み出し量(KB)
kB_wrtn` ディスクへの書き込み量(KB)

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0