The method of viewing system memory Information by linux
What this article shares to you is about the method of linux viewing system memory information, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
Free
1. Action
The free command is used to show memory usage, with permissions for all users.
* * 2. Format * *
Free [- b-k-m] [- o] [- s delay] [- t] [- V]
* 3. Main parameters * *
-b-k-m-g: displays memory usage in bytes (KB, MB, GB), respectively. -s delay: displays the number of seconds per second to show memory usage. -t: displays the memory sum column. -o: the buffer adjustment column is not displayed.
We all know to use the free command to check the memory of the system, but what exactly does the returned value mean?
First line:
Total total physical memory: 16047m
Amount of physical memory used in used: 15956m
Amount of free free physical memory: 91m
Shared is currently obsolete, always 0
Total buffers Buffer read-write buffer memory: 3740m
Total cached Page cache memory area: 4715m
Calculation relation: total (16047) = used (15956) + free (91)
This relationship is for the operating system, the server has 16 GB of memory, uses more than 15 GB, and has 91 megabytes idle. Dude, you use too much memory.
Second line: (- / + buffers/cache)
Note that the buffers and cached in the first line are not used in the calculation, but are actually involved in the calculation of the second line.
Used (7500) of the second line = used (15956) of the first line-buffers (3740) of the first line-cached (4715) of the first line
Free (8547) of the second line = free (91) of the first line + buffers (3740) of the first line + cached (4715) of the first line
The above is how linux looks at the memory information of the system, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.