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

Make ram() option locale independent #41

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

Conversation

mgoerlich-dev
Copy link

I updated the ram module to make it independent from the users locale.
Before it used the free(1) command and looked for the String "Mem:" to
detect the desired output values, but this aproach will break on
any non-english system.
Now the module reads the data from /proc/meminfo and calculates
the desired values on its own, just like free(1) does.

Possible improvements:

  • Let python read the file directly instead of cat'ing it.

I updated the ram module to make it independent from the users locale.
Before it used the free(1) command and looked for the String "Mem:" to
detect the desired output values, but this aproach will break on
any non-english system.
Now the module reads the data from /proc/meminfo and calculates
the desired values on its own, just like free(1) does.

Possible improvements:
* Let python read the file directly instead of cat'ing it.
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.

1 participant