I’m running Mac OS 10.6. I want to run top to get memory usage, but not in interactive mode, or any mode that updates. I just want memory usage at that point in time then return to prompt. I’ve looked for other utilities to get memory usage… but came up short (vm_stat is for virtual memory). Can someone direct me how to get top or something else to print memory usage to stdout?
I’m running Mac OS 10.6. I want to run top to get memory usage,
Share
top -l 1will put just one sample to standard output (you can redirect it, filter it, etc, as you wish of course).man topfor many more details.