Home >Operation and Maintenance >Linux Operation and Maintenance >How to check memory in linux
##free
##1. Function(Recommended learning: linux operation and maintenance)The free command is used to display memory usage, and the usage permissions are for all users.
**2. Format**free [-b-k-m] [-o] [-s delay] [-t] [-V]
-b -k -m -g:分别以字节(KB、MB、GB)为单位显示内存使用情况。
-s delay:显示每隔多少秒数来显示一次内存使用情况。
-t:显示内存总和列。
-o:不显示缓冲区调节列。
First line:
total total physical memory: 16047M
used used physical memory: 15956M
free Amount of free physical memory: 91M
shared Currently abandoned, always 0
buffers Buffer Total amount of read and write buffer memory area: 3740M
cached Page cache Total memory area: 4715M
Calculation relationship: total(16047) = used(15956) free(91)
This relationship is for the operating system. The server has 16G memory. More than 15G has been used, and there is still 91M free. Brother, too much memory is used
Second line: (-/ buffers/cache)Note that buffers and cached in the first line are not included in the calculation. It is not used, but actually participates in the calculation of the second row.
The second row's used (7500) = the first row's used (15956) - the first row's buffers (3740) - the first row's cached (4715)
The second line of free (8547) = the first line of free (91) The first line of buffers (3740) The first line of cached (4715)
The above is the detailed content of How to check memory in linux. For more information, please follow other related articles on the PHP Chinese website!