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

The CPU calculation returns the wrong number when the free memory on the machine is over 1000M #1

Open
joeblau opened this issue Apr 14, 2013 · 0 comments

Comments

@joeblau
Copy link

joeblau commented Apr 14, 2013

In memScale.sh the line
top -l 1 | awk '/Phys/{gsub(/[a-zA-Z]/,""); printf "%.0f", ($10/($8+$10))*100}'
Returns
PhysMem: 2410M wired, 2986M active, 190M inactive, 5586M used, 11G free.

And the script parses that 11G free incorrectly resulting in this scale

100%
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
mem

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

1 participant