I was looking for
command for osx lion. I googled it as usual.
I’ve seen that, there was a command called
and it is not available at the moment.
I decided to write my own script in
This is almost my first Ruby attempt! ( I wrote in Python )
Based on “Activity Monitor.app” on OS X, used memory is a sum of:
memories. I managed to find out installed memory via
sysctl -n hw.memsize
. Here is the
script that i wrote:
Gist is available here
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
I embedded it to my prompt shell aka
. I’ve checked and compared the results via
commands. I get the same exac values. Due to OSX Lion, memory goes wild!!!.
leeches it abnormally. This little script kinda warns me that
it is time to restart Firefox or close it for a while!