free 内存查看命令

free 命令

内存查看命令
-m 按照MB大小显示内存大小
-h 在具体的数值后按照适合的单位显示

[root@localhost ~]# free
              total        used        free      shared  buff/cache   available
Mem:        1865276      816452      369100       11328      679724      839048
Swap:       4194300           0     4194300
#total 总内存大小
#used 使用内存
#free 剩余内存
#buff/cache 缓存内存大小 
#00001(磁盘)-->内存(cache)-->cpu
#cpu-->内存(buff)-->00001(磁盘)
#total=used+free+buff/cache
#available包含free和/buff/cache剩余部分

物理空闲内存 = 总物理内存 - 实际已用内存 + 缓冲 + 缓存 
应用程序可用空闲内存 = 总物理内存 - 实际已用内存

free -m
指定MB单位显示数值

[root@localhost ~]# free -m
              total        used        free      shared  buff/cache   available
Mem:           1821         797         360          11         663         819
Swap:          4095           0        4095

free -g
指定显示单位为GB显示数值

[root@localhost ~]# free -g
              total        used        free      shared  buff/cache   available
Mem:              1           0           0           0           0           0
Swap:             3           0           3

free -h
根据数值大小显示合适的单位

[root@localhost ~]# free -h
              total        used        free      shared  buff/cache   available
Mem:           1.8G        797M        360M         11M        663M        819M
Swap:          4.0G          0B        4.0G

转载:https://blog.csdn.net/oy5348/article/details/84137418

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值