Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add MemAvailable #12

Merged
merged 3 commits into from
Dec 7, 2018
Merged

add MemAvailable #12

merged 3 commits into from
Dec 7, 2018

Conversation

feiyuw
Copy link
Contributor

@feiyuw feiyuw commented Jun 22, 2017

MemAvailable is better than MemFree in newer Kernel

@UlricQin
Copy link
Member

@feiyuw 加了一个字段,值与memfree相同?这没啥意义哇

@feiyuw
Copy link
Contributor Author

feiyuw commented Jun 27, 2017

@UlricQin 在新的linux内核里面,memavailable这个值用来计算可用的内存更准确,见https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773

@taomaree
Copy link
Contributor

taomaree commented May 7, 2018

linux内核3.14以后,/proc/meminfo新增了MemAvailable字段,这样取内存使用率会更准一些。
我们发现,MemAvailable 和 MemFree 的值完全不一样,差异很大。
这个修改对于新的内核,就可以用更准确的取值方式。

我们根据这个修改,falcon-agent 监控内存使用率更准确了。( 内核版本为 4.8 和 4.9 。 )
举例: 在一台内核 4.8 的机器上,原方式检测内存使用率为 64.381%, 新方式检测的结果为 22.845%

@UlricQin UlricQin merged commit 3bba579 into toolkits:master Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants