free - 显示系统内存信息

free - Display amount of free and used memory in the system
显示系统中空闲和已使用内存的数量

格式:
free [options]

options:

  • -b:bytes,字节为单位
  • -k:kilobytes,默认千字节单位
  • -m:megabytes,兆字节
  • -g:gigabytes,千兆节
  • --tera:tb,兆兆字节
  • --peta:pb,千t字节
  • -w:切换到宽模式,宽模式产生的行长度超过80个字符,在这种械下,buffers和cache分开显示
  • -c count:显示几次,需要和-s配合使用
  • -s seconds:显示间隔

示例:

[root@node1 ~]# free
              total        used        free      shared  buff/cache   available
Mem:         997956      162556      573256        7792      262144      668160
Swap:       2097148           0     2097148

[root@node1 ~]# free -wm
              total        used        free      shared     buffers       cache   available
Mem:            974         158         559           7           2         253         652
Swap:          2047           0        2047


[root@node1 ~]# free -h
              total        used        free      shared  buff/cache   available
Mem:           974M        158M        559M        7.6M        256M        652M
Swap:          2.0G          0B        2.0G

总结:
相比vmstatfree只显示内存相关信息。

转载于:https://www.cnblogs.com/dance-walter/p/10301950.html

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值