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

内存信息部分 兼容性不好 #13

Open
l-we opened this issue Jan 17, 2018 · 1 comment
Open

内存信息部分 兼容性不好 #13

l-we opened this issue Jan 17, 2018 · 1 comment

Comments

@l-we
Copy link
Contributor

l-we commented Jan 17, 2018

Red Hat 系列 free -m
total used free shared buffers cached
Mem: 257949 155906 102042 0 851 142420
-/+ buffers/cache: 12634 245315
Swap: 127999 5912 122087

Debian 系列 free -m
total used free shared buff/cache available
Mem: 128878 26308 1363 1338 101206 100196
Swap: 47683 0 47683

单纯用 if len(mem_pipe) == 3: 判断不合理,建议改成解析 cat /proc/meminfo 信息,结果更准确

@toddlerya
Copy link
Owner

确实如此,解析/proc/meminfo更通用一些。

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