架构师_程序员_码农网

Retrieve password
Register

QQ登录

Just one step to get started

Search
View:7745|Reply: 0
打印 上一主题 下一主题

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

[copy link]
跳转到指定楼层
owner of the building
发表于 2014-10-21 17:15:39| 看该作者回帖奖励|Browse in reverse order|Read mode
Did a 24 hour stability test to explore Linux Mem usage:
The most convenient command to look at memory is free -m, as in:
[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 ~]#
From the above, we can see that this Linux system has a total of 1024M of memory, but how much memory is currently occupied by the Linux system? The answer for most users is 1005M, which is not true.
The current memory occupied by the VPS should be 212M, that is, the number under 1005: 212, representing the memory already occupied. The one after that, 811, represents the current Linux system's available memory.
The line starting with "-/+ buffers/cache:" is the actual occupied and available memory.
So, to see the memory usage, you should look at the line starting with "-/+ buffers/cache:". If the number at the end of this line is close to 0, then it means that the Linux system is running out of memory, and the Linux system will react slower at this time. If the number is still large, then the Linux system still has more memory available, and the system should not be slow.





Previous article: Linux kill -9 and not with -9 difference in detail
Next article: Let your QQ big hidden in the city, reject spam, quiet from now on!
The code farmer network, only published in the process of practice, encountered technical difficulties, do not mislead others.
You need to log in before you can post back Log in | Register

This version of the integral rules

DISCLAIMER:
All software, programming materials or articles published by Code Farmer are limited to be used for learning and research purposes only; the above contents shall not be used for commercial or illegal purposes, otherwise, all the consequences shall be borne by the users themselves. This site information from the network, copyright dispute has nothing to do with this site. You must completely remove the above content from your computer within 24 hours of downloading. If you like the program, please support the genuine software, buy registration and get better genuine service. If there is any infringement, please contact us by email to deal with it.

Mail To:help@itsvse.com

QQ| ( ICP备14021824号-2 )|Sitemap

GMT+8, 2024-9-17 13:42

Quick ReplyBack to topBack to list