Geektool-Scripts icon indicating copy to clipboard operation
Geektool-Scripts copied to clipboard

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

Open joeblau opened this issue 12 years ago • 0 comments

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

joeblau avatar Apr 14 '13 13:04 joeblau