0
点赞
收藏
分享

微信扫一扫

使用vmstat监控系统性能

岁月不饶人老不正经 2024-10-05 阅读 16
Linux运维

使用vmstat监控系统性能_Linux

  • r 正在运行和等待运行的进程个数
  • b 处于不可中断睡眠状态的进程个数
  • swpd 交换内存的量
  • free 空闲的内存量
  • buffer 缓冲区的量
  • cache 缓存区的量
  • si 从磁盘交换进swap的数据速率
  • so 从swap交换到磁盘的数据速率
  • bi 从块设备读入到系统的速率
  • bo 保存数据到块设备的速率
  • in 中断速率
  • cs 进程切换速率
  • us 用空间使用处理器
  • sy 内核空间使用处理器
  • id 空闲的处理器
  • wa IO等待的处理器
  • st 虚拟化消耗的处理器


每秒显示一次

[root@sre01 ~]# vmstat 1
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 2  0      0 445316   2108 371812    0    0    10     5   44   42  0  1 98  0  0
 0  0      0 445316   2108 371812    0    0     0     0   27   32  0  0 100  0  0
 0  0      0 445316   2108 371812    0    0     0     0   22   23  0  1 99  0  0
 0  0      0 445316   2108 371812    0    0     0     0   27   25  0  0 100  0  0
 0  0      0 445316   2108 371812    0    0     0     0   27   36  0  0 100  0  0
 0  0      0 445316   2108 371812    0    0     0     0   29   27  0  0 100  0  0
 0  0      0 445316   2108 371812    0    0     0     0   21   24  0  0 100  0  0


仅显示统计数据

[root@sre01 ~]# vmstat -s
       995748 K total memory
       176412 K used memory
       286104 K active memory
       112324 K inactive memory
       445416 K free memory
         2108 K buffer memory
       371812 K swap cache
      2097148 K total swap
            0 K used swap
      2097148 K free swap
         5675 non-nice user cpu ticks
            0 nice user cpu ticks
        33136 system cpu ticks
      2642786 idle cpu ticks
          325 IO-wait cpu ticks
            0 IRQ cpu ticks
         5746 softirq cpu ticks
            0 stolen cpu ticks
       267723 pages paged in
       125400 pages paged out
            0 pages swapped in
            0 pages swapped out
      1177408 interrupts
      1129926 CPU context switches
   1728002887 boot time
        18350 forks
[root@sre01 ~]# 


举报

相关推荐

0 条评论