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 memory information in linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Under Linux, we often use the top command to view the system process, and top can also display the system memory. Our common tool for viewing content under Linux is the free command.

Memory View Command free under Linux:

To view memory under Linux, we usually use the free command:

$free

Total used free shared buffers cached

Mem: 3266180 3250004 16176 0 110652 2668236

-/ + buffers/cache: 471116 2795064

Swap: 2048276 80160 1968116

The following is an explanation for viewing the output of the free command in memory:

Total: the total amount of physical memory.

Used: how much has been used.

Free: how many are available?

Shared: the total amount of memory shared by multiple processes.

Buffers/cached: size of the disk cache.

The third line (- / + buffers/cached):

Used: how much has been used.

Free: how many are available?

-/ + buffers/cache meaning and difference:

The difference between the used/free of the second line (mem) and the third line (- / + buffers/cache) used/free is from the perspective of usage:

The second line is from the point of view of OS, because OS,buffers/cached belongs to being used, so his available memory is 16176KB, and the used memory is 3250004KB, including + buffers+cached used by + Application (X, oracle,etc) for OS.

The third line refers to that from an application point of view, buffers/cached is equal to available for applications, because buffer/cached is designed to improve file read performance, and buffer/cached is quickly recycled when the application needs to use memory.

These are the details of how linux views memory. Please pay attention to other related articles for more information.

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