查看内存的使用情况
[root@sre01 ~]# free -h
total used free shared buff/cache available
Mem: 972M 233M 279M 7.6M 459M 551M
Swap: 5.0G 0B 5.0G
每秒钟自动刷新一次
[root@sre01 ~]# free -hs 1
total used free shared buff/cache available
Mem: 972M 233M 279M 7.6M 459M 551M
Swap: 5.0G 0B 5.0G
total used free shared buff/cache available
Mem: 972M 233M 279M 7.6M 459M 551M
Swap: 5.0G 0B 5.0G
total used free shared buff/cache available
Mem: 972M 233M 279M 7.6M 459M 551M
Swap: 5.0G 0B 5.0G
total used free shared buff/cache available
Mem: 972M 233M 279M 7.6M 459M 551M
Swap: 5.0G 0B 5.0G
^C total used free shared buff/cache available
Mem: 972M 233M 279M 7.6M 459M 551M
Swap: 5.0G 0B 5.0G
刷新3次自动退出
[root@sre01 ~]# free -hc 3
total used free shared buff/cache available
Mem: 972M 233M 279M 7.6M 459M 551M
Swap: 5.0G 0B 5.0G
total used free shared buff/cache available
Mem: 972M 233M 279M 7.6M 459M 551M
Swap: 5.0G 0B 5.0G
total used free shared buff/cache available
Mem: 972M 233M 279M 7.6M 459M 551M
Swap: 5.0G 0B 5.0G
[root@sre01 ~]#
- total #系统总的可用物理内存大小
- used #已被使用的物理内存大小
- free #还有多少物理内存可用
- shared #被共享使用的物理内存大小
- buff/cache #被 buffer 和 cache 使用的物理内存大小
- available #还可以被 应用程序 使用的物理内存大小