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

Use correct unit when parsing memory and swap from Linux #348

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ClementTsang
Copy link

@ClementTsang ClementTsang commented Oct 6, 2021

Switch to treating parsed values from /proc/meminfo as kibibytes. Previously, it was treated as kilobytes, but apparently that's not correct, as per this Red Hat doc:

While the file shows kilobytes (kB; 1 kB equals 1000 B), it is actually kibibytes (KiB; 1 KiB equals 1024 B). This imprecision in /proc/meminfo is known, but is not corrected due to legacy concerns - programs rely on /proc/meminfo to specify size with the "kB" string.


Fixes: #341

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.

Linux memory usage parsing seems to use the wrong unit
1 participant