Take care my Linux Memory Usage Summary in console

时间:2019-06-01 14:07:50

标签: linux

I recently saw my AWS EC2 instance's states at SSH helper program (Not a putty program).

I saw below.

[centos@ip-172-31-xx-xx ~]$ free -h
             total       used       free     shared    buffers     cached
Mem:          1.8G       1.0G       869M       144K       137M       267M
-/+ buffers/cache:       600M       1.2G
Swap:           0B         0B         0B

I understand buffers and cached usage are reserved usage, so it is empty usage. But, I didn't understand this.

-/+ buffers/cache: 600M 1.2G

What does it mean?

2 个答案:

答案 0 :(得分:0)

根据帖子Meaning of the buffers/cache line in the output of free

似乎是已用内存减去缓存和缓冲区中的可用内存,再加上可用内存再加上缓存和缓冲区中的可用内存。

如果形成缓冲区和缓存的总和(400M),然后从使用的值中减去该值(1000M-400M = 600M),然后将其免费添加(869M + 400〜1,2G),则可以计算该值。

答案 1 :(得分:0)

或者,查看以下内容:/ proc / meminfo

例如:

grep MemAvailable /proc/meminfo

和:

cat /proc/meminfo

请注意,MemAvailable仅在现代Linux内核中可用(除非RHEL / CentOS 6像Oracle Unbreakable Linux那样使用较新的内核运行,否则不能提供)

关于娱乐和教育,请参见:https://www.linuxatemyram.com/

要获得有关系统资源使用情况的更方便的信息,您可能会对诸如https://haydenjames.io/use-atop-linux-server-performance-analysis/之类的东西或诸如https://haydenjames.io/alternatives-top-htop/

之类的其他顶级工具感兴趣。

我不是自由的忠实拥护者,所以我避免像瘟疫一样;-)