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

内存使用计算公式能否调整成usedMem = ((MemTotal) - (MemAvailable)) #135

Open
jekelo opened this issue Mar 22, 2024 · 1 comment

Comments

@jekelo
Copy link

jekelo commented Mar 22, 2024

在高版本内核中 /proc/meminfo 新增字段 MemAvailable

该字段有考虑了内存水平位,比较合理

建议使用该字段来计算内存使用

MemAvailable in /proc/meminfo, available on kernels 3.14, emulated on kernels 2.6.27+ https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773

目前 htop 已经调整,相关资料链接如下:

htop-dev/htop#281

https://github.com/GuillaumeGomez/sysinfo/pull/869/files

@ForTheRest
Copy link

ForTheRest commented Mar 22, 2024 via email

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

No branches or pull requests

2 participants