vmstat - 仮想メモリーの統計情報の報告
vmstat [-ikpqQsSw] [-T u | d] [disks] [interval [count] [start_time]]
vmstat は、カーネルスレッド、仮想メモリー、ディスク、トラップ、および CPU アクティビティーに関連した仮想メモリーの統計情報を報告します。
MP (マルチプロセッサ) システムでは、vmstat は CPU の数を平均して出力します。プロセッサごとの統計情報については、mpstat(8) を参照してください。
vmstat は、特定のデバイスの統計情報のみをサポートしています。より一般的なシステム統計情報を取得するには、sar(1), iostat(8)、または sar(8) を使用してください。
オプションを指定しないと、vmstat は、システムがブートされてからの仮想メモリーアクティビティーのサマリーを 1 行で表示します。
カーネルステータスコマンドの実行中に、システムの state が変更されることがあります。関連する場合は、次のいずれかの形式の状態変更メッセージが vmstat の出力に含まれます。
<<device added: sd0>> <<device removed: sd0>> <<processors added: 1, 3>> <<processors removed: 1, 3>>
サポートしているオプションは、次のとおりです。
デバイスごとの割り込みの数を報告します。count と interval は、–i オプションには適用されません。
詳細なページングアクティビティーを報告します。このオプションでは、それぞれ次の情報が表示されます。
実行可能ファイルのページイン。
実行可能ファイルのページアウト。
実行可能ファイルのページフリー。
匿名のページイン。
匿名のページアウト。
匿名のページフリー。
ファイルシステムのページイン。
ファイルシステムのページアウト。
ファイルシステムのページフリー。
zone で実行され、プール機能がアクティブな場合は、上のすべてで、その zone のプールのプロセッサセット内のプロセッサに関するアクティビティーのみが報告されます。
状態変更に関連したメッセージを抑制します。
Do not print historical information as 1st line of output.
ブート時からのさまざまなシステムイベントの総数を表示します。count と interval は、–s オプションには適用されません。
ページングアクティビティーではなく、スワッピングに関して報告します。This option will change two fields in vmstat's paging display: rather than the ‘re’ and ‘mf’ fields, vmstat will report ‘si’ (swap-ins) and ‘so’ (swap-outs).
時間の内部表現の出力表現に u を指定します。time(2) を参照してください。 標準の日付フォーマットに d を指定します。date(1) を参照してください。
Wide display format.Headers will be more descriptive and two space gap is provided between each column.
Refer the examples section for sample outputs
Fall back to use the kstat(8) interfaces as the source of data.By default, the source of data is sstored(8)
次のオペランドがサポートされています。
Displays count operand reports only.Note that the count operand does not apply to the –i and –s options.
出力で優先順位を与えるディスクを指定します (1 行に収まるのは 4 つのディスクだけです)。一般的なディスク名は、id、sd、xd、または xy のあとに数字が付きます (たとえば、sd2、xd0 など)。
Reports each interval seconds.Note that interval operand does not apply to the –i and –s options.
Specifies the time at which to start querying the statistics.If available, sstore(1) queries historical statistics.The time operand accepts ISO8601 extended (%Y-%m-%dT%H:%M:%S) formatted times, specifically the UTC or local time forms.例:
2021-07-14T17:06:09Z (UTC time) 2015-07-14T16:06:09 (assumed to be local time)
When you specify the start_time operand, you must also specify the interval and count operands.
Note that the start_time does not apply to the –i, –s, and –k options.
次のコマンドは、システムで実行されている処理のサマリーを 5 秒ごとに表示します。
example% vmstat 5 kthr memory page disk faults cpu r b w swap free re mf pi p fr de sr s0 s1 s2 s3 in sy cs us sy id 0 0 0 11456 4120 1 41 19 1 3 0 2 0 4 0 0 48 112 130 4 14 82 0 0 1 10132 4280 0 4 44 0 0 0 0 0 23 0 0 211 230 144 3 35 62 0 0 1 10132 4616 0 0 20 0 0 0 0 0 19 0 0 150 172 146 3 33 64 0 0 1 10132 5292 0 0 9 0 0 0 0 0 21 0 0 165 105 130 1 21 78 1 1 1 10132 5496 0 0 5 0 0 0 0 0 23 0 0 183 92 134 1 20 79 1 0 1 10132 5564 0 0 25 0 0 0 0 0 18 0 0 131 231 116 4 34 62 1 0 1 10124 5412 0 0 37 0 0 0 0 0 22 0 0 166 179 118 1 33 67 1 0 1 10124 5236 0 0 24 0 0 0 0 0 14 0 0 109 243 113 4 56 39 ^C example%
vmstat の表示の各フィールドは次のとおりです。
次の 3 つの各状態にあるカーネルスレッドの数を報告します。
実行待ち行列にあるカーネルスレッドの数
リソース I/O、ページングなどを待機中のブロックされたカーネルスレッドの数
リソース処理の完了を待機中のスワップアウトされた軽量プロセス (LWP) の数
仮想メモリーと実メモリーの使用状況に関して報告します。
使用可能なスワップ空間 (K バイト)
空きリストのサイズ (K バイト)
ページフォルトおよびページングアクティビティーに関する情報を報告します。次の各アクティビティーに関する情報が 1 秒あたりの単位で表示されます。
ページの再利用。ただし、このフィールドの変更方法については –S オプションを参照してください。
マイナーフォルト。ただし、このフィールドの変更方法については –S オプションを参照してください。
ページインされた K バイト数
ページアウトされた K バイト数
解放された K バイト数
予測される短期間のメモリー不足 (K バイト)
クロックアルゴリズムによってスキャンされたページ数
When executed in a zone and if the pools facility is active, all of the above (except for ‘de’) only report activity on the processors in the processor set of the zone's pool.
1 秒あたりのディスク操作の数を報告します。1 文字と数字で示された、最大 4 つのディスクのスロットがあります。この文字はディスクのタイプ (s = SCSI、i = IPI など) を示し、数字は論理ユニット番号です。
トラップ/割り込み率 (1 秒あたり) を報告します。
割り込み
システムコール
CPU コンテキストスイッチ
zone で実行され、プール機能がアクティブな場合は、上のすべてで、その zone のプールのプロセッサセット内のプロセッサに関するアクティビティーのみが報告されます。
CPU 時間のパーセント使用状況の内訳を表示します。MP システムでは、これはすべてのプロセッサにわたる平均です。
ユーザー時間
システム時間
idle time
zone で実行され、プール機能がアクティブな場合は、上のすべてで、その zone のプールのプロセッサセット内のプロセッサに関するアクティビティーのみが報告されます。
example% vmstat -w Kernel_Threads Virtual_Memory Paging_Info Disk_Ops/s Faults_per_sec CPU_Usage Run Block Wait Swap(KBs) Free(KBs) Reclaim MinorFault PageIn PageOut Freed Def Scan s0 s1 s2 s3 Intr Syscal CPU_Sw User% Sys% Idle% Time 15 0 0 118713700 56911268 16274 141727 14 0 0 0 0 38 38 33 33 9496 129607 5687 21 8 72 Wed Dec 16 21:59:26 PST 2020使用例 3 vmstat wide display sample-2
example% vmstat -Sw Kernel_Threads Virtual_Memory Paging_Info Disk_Ops/s Faults_per_sec CPU_Usage Run Block Wait Swap(KBs) Free(KBs) SwapIn SwapOut PageIn PageOut Freed Def Scan s0 s1 s2 s3 Intr Syscal CPU_Sw User% Sys% Idle% Time 15 0 0 118714260 56911844 0 0 14 0 0 0 0 38 38 33 33 9496 129608 5687 21 8 72 Wed Dec 16 21:59:24 PST 2020使用例 4 vmstat wide display sample-3
example% vmstat -wp Virtual_Memory Paging_Info Executable Anonymous_Pages Filesystem Swap(KBs) Free(KBs) Reclaim MinorFault Freed Def Scan PageIn PageOut PageFree PageIn PageOut PageFree PageIn PageOut PageFree Time 114023436 52311932 17876 156365 0 0 0 0 0 0 3 0 0 10 0 0 Thu Dec 17 03:04:51 PST 2020使用例 5 vmstat viewing historical data
The following example shows how to create a report that contains historical statistics since 2021-September-27 06:11:04+05:30.The statistics are output every second for ten times.
example% vmstat 1 10 2021-09-27T6:11:04+5:30 kthr memory page disk faults cpu r b w swap free re mf pi po fr de sr vc -- -- -- in sy cs us sy id 0 0 0 3226613 1208475 1 1 0 0 0 0 0 0 0 0 0 464 87 382 0 0 100 0 0 0 3602720 1587608 0 0 0 0 0 0 0 0 0 0 0 518 304 464 0 0 100 2 0 0 3602720 1587608 0 0 0 0 0 0 0 0 0 0 0 485 305 400 0 0 100 0 0 0 3602720 1587608 0 0 0 0 0 0 0 0 0 0 0 510 307 384 0 0 100 0 0 0 3602720 1587608 0 0 0 0 0 0 0 0 0 0 0 501 306 420 0 0 100 1 0 0 3602720 1587608 0 0 0 0 0 0 0 0 0 0 0 522 317 433 0 0 99 1 0 0 3602720 1587608 0 0 0 0 0 0 0 0 0 0 0 511 311 412 0 0 100 0 0 0 3602720 1587608 0 0 0 0 0 0 0 0 0 0 0 471 303 382 0 0 100 1 0 0 3602720 1587608 0 0 0 0 0 0 0 0 0 0 0 502 308 413 0 0 100 0 0 0 3602720 1587608 0 0 0 0 0 0 0 0 0 0 0 470 302 396 0 0 100
属性についての詳細は、マニュアルページの attributes(7) を参照してください。
|
この呼び出しは開発中です。人間が読める形式の出力は不安定 (Unstable) です。
date(1), sar(1), time(2), attributes(7), iostat(8), mpstat(8), sar(8)
CPU 使用率の合計は、100 からわずかにずれることがあります。これは、割合を示す数字を生成するときの四捨五入エラーのためです。
カーネルゾーン (solaris-kz(7) を参照) などの一部の仮想化システムでは、ホストシステムによって横取りされる CPU 時間が原因で、報告される CPU 使用率の合計が 100 を下回ることがあります。mpstat(8) コマンドは横取りされた時間をレポートするために使用できます。
In order to view historical data via vmstat, the sstore collection vm-stats must have been enabled for the time period being observed. Refer to sstoreadm(1) for more information about enabling a sstore collection.