免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5087 | 回复: 2
打印 上一主题 下一主题

vmstat命令参数详解 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-03-05 17:23 |只看该作者 |倒序浏览

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,服务高峰期可以接受

论坛徽章:
0
2 [报告]
发表于 2012-03-05 17:23 |只看该作者
谢谢分享

论坛徽章:
0
3 [报告]
发表于 2012-03-07 00:02 |只看该作者
性能调优的必备工具
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP