alibaba / tsar

Taobao System Activity Reporter
Apache License 2.0
2.48k stars 735 forks source link

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

Open jekelo opened 6 months ago

jekelo commented 6 months ago

在高版本内核中 /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 已经调整,相关资料链接如下:

https://github.com/htop-dev/htop/issues/281

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

ForTheRest commented 6 months ago

这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。