# vmstat -s 命令选项 类似 /proc/meminfo [root@heibanbai ~]# vmstat -s 1833356 K total memory 1131852 K used memory 315516 K active memory 1069080 K inactive memory 87036 K free memory 12 K buffer memory 614456 K swap cache 4127740 K total swap 182016 K used swap 3945724 K free swap 3380 non-nice user cpu ticks 580 nice user cpu ticks 5043 system cpu ticks 172435 idle cpu ticks 826 IO-wait cpu ticks 521 IRQ cpu ticks 188 softirq cpu ticks 0 stolen cpu ticks 921488 pages paged in 309590 pages paged out 243 pages swapped in 45520 pages swapped out 367861 interrupts 831109 CPU context switches 1678856993 boot time 56883 forks
方法4
1 2 3 4 5 6 7 8 9 10 11 12
# top 命令 一般用于查看进程的CPU和内存使用情况 [root@heibanbai ~]# top top - 22:44:53 up 34 min, 1 user, load average: 0.00, 0.00, 0.05 Tasks: 228 total, 2 running, 225 sleeping, 0 stopped, 1 zombie %Cpu(s): 0.0 us, 5.9 sy, 0.0 ni, 88.2 id, 0.0 wa, 5.9 hi, 0.0 si, 0.0 st MiB Mem : 1790.4 total, 83.6 free, 1106.1 used, 600.7 buff/cache MiB Swap: 4031.0 total, 3853.2 free, 177.8 used. 467.9 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 56813 root 20 0 65588 5228 4240 R 6.2 0.3 0:00.01 top 1 root 20 0 250112 11972 8656 S 0.0 0.7 0:03.03 systemd 2 root 20 0 0 0 0 S 0.0 0.0 0:00.01 kthreadd