free

parameter:

b Displayed in bytes.

-k Display in Kbytes. Default Display.

-m Display in megabytes.

-s Repeat every few seconds. A script can be written for monitoring.

 

explain:

The line at the beginning of Mem: total refers to the total amount of memory. For example, the 4G memory of this machine has actually been deducted as part of the video memory.

Used is the amount of memory the operating system has used. This part includes both the part used by the operating system itself, the part already used by the application, and the cached part.

Free refers to the amount of memory not yet used by the operating system. We usually see this part smaller.

Shared is deprecated and always displays 0.

Buffers and cached refer to the amount of memory used as cache.

 

The line at the beginning of -/+ buffers/cache: (focus on this line)

The used column refers to the total amount of memory used by the application. Equal to Mem.used-Mem.buffers-Mem.cached.

The free column refers to the amount of memory that the application has not yet used. This data is the amount of free and available memory we need to pay attention to. Equal to Mem.free+Mem.buffers+Mem.cached. If the data in the free column in this row is too small, then you need to optimize the program or increase the physical memory.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326539002&siteId=291194637