◆vmstat
メモリ使用量やCPU使用量を監視するコマンド
簡易マニュアル
[root@localhost ~]#vmstat --help
usage: vmstat [-V] [-n] [delay [count]]
-V prints version.
-n causes the headers not to be reprinted regularly.
-a print inactive/active page stats.
-d prints disk statistics
-D prints disk table
-p prints disk partition statistics
-s prints vm table
-m prints slabinfo
-S unit size
delay is the delay between updates in seconds.
unit size k:1000 K:1024 m:1000000 M:1048576 (default is K)
count is the number of updates.
使用例
[root@localhost ~]#vmstat 5 5
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 0 0 4588 27416 154684 0 0 21 10 1018 52 3 1 95 1 0
1 0 0 4900 27424 154460 0 0 97 74 1034 625 56 32 0 12 0
2 0 0 4196 27432 154952 0 0 89 73 1042 636 56 34 0 10 0
1 0 0 4828 27432 154584 0 0 96 71 1034 631 55 34 0 11 0
1 0 0 4284 27440 155056 0 0 87 123 1047 644 57 33 0 10 0
各項目の説明
procs
r 実行待ちプロセスの数
b 割り込み不可のスリープ状態にあるプロセス数
memory
swpd 仮想メモリの量
free 空きメモリの量
buff バッファに使用されているメモリ量
cache キャッシュに使用されているメモリ量
swap
si スワップインされているメモリ量 kb/s
so スワップアウトされているメモリ量 kb/s
io
bi ブロックデバイスに送られたブロック blocks/s
bo ブロックデバイスから受け取ったブロック blocks/s
system
in 1秒あたりの割り込み回数
cs 1秒あたりのコンテキストスイッチ回数
cpu
us cpu総時間に対するユーザ時間の割合
sy cpu総時間に対するシステム時間の割合
id cpu総時間に対するアイドル時間の割合
wa io待ち時間
st バーチャルマシンに使用されていた時間