free :显示系统内存状态信息
Usage:
free [options]
Options:
-b, --bytes show output in bytes
-k, --kilo show output in kilobytes
-m, --mega show output in megabytes
-g, --giga show output in gigabytes
--tera show output in terabytes
--peta show output in petabytes
-h, --human show human-readable output #易懂的方式显示
--si use powers of 1000 not 1024 #使用1000为基数
-l, --lohi show detailed low and high memory statistics #显示详细的低内存和高内存统计信息
-t, --total show total for RAM + swap
-s N, --seconds N repeat printing every N seconds #每N秒打印一次
-c N, --count N repeat printing N times, then exit #重复打印N次再退出
-w, --wide wide output
free :默认-k
[root@host ~]# free
total used free shared buff/cache available
Mem: 995896 109668 724360 7840 161868 711488
Swap: 2097148 0 2097148
total :总量 =used+free
used :使用量
free :空闲的交换分区
shared:共享
buff/cache:写/读缓存 buffer:存放数据到disk(块设备) cache:从disk读取数据
Mem:物理内存
Swap:交换分区
free -b:以字节的形式显示
[root@host ~]# free -b
total used free shared buff/cache available
Mem: 1019797504 112300032 741744640 8028160 165752832 728563712
Swap: 2147479552 0 2147479552
free -k :以kb的形式显示,默认kb
[root@host ~]# free -k
total used free shared buff/cache available
Mem: 995896 109668 724360 7840 161868 711488
Swap: 2097148 0 2097148
free -g :以GB的形式显示,不足1G显示0
[root@host ~]# free -g
total used free shared buff/cache available
Mem: 0 0 0 0 0 0
Swap: 1 0 1
free -h :以易懂的形式显示
[root@host ~]# free -h
total used free shared buff/cache available
Mem: 972M 107M 707M 7.7M 158M 694M
Swap: 2.0G 0B 2.0G
free -l:显示高低内存统计信息
[root@host ~]# free -l
total used free shared buff/cache available
Mem: 995896 109840 724188 7840 161868 711316
Low: 995896 271708 724188
High: 0 0 0
Swap: 2097148 0 2097148
free -t:显示Mem+Swap = Total
[root@host ~]# free -t
total used free shared buff/cache available
Mem: 995896 109548 724480 7840 161868 711608
Swap: 2097148 0 2097148
Total: 3093044 109548 2821628
——————————————————————————————————-
返回目录
版权声明:本文为weixin_46470342原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。