[root@localhost ~]# vmstat procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 1 0 0 49160 492020 2017324 0 0 57 15 108 374 10 2 87 0 0 [root@localhost ~]#
[root@localhost ~]# vmstat procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 1 0 0 49160 492020 2017324 0 0 57 15 108 374 10 2 87 0 0 [root@localhost ~]# vmstat --help
Usage: vmstat [options] [delay [count]]
Options: -a, --active active/inactive memory -f, --forks number of forks since boot -m, --slabs slabinfo -n, --one-header do not redisplay header -s, --stats event counter statistics -d, --disk disk statistics -D, --disk-sum summarize disk statistics -p, --partition <dev> partition specific statistics -S, --unit <char> define display unit -w, --wide wide output -t, --timestamp show timestamp
-h, --help display this help and exit -V, --version output version information and exit
For more details see vmstat(8). [root@localhost ~]#
[root@localhost ~]# vmstat
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 0 1016976 121900 1388660 0 0 54 19 173 477 12 3 85 0 0
[root@localhost ~]# vmstat -a
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free inact active si so bi bo in cs us sy id wa st
0 0 0 1015720 701804 1447844 0 0 54 19 173 477 12 3 85 0 0
[root@localhost ~]# vmstat -s 3686064 K total memory 1150608 K used memory 1439196 K active memory 702928 K inactive memory 1023524 K free memory 123272 K buffer memory 1388660 K swap cache 0 K total swap 0 K used swap 0 K free swap 961982 non-nice user cpu ticks 14417 nice user cpu ticks 194461 system cpu ticks 6825684 idle cpu ticks 12403 IO-wait cpu ticks 63 IRQ cpu ticks 5608 softirq cpu ticks 0 stolen cpu ticks 4264662 pages paged in 1487185 pages paged out 0 pages swapped in 0 pages swapped out 13762036 interrupts 38103830 CPU context switches 1619001796 boot time 25897 forks [root@localhost ~]#
[root@localhost ~]# vmstat -m vmstat: your kernel does not support slabinfo or your permissions are insufficient [root@localhost ~]#
翻译:vmstat:您的内核不支持slabinfo或您的权限不足
vmstat -w宽版输出
1 2 3 4 5
[root@localhost ~]# vmstat -w procs -----------------------memory---------------------- ---swap-- -----io---- -system-- --------cpu-------- r b swpd free buff cache si so bi bo in cs us sy id wa st 3 0 0 1095624 110728 1352572 0 0 60 19 183 494 13 3 85 0 0 [root@localhost ~]#
vmstat -t显示时间
1 2 3 4 5
[root@localhost ~]# vmstat -t procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- -----timestamp----- r b swpd free buff cache si so bi bo in cs us sy id wa st CST 2 0 0 1067744 112572 1359264 0 0 60 19 182 493 13 3 85 0 0 2021-04-21 22:00:53 [root@localhost ~]#
vmstat -wt宽版输出并显示时间
1 2 3 4 5
[root@localhost ~]# vmstat -wt procs -----------------------memory---------------------- ---swap-- -----io---- -system-- --------cpu-------- -----timestamp----- r b swpd free buff cache si so bi bo in cs us sy id wa st CST 0 0 0 1069064 112492 1359276 0 0 60 19 182 493 13 3 85 0 0 2021-04-21 22:00:40 [root@localhost ~]#