vmstat命令参数详解

vmstat 命令参数详解:

                                       --------- 今天去面试 这个命令给忘了 ,哎~  记着,好记星不如烂笔头


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

FIELD DESCRIPTION FOR VM MODE

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

   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 (/s).         从磁盘到内存的交换页数目 (单位/S) 
        so: Amount of memory swapped to disk (/s).                 从交换内存到磁盘的交换页数目(单位/S)


   IO
       bi: Blocks received from a block device (blocks/s).      接收到块设备的块数(块/秒)
        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
       These 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 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


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

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,服务高峰期可以接受
  
   PS.综合了 网上各位前辈的心血 ,感觉还是差那么一点点

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值