This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12854|Reply: 0

[linux] How to properly check the memory usage of Linux

[Copy link]
Posted on 10/21/2014 5:15:39 PM | | |
A 24-hour stability test was conducted to discuss the use of Mem in Linux:
The most convenient command to look at memory is free -m, such as:
[root@host ~]# free -m
total used free shared buffers cached
Mem: 1024 1005 19 0 9 782
-/+ buffers/cache: 212 811
Swap: 996 0 995
[root@host ~] #
It can be seen from the above that this Linux system has a total of 1024M memory, but how much memory has been occupied by the current Linux system? The answer of most users is 1005M, which is not the case.
The current VPS occupies 212M memory, which is the number below 1005: 212, which represents the occupied memory. The 811 at the end represents the available memory of the current Linux system.
"-/+ buffers/cache:"The line at the beginning is the actual occupied memory and available memory.
Therefore, to look at the memory usage, you should look at the line at the beginning of "-/+ buffers/cache:", if the last number of this line is close to 0, then it means that the Linux system is running out of memory, and the Linux system will respond slowly. If this number is still relatively large, then the Linux system still has more memory available, and the system should not be slow.





Previous:The difference between kill -9 and no -9 in Linux is explained in detail
Next:Let your QQ be hidden in the city, refuse spam, and be quiet from now on!
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com