Linux工具 - VMSTAT监视内存使用情况

2019-04-23 18:41 By "Powerless" 2843 0 1

【语法】

    vmstat [-V] [-n] [delay [count]]

    ·    -V表示打印出版本信息;

    ·    -n表示在周期性循环输出时,输出的头部信息仅显示一次;

    ·    delay是两次输出之间的延迟时间;

    ·    count是指按照这个时间间隔统计的次数。

[root@wzxaini9 ~]# vmstat 5 5
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 223332 225464 1212392    0    0     1    11   17    5  0  0 99  0  0
 0  0      0 222960 225464 1212444    0    0     0     8   88  176  1  0 99  0  0
 0  0      0 222960 225464 1212444    0    0     0     3   68  151  0  0 99  0  0


【字段说明】

Procs(进程):

    r: 运行队列中进程数量

    b: 等待IO的进程数量

Memory(内存):

    swpd: 使用虚拟内存大小

    free: 可用内存大小

    buff: 用作缓冲的内存大小

    cache: 用作缓存的内存大小

Swap:

    si: 每秒从交换区写到内存的大小

    so: 每秒写入交换区的内存大小

IO:(现在的Linux版本块的大小为1024bytes)

    bi: 每秒读取的块数

    bo: 每秒写入的块数

system:

    in: 每秒中断数,包括时钟中断

    cs: 每秒上下文切换数

CPU(以百分比表示)

    us: 用户进程执行时间(user time)

    sy: 系统进程执行时间(system time)

    id: 空闲时间(包括IO等待时间)

    wa: 等待IO时间

评 论

Others Discussion

  • 程序员年中考试题-段子版
    Posted on 2021-06-23 15:57
  • MySQL事务介绍
    Posted on 2019-06-05 18:14
  • BASE原则
    Posted on 2020-12-17 16:42
  • PHP8.1 性能基准测试
    Posted on 2022-10-08 17:40
  • Mysql联合索引的最左前缀匹配原则
    Posted on 2018-08-25 15:00
  • HTTP和HTTPS的区别
    Posted on 2020-08-10 23:00
  • 2018年云计算热词
    Posted on 2019-06-12 18:19
  • MySQL分组
    Posted on 2019-11-18 14:00