vmstat含义说明
来源:互联网 发布:黑暗之魂2猎龙枪数据 编辑:程序博客网 时间:2024/05/21 11:24
Usage:
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 better. -f, --forks The -f switch displays the number of forks since boot. This 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 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 (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. -t, --timestamp Append timestamp to each line -w, --wide Wide output mode (useful for systems with higher amount of memory, where the default output mode suffers from unwanted column breakage). The output is wider than 80 characters per line. -V, --version Display version information and exit. -h, --help Display help and exit.
vmstat -w
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 4 329796 26040 4528 3379824 1 1 50 160 36 17 2 10 85 3 0
procs
r 列表示运行和等待cpu时间片的进程数,如果长期大于1,说明cpu不足,需要增加cpu。
b 列表示在等待资源的进程数,比如正在等待I/O、或者内存交换等。
cpu 表示cpu的使用状态
us 列显示了用户方式下所花费 CPU 时间的百分比。us的值比较高时,说明用户进程消耗的cpu时间多,但是如果长期大于50%,需要考虑优化用户的程序。
sy 列显示了内核进程所花费的cpu时间的百分比。这里us + sy的参考值为80%,如果us+sy 大于 80%说明可能存在CPU不足。
wa 列显示了IO等待所占用的CPU时间的百分比。这里wa的参考值为30%,如果wa超过30%,说明IO等待严重,这可能是磁盘大量随机访问造成的,也可能磁盘或者磁盘访问控制器的带宽瓶颈造成的(主要是块操作)。
id 列显示了cpu处在空闲状态的时间百分比
system 显示采集间隔内发生的中断数
in 列表示在某一时间间隔中观测到的每秒设备中断数。
cs列表示每秒产生的上下文切换次数,如当 cs 比磁盘 I/O 和网络信息包速率高得多,都应进行进一步调查。
memory
swpd 切换到内存交换区的内存数量(k表示)。如果swpd的值不为0,或者比较大,比如超过了100m,只要si、so的值长期为0,系统性能还是正常
free 当前的空闲页面列表中内存数量(k表示)
buff 作为buffer cache的内存数量,一般对块设备的读写才需要缓冲。
cache: 作为page cache的内存数量,一般作为文件系统的cache,如果cache较大,说明用到cache的文件较多,如果此时IO中bi比较小,说明文件系统效率比较好。
swap
si 由内存进入内存交换区数量。
so由内存交换区进入内存数量。
IO
bi 从块设备读入数据的总量(读磁盘)(每秒kb)。
bo 块设备写入数据的总量(写磁盘)(每秒kb)
这里我们设置的bi+bo参考值为1000,如果超过1000,而且wa值较大应该考虑均衡磁盘负载,可以结合iostat输出来分析。
0 0
- vmstat含义说明
- vmstat输出结果说明
- vmstat显示参数说明
- vmstat详细说明
- vmstat 详细说明
- vmstat 详细说明2
- vmstat 命令的用法说明
- vmstat 命令的用法说明
- VMSTAT命令常用功能说明
- vmstat 命令的用法说明(总)
- vmstat
- VMSTAT
- VMSTAT
- vmstat
- vmstat
- vmstat
- vmstat
- vmstat
- bzoj1599: [Usaco2008 Oct]笨重的石子
- HDU1850 Being a Good Boy in Spring Festival
- caffe实例之mnist
- 【百度笔试】熊熊全排列
- 1006. Sign In and Sign Out (25)
- vmstat含义说明
- 分层
- 浅谈Git
- redis的安装
- 关于 Date() 函数在 iOS 中的一个小坑
- Python Thrift示例
- 剑指offer——和为S的连续正数序列
- Android系统下在te文件中为指定服务添加sepolicy权限
- 链式运动框架