In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Linux how to use the free command to show free memory space, I believe that many inexperienced people are helpless about this, this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
The free command displays system memory used and free, including physical memory, swap memory, and kernel buffer memory
parameters
-b Display memory in bytes
-k Displays memory in KB
-m Display memory in M
-o Ignore buffer adjustment columns
- tSum information
-s Executes a command at specified intervals in s
-h Displays capacity in readable form, requires free -V to display version greater than 3.3
-V version information
example
Example 1
The code is as follows:
root@tnak-VirtualBox:/home/tnak # free -s 3 #Executes every 3 seconds
The code is as follows:
root@tnak-VirtualBox:/home/tnak # free -m #in M
The code is as follows:
root@tnak-VirtualBox:/home/tnak # free -k #in K
Example 2
free -h #Display capacity in readable form, requires procps-ng version greater than 3.3
The code is as follows:
$ free -h
PS: Return information description
Mem: indicates physical memory statistics
-/+ buffers/cached: indicates cache statistics for physical memory
Swap: Indicates the usage of swap partitions on the hard disk,
Line 1 Mem:
Total: Indicates the total amount of physical memory.
Used: Indicates the total amount allocated for cache (both buffers and cache) use, but some of it may not be actually used.
free: unallocated memory.
Shared: Shared memory, which is not used by most systems and is not discussed here.
buffers: Number of buffers allocated by the system but not used.
cached: Number of caches allocated by the system but unused.
total = used + free
Line 2-/+ buffers/cached:
Used: that is used-buffers-cached in the first line is also the actual amount of memory used.
free: The sum of unused buffers plus cached and unallocated memory, which is the actual memory currently available on the system =free+buffers+cached.
Because buffers and cached are the amount of memory requested by the system to improve performance, they are actually available when the application needs them, so they are also available to the application.
The third row is for swap controls, showing how much used and how many free swap areas there are.
After reading the above, do you know how to use the free command to display free memory space in Linux? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.