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

status.rb should report free memory as free+buffers+cache #9

Open
breu opened this issue Aug 23, 2012 · 2 comments
Open

status.rb should report free memory as free+buffers+cache #9

breu opened this issue Aug 23, 2012 · 2 comments

Comments

@breu
Copy link
Contributor

breu commented Aug 23, 2012

status.rb currently shows free memory as just 'free' and not the allocatable memory free+buffers+cache

root@controller:~# free
             total       used       free     shared    buffers     cached
Mem:       4049804    3917140     132664          0      94708    2108096
-/+ buffers/cache:    1714336    2335468
Swap:      4192252       4020    4188232
@andrewsben
Copy link

@memfree = cat /proc/meminfo | grep "MemFree" | awk '{ print $2 }'.chomp.to_i + free | grep -v total | grep buffers | tr -s ' ' | cut -d ' ' -f4.chomp.to_i

That should work I do believe. Or does memfree have to be a string?

@andrewsben
Copy link

damn github killed my backticks

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