Just change the script to

top -l 1 | awk '/PhysMem/ {print $2}

for RAM used or

top -l 1 | awk '/PhysMem/ {print $6}

for RAM free


User Avatar
gjavot 2207 days ago
Thanks a lot !
User Avatar
gjavot 2207 days ago
but i still have an issue :

I have 0 % and the graph is still out of order why ?

I think this line is in cause (maybe {print $4}' is different now…)

yActiveMem=`top -l 1 | awk '/PhysMem/ {print $4}' | sed s/M// `
User Avatar
cooperred 2206 days ago
can you upload the geeklet? i'm still having issues getting the graph to show
User Avatar
gjavot 2200 days ago
Sure you can get it from this link :

User Avatar
imtdeepak 2196 days ago
Active memory is also not printed correctly change it to

`top -l 1 | awk '/PhysMem/ {print $4}' | sed s/M// | sed s/\(//`
User Avatar
flbrooklynboy007 2193 days ago
Thanks A LOT Leper, kept scratching my head trying to figure it out, all it took was one small edit and voila!
User Avatar
teejeaux 2190 days ago
I'm having a problem because the PhysMem changes from MB to GB when it goes over 50% of my RAM usage, and it breaks at that time. Anyone know how to write the code to check and see if there is a G or an M and then convert it for use in the Geeklet?
User Avatar
gvantass 2184 days ago
The glet linked by gjavot doesn't seem to work. I haven't looked at it closely, but the memory utilization and CPU utilization don't show anything... They are 0% when I *know* that I'm using CPU and ram.

any help?
User Avatar
morrow 2168 days ago
In case you need just the "Memory Free" in Maverick I use:

memory_pressure | awk '/System-wide memory free/ {print $5}'

Log in to comment or register here.