vmstatreportsinformation about processes, memory, paging, block IO,
traps, and cpu activity.
The first report produced gives averages since the last reboot.Addi-
tionalreportsgive information on a sampling period of length delay.
The process and memory reports are instantaneous in either case.
命令語法:
vmstat [-a] [-n] [-S unit] [delay [ count]]
vmstat [-s] [-n] [-S unit]
vmstat [-m] [-n] [delay [ count]]
vmstat [-d] [-n] [delay [ count]]
vmstat [-p disk partition] [-n] [delay [ count]]
vmstat [-f]
vmstat [-V]
命令參數:
此命令參數是Red Hat Enterprise Linux Server release 5.7下vmstat命令參數,不同版本Linux的cp命令參數有可能不同。不過預設應該都是[ delay [count ] ] ,delay是間隔,count顯示多少次信息。可以和上面的某些參數結合使用。
參數
英文描述
描敘
delay
刷新時間間隔。如果不指定,只顯示一條結果。
count
刷新次數。如果不指定刷新次數,但指定了刷新時間間隔,這時刷新次數為無窮。
-a
The -a switch displays active/inactive memory, given a 2.5.41 kernel or better.
開啟顯示active/inactive memory。
-f
The -f switch displays the number of forks since boot.This includes the fork, vfork,andclonesystem calls,and is equivalent to the total number of tasks created. Each process is represented by one or more tasks, depending on thread usage.This display does not repeat.
顯示此系統啟動以來的forks的總數,包括fork、vfork和clone system calls
-m
The -m displays slabinfo
顯示slabinfo信息
-n
The -n switch causes the header to be displayed only once rather than periodically.
只顯示頭信息,不周期性顯示.也就是說開啟這個參數,只顯示頭部信息一次。
-s
The -s switch displays a table of various event counters and memory statistics. This display does not repeat.
顯示各種事件計數器表和記憶體統計信息,這顯示不重覆。
-d
The -d reports disk statistics (2.5.70 or above required)
顯示磁碟統計數據(內核要求2.5.70 或以上)
-w
The -w enlarges field width for big memory sizes
可以擴大欄位長度,當記憶體較大時,預設長度不夠完全展示記憶體。
-p
The -p followed by some partition name for detailed statistics (2.5.70 or above required)
顯示磁碟分區數據(disk partition statistics )
-S
The -S followed by k or K or m or M switches outputs between 1000, 1024, 1000000, or 1048576 bytes