Skip to main content
Tweeted twitter.com/#!/askdifferent/status/339471340576833536
added 192 characters in body
Source Link
Kal
  • 671
  • 1
  • 7
  • 12

From the command line, how would I get the total physical and virtual memory usage of a process and all of its descendants (not just 1st-level children)?

This is useful when you want to monitor the memory usage of applications that are not monolithic. For instance, Google Chrome spawns a whole bunch of workers and renderers, even though to the user, it's all in only one GUI window. Another example is Firefox, which has separate processes for its plugins.

The Activity Monitor application can display the processes in a hierarchy. But I find it not good enough, for two reasons:

  • It's not command-line;
  • It doesn't sum the numbers for me.

From the command line, how would I get the total physical and virtual memory usage of a process and all of its descendants (not just 1st-level children)?

This is useful when you want to monitor the memory usage of applications that are not monolithic. For instance, Google Chrome spawns a whole bunch of workers and renderers, even though to the user, it's all in only one GUI window. Another example is Firefox, which has separate processes for its plugins.

From the command line, how would I get the total physical and virtual memory usage of a process and all of its descendants (not just 1st-level children)?

This is useful when you want to monitor the memory usage of applications that are not monolithic. For instance, Google Chrome spawns a whole bunch of workers and renderers, even though to the user, it's all in only one GUI window. Another example is Firefox, which has separate processes for its plugins.

The Activity Monitor application can display the processes in a hierarchy. But I find it not good enough, for two reasons:

  • It's not command-line;
  • It doesn't sum the numbers for me.
Source Link
Kal
  • 671
  • 1
  • 7
  • 12

How do I monitor the total physical and virtual memory usage of a process and all of its descendants?

From the command line, how would I get the total physical and virtual memory usage of a process and all of its descendants (not just 1st-level children)?

This is useful when you want to monitor the memory usage of applications that are not monolithic. For instance, Google Chrome spawns a whole bunch of workers and renderers, even though to the user, it's all in only one GUI window. Another example is Firefox, which has separate processes for its plugins.