查看linux的内存使用情况:free

今天来看看一个普及的常用工具free:用于linux中查看当前系统内存的使用情况,它显示系统中剩余及已用的物理内存和交换内存,以及共享内存和被核心使用的缓冲区。

下面看看free工具的一些参数选项:

[root@searu ~]# free --help
free: invalid option -- -
usage: free [-b|-k|-m|-g] [-l] [-o] [-t] [-s delay] [-c count] [-V]
  -b,-k,-m,-g show output in bytes, KB, MB, or GB
  -l show detailed low and high memory statistics
  -o use old format (no -/+buffers/cache line)
  -t display total for RAM + swap
  -s update every [delay] seconds
  -c update [count] times
  -V display version information and exit
[root@searu ~]#

查看linux的内存使用情况:free

-b 显示输出为字节;
-k 显示输出为K字节;
-m 显示输出为M字节;
-g 显示输出为G字节;
-l 显示详细的低和高内存统计;
-o 不显示物理内存缓存统计;
-t 显示内存总和;
-s 指定一个时间(秒)来持续更新;
-c 指定更新次数;
-V 显示版本信息。

查看linux的内存使用情况:free

查看linux的内存使用情况:free

查看linux的内存使用情况:free

查看linux的内存使用情况:free