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

sicm_avail and sicm_capacity very often wrong #49

Open
benbenolson opened this issue Sep 11, 2019 · 1 comment
Open

sicm_avail and sicm_capacity very often wrong #49

benbenolson opened this issue Sep 11, 2019 · 1 comment

Comments

@benbenolson
Copy link
Contributor

Recently, a coworker and I have been working on a high-level feature that requires calls to sicm_avail and sicm_capacity, but these functions are wrong quite often. Because they read a hardcoded 66 bytes into /sys/devices/system/node/nodeX/meminfo, they're wrong when the system has less than 10GB and more than 100GB of memory (which is true for 100% of the systems that we're currently working on). This commit is the culprit.

@calccrypto What was the issue with the previous way of doing it, where you parse for MemFree or MemTotal? I can rewrite this function if you don't want to mess with it, but I don't want to introduce old bugs.

@calccrypto
Copy link
Contributor

I think I was trying to cleanup the code and messed up.

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