Linux command
vmstat 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
vmstat
Example
vmstat 2 5
Example
vmstat -a
Example
vmstat -d
Example
vmstat -m
Example
vmstat -s
Example
vmstat -t 1
说明
vmstat reports information about processes, memory, paging, block IO, traps, disks, and CPU activity. The first report shows averages since boot; subsequent reports show activity during the sampling period.
参数
- -a, --active
- Display active and inactive memory
- -f, --forks
- Display number of forks since boot
- -m, --slabs
- Display slab information
- -s, --stats
- Display event counters and memory statistics
- -d, --disk
- Report disk statistics
- -D, --disk-sum
- Report summary disk statistics
- -p, --partition DEVICE
- Detailed partition statistics
- -n, --one-header
- Print header only once
- -t, --timestamp
- Append timestamp to each line
- -w, --wide
- Wide output mode
- -y, --no-first
- Omit first report (boot statistics)
- -S, --unit UNIT
- Switch output units (k, K, m, M)
FAQ
What is the vmstat command used for?
vmstat reports information about processes, memory, paging, block IO, traps, disks, and CPU activity. The first report shows averages since boot; subsequent reports show activity during the sampling period.
How do I run a basic vmstat example?
Run `vmstat` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -a, --active do in vmstat?
Display active and inactive memory