bottom icon indicating copy to clipboard operation
bottom copied to clipboard

For tree mode, add an option to sort the top-level parent processes according to the summation of resource usage of child processes.

Open whatbh opened this issue 2 years ago • 2 comments

In the current behavior of tree mode, when sorting process by resource usage (CPU, mem), the sorting is according to the values of top-level processes. This leads to situation when parent process using little resource can spawn heavy child processes, and these processes are buried at the bottom of the process viewer. One idea to make this more convenient is to summarize the resource usage of all child processes, and sort the top-level parent processes according to these values. This behavior can be make into separate command line flag to avoid tampering with existing behavior. Using summation scheme, either a parent process contains a few child processes that's very heavy, or contain many processes that is heavy when summed up, it is sorted to the top.

whatbh avatar Feb 27 '22 09:02 whatbh

Even though I'm using a 1440p monitor, my screen isn't long enough to show all the subprocesses, obviously your work is necessary. In tree mode, all non-PID1 processes are collapsed by default, which is also very helpful for usability.

daiaji avatar Apr 23 '22 11:04 daiaji

This is something I've been looking for too. In addition to sorting, it would also be nice to actually see the total memory usage of a tree displayed somewhere. Maybe we can just have another column for this?

EDIT: Never mind, this is already possible by going to tree mode (T), and then collapsing the tree (-/+)

musjj avatar Mar 14 '23 07:03 musjj