vmstat [options] [delay [count]]
选件
delay
|
更新之间的延迟(以秒为单位)。如果未指定任何延迟,则自引导以来仅打印一份报告,其中包含平均值。
|
count
|
更新次数。在没有count的情况下,定义延迟时,默认值为无限。
|
-a,-- active
|
给定2.5.41或更高版本的内核,显示活动和非活动内存。
|
-f,-- forks
|
的-f开关显示器的数量叉自引导,其包括fork,vfork,并且clone系统调用,并且等同于总数任务创建。每个进程由一个或多个任务表示,具体取决于线程的使用情况。该显示不会重复。
|
-m,-- slabs
|
显示/ proc / slabinfo的内容。
|
-n,--one-header
|
仅显示一次标题,而不是定期显示。
|
-s,-- stats
|
显示各种事件计数器和内存统计信息的表。该显示不会重复。
|
-d,-- disk
|
报告磁盘统计信息(需要2.5.70或更高版本)。
|
-D,-- disk-sum
|
报告有关磁盘活动的一些摘要统计信息。
|
-p,--partition device
|
有关分区的详细统计信息(需要2.5.70或更高版本的内核)。
|
-S,--unit character
|
在1000(k),1024(K),1000000(m)或1048576(M)字节之间切换输出。请注意,这不会更改交换(si / so)或块(bi / bo)字段。
|
-V,-- version
|
显示版本信息并退出。
|
-h,--help
|
显示帮助并退出。
|
VM模式的字段说明
程序:
r
|
等待运行时间的进程数。
|
b
|
不间断睡眠中的进程数。
|
记忆:
swpd
|
使用的虚拟内存量。
|
free
|
空闲内存量。
|
buff
|
用作缓冲区的内存量。
|
cache
|
用作高速缓存的内存量。
|
inact
|
非活动内存量。(-a选项)。
|
active
|
活动内存量。(-a选项)。
|
交换:
si
|
从磁盘交换的内存量(每秒)。
|
so
|
交换到磁盘的内存量(每秒)。
|
IO:
bi
|
从块设备接收的块(每秒块)。
|
bo
|
发送到块设备的块(块/秒)。
|
系统:
in
|
每秒的中断数,包括时钟。
|
cs
|
每秒上下文切换数。
|
CPU:(以CPU时间百分比表示的值)
us
|
运行非内核代码所花费的时间。(用户时间,包括美好时光)
|
sy
|
运行内核代码所花费的时间。(系统时间)
|
id
|
闲置的时间。在Linux 2.5.41之前的版本中,这包括IO等待时间。
|
wa
|
等待IO所花费的时间。在Linux 2.5.41之前,包含在闲置中。
|
st
|
从虚拟机窃取的时间。在Linux 2.6.11之前,未知。
|
磁盘模式的字段说明
读:
total
|
总读取成功完成
|
merged
|
分组读取(导致一个I / O)
|
sectors
|
部门阅读成功
|
ms
|
花费的毫秒数
|
写道:
total
|
总写入成功完成
|
merged
|
分组写入(导致一个I / O)
|
sectors
|
部门成功写作
|
ms
|
写作花费的毫秒数
|
IO:
CUR
|
I / O进行中
|
s
|
I / O花费的秒数
|
磁盘分区模式的字段说明
reads
|
颁发给该分区的读取总数
|
read sectors
|
分区的总读取扇区
|
writes
|
颁发给该分区的写总数
|
requested writes
|
分区的写入请求总数
|
平板模式的字段说明
cache
|
缓存名称
|
num
|
当前活动对象的数量
|
total
|
可用对象总数
|
size
|
每个对象的大小
|
pages
|
具有至少一个活动对象的页面数
|
笔记
vmstat不需要特殊权限。
Linux vmstat不会将自己视为正在运行的进程。
当前所有的Linux块都是1024字节。旧内核可能报告的块为512字节,2048字节或4096字节。
vmstat允许您选择单位:(k,1000字节;K,1024字节;m,1000000字节;M,1048576字节)。在默认模式下,默认值为K。
vmstat使用slabinfo 1.1。
档案
/ proc / meminfo
/ proc / stat
/ proc / * / stat
vmstat [options] [delay [count]]
Options
delay
|
The delay between updates in seconds. If no delay is specified, only one report is printed with the average values since boot.
|
count
|
Number of updates. In absence of count, when delay is defined, default is infinite.
|
-a, --active
|
Display active and inactive memory, given a 2.5.41 kernel or newer.
|
-f, --forks
|
The -f switch displays the number of forks since boot, which includes the fork, vfork, and clone system 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.
|
-m, --slabs
|
Displays the contents of /proc/slabinfo.
|
-n, --one-header
|
Display the header only once rather than periodically.
|
-s, --stats
|
Displays a table of various event counters and memory statistics. This display does not repeat.
|
-d, --disk
|
Report disk statistics (2.5.70 or above required).
|
-D, --disk-sum
|
Report some summary statistics about disk activity.
|
-p, --partition device
|
Detailed statistics about partition (kernel 2.5.70 or above required).
|
-S, --unit character
|
Switches outputs between 1000 (k), 1024 (K), 1000000 (m), or 1048576 (M) bytes. Note this does not change the swap (si/so) or block (bi/bo) fields.
|
-V, --version
|
Display version information and exit.
|
-h, --help
|
Display help and exit.
|
Field Description For VM Mode
Procs:
r
|
The number of processes waiting for run time.
|
b
|
The number of processes in uninterruptible sleep.
|
Memory:
swpd
|
The amount of virtual memory used.
|
free
|
The amount of idle memory.
|
buff
|
The amount of memory used as buffers.
|
cache
|
The amount of memory used as cache.
|
inact
|
The amount of inactive memory. (-a option).
|
active
|
The amount of active memory. (-a option).
|
Swap:
si
|
Amount of memory swapped in from disk (per second).
|
so
|
Amount of memory swapped to disk (per second).
|
IO:
bi
|
Blocks received from a block device (blocks per second).
|
bo
|
Blocks sent to a block device (blocks/s).
|
System:
in
|
The number of interrupts per second, including the clock.
|
cs
|
The number of context switches per second.
|
CPU: (values expressed in percentages of CPU time)
us
|
Time spent running non-kernel code. (user time, including nice time)
|
sy
|
Time spent running kernel code. (system time)
|
id
|
Time spent idle. Prior to Linux 2.5.41, this includes IO-wait time.
|
wa
|
Time spent waiting for IO. Prior to Linux 2.5.41, included in idle.
|
st
|
Time stolen from a virtual machine. Prior to Linux 2.6.11, unknown.
|
Field Description For Disk Mode
Reads:
total
|
Total reads completed successfully
|
merged
|
grouped reads (resulting in one I/O)
|
sectors
|
Sectors read successfully
|
ms
|
milliseconds spent reading
|
Writes:
total
|
Total writes completed successfully
|
merged
|
grouped writes (resulting in one I/O)
|
sectors
|
Sectors written successfully
|
ms
|
milliseconds spent writing
|
IO:
cur
|
I/O in progress
|
s
|
seconds spent for I/O
|
Field Description For Disk Partition Mode
reads
|
Total number of reads issued to this partition
|
read sectors
|
Total read sectors for partition
|
writes
|
Total number of writes issued to this partition
|
requested writes
|
Total number of write requests made for partition
|
Field Description For Slab Mode
cache
|
Cache name
|
num
|
Number of currently active objects
|
total
|
Total number of available objects
|
size
|
Size of each object
|
pages
|
Number of pages with at least one active object
|
Notes
vmstat does not require special permissions.
Linux vmstat does not count itself as a running process.
All linux blocks are currently 1024 bytes. Old kernels may report blocks as 512 bytes, 2048 bytes, or 4096 bytes.
vmstat lets you choose units: (k, 1000 bytes; K, 1024 bytes; m, 1000000 bytes; M, 1048576 bytes). Default is K in the default mode.
vmstat uses slabinfo 1.1.
Files
/proc/meminfo
/proc/stat
/proc/*/stat
未知的网友