以MB为单位查看系统的物理内存和交换分区容量
[root@localhost ~]# free -m
total used free shared buff/cache available
Mem: 1831 980 185 47 665 626
Swap: 2047 0 2047
以GB为单位查看系统的物理内存和交换分区容量。
[root@localhost ~]# free -g
total used free shared buff/cache available
Mem: 1 0 0 0 0 0
Swap: 1 0 1
显示系统的物理内存和交换分区容量的总和。
[root@localhost ~]# free -t
total used free shared buff/cache available
Mem: 1875500 1011068 183040 48216 681392 634572
Swap: 2097148 0 2097148
Total: 3972648 1011068 2280188
每隔十秒钟周期性地显示内存的使用情况。
[root@localhost ~]# free -s 10