LoginSignup
3
6

More than 3 years have passed since last update.

vmstatコマンドまとめ

Last updated at Posted at 2019-09-11

できること

メモリ,スワップ,CPU,IO(ブロック数)のシステム全体の確認
vmstat(virtual memory statisticsの略)

実行結果

使い方: vmstat [表示間隔秒] [更新回数]

最初の行:システムが起動してからの平均値が記載される。
2回目以降の行:各測定時の値が表示される
一般ユーザーで実行可能
memoryとcpuの項目はtopコマンドでも確認可能

$ vmstat 1 3
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 2  0   5896 137316      0 231524    0    0    23     8  260  450  1  1 98  0  0
 0  0   5896 137332      0 231524    0    0     0     4   33   73  0  0 100  0  0
 0  0   5896 137332      0 231524    0    0     0     0   29   51  0  0 100  0  0
表示項目 説明
r 実行待ちプロセス数
b スリープ(割り込み可能)のプロセス数
swpd スワップサイズ(KB)
free 空きメモリ(KB)
buff バッファメモリサイズ(KB)
cache キャッシュメモリサイズ(KB)
si ディスクからスワップインされているメモリサイズ(KB/秒)
so ディスクへスワップアウトされているメモリサイズ(KB/秒)
bi ブロックデバイスから受け取ったブロック数(ブロック/秒)
bo ブロックデバイスに送られたブロック数(ブロック/秒)
in 割り込み回数/秒
cs コンテキストスイッチ回数/秒
us ユーザプロセスのCPU使用時間割合
sy カーネルの  〃
id CPUがアイドル状態の時間割合
wa CPUがI/O待ちの〃
st ゲストOSがCPUを割り当てられなかった時間の割合

参考

Vmstat の出力結果はどのように解釈すれば良いですか?(Redhat HP)
https://access.redhat.com/ja/solutions/3054501

3
6
0

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
3
6