linux+vmstat参数,Linux vmstat 命令参数详解

本文详细介绍了Linux系统监控命令vmstat的使用,包括参数nm的含义,以及各字段如r、b、swpd、free等的解释。内容涉及进程状态、内存管理、磁盘I/O、系统中断和CPU使用情况。通过对vmstat输出的分析,可以评估系统的负载、内存压力、磁盘活动和CPU利用率,从而进行系统性能优化。
摘要由CSDN通过智能技术生成

Linux vmstat 命令参数详解

vmstat  n m:每隔n秒钟刷新,抓取m次数后退出。

[Oracle@linuxidc properties]$ vmstat 2 3

procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------

r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st

0  0     96 655968 278912 2117884    0    0     0    10    1    1 18  2 80  0  0

1  0     96 655968 278912 2117884    0    0     0     0 1011  694  0  0 100  0  0

0  0     96 655968 278912 2117884    0    0     0    34 1013  338  0  0 100  0  0

FIELD DESCRIPTION FOR VM MODE

Procsr: The number of processes waiting for run time.          处于运行队列中的内核线程数目(进程数)。b: The number of processes in uninterruptible sleep.置于等待队列(等待资源、等待输入/输出)的内核线程数目。 处于block队列中不可中断的进程数

Memoryswpd: 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)          活动内存数

Swapsi: Amount of memory swapped in from disk (/s).         从磁盘到内存的交换页数目 (单位/S)so: Amount of memory swapped to disk (/s).                 从交换内存到磁盘的交换页数目(单位/S)IObi: Blocks received from a block device (blocks/s).      接收到块设备的块数(块/秒)bo: Blocks sent to a block device (blocks/s).                 发送到块设备的块数(块/秒)Systemin: The number of interrupts per second, including the clock.        每秒中断数,包括时钟中断cs: The number of context switches per second.                              每秒上下文切换数CPUThese are percentages of total 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.              CPU空闲时间        空闲时间百分比wa: Time spent waiting for IO. Prior to Linux 2.5.41, included in idle.CPU 空闲时间,在此期间系统有未完成的磁盘/NFS I/O 请求st: Time stolen from a virtual machine. Prior to Linux 2.6.11, unknown.         来自于虚拟机偷取的CPU所占的百分比   (这个不会翻译...)

FIELD DESCRIPTION FOR DISK MODEReadstotal: Total reads completed successfullymerged: grouped reads (resulting in one I/O)sectors: Sectors read successfullyms: milliseconds spent readingWritestotal: Total writes completed successfullymerged: grouped writes (resulting in one I/O)sectors: Sectors written successfullyms: milliseconds spent writingIOcur: I/O in progress

s: seconds spent for I/O

----------------------------------------------------------------------------------------------------------

NOTICE:

procs r: 运行的进程比较多,系统很繁忙

bi/bo: 磁盘写的数据量稍大,如果是大文件的写,10M以内基本不用担心,如果是小文件写2M以内基本正常

cpu us: 持续大于50%,服务高峰期可以接受, 如果长期大于50 ,可以考虑优化

cpu sy: 现实内核进程所占的百分比,这里us + sy的参考值为80%,如果us+sy 大于 80%说明可能存在CPU不足。

cpu wa: 列显示了IO等待所占用的CPU时间的百分比。这里wa的参考值为30%,如果wa超过30%,说明IO等待严重,这可能是磁盘大量随机访问造成的, 也可能磁盘或者磁盘访问控制器的带宽瓶颈造成的(主要是块操作)。

cpu id:  CPU 空闲时所占百分比  平常持续小于50,服务高峰期可以接受。

0b1331709591d260c1c78e86d0c51c18.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值