Macos – How to monitor memory usage of a process running from the terminal in OSX

macosmemoryosx-mountain-lionterminal

I am running a command line utility called casperJS (installed via node npm) from the OSX terminal. It's a long running process and I'd like to see how much memory it is using, together with any subprocesses.

I don't see the process in Activity Monitor so how I can tell how much memory it is using?

Best Answer

In Activity Monitor, you can view the list of processes hierarchically, to easily find any processes started from Terminal. Just select All Processes, Hierarchically in the toolbar.

Screenshot

For the tool in question, I'd expect the processes to be called phantomjs or slimerjs based on the Python launcher.

Related Question