Activity Monitor has a number of columns that show different measurements of memory usage for each process. Including:
- Memory
- Real Memory (various)
- Compressed Memory
How can I display these for a specific process or app in Terminal, AppleScript or Xcode?
Best Answer
The terminal command
top -stats
is what you need to use. Executingman top
will give you all the usage info.Note: The keys used in the
-stat
option are listed under the-o
option.Here are some sample
top -stats
commands you can try to see what you can glean from the output with different keys.top -stats cpu,mem,pid
top -stats cpu,mem,pid -pid 106
top -stats cpu,mem,pid,command
The last command example outputs this: