Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of viewing system memory Information by linux

2025-04-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report