今天来看看一个普及的常用工具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 ~]#
-b 显示输出为字节;
-k 显示输出为 K 字节;
-m 显示输出为 M 字节;
-g 显示输出为 G 字节;
-l 显示详细的低和高内存统计;
-o 不显示物理内存缓存统计;
-t 显示内存总和;
-s 指定一个时间(秒)来持续更新;
-c 指定更新次数;
-V 显示版本信息。
正文完