hishamhm / htop

htop is an interactive text-mode process viewer for Unix systems. It aims to be a better 'top'.
GNU General Public License v2.0
5.84k stars 581 forks source link

Add options to display parents and children processes in filter view #973

Open ashamza opened 4 years ago

ashamza commented 4 years ago

Add two new display options for filtering mode:

I imagine a regular use case (at least it's my main use case) where user has multiple commands being executed in different screen/tmux windows which user would like to monitor without the distractions from kernel tasks and other processes.

Example how it looks like with the two options enabled.

CPU% MEM%   TIME+  Command                                                                                                                                             
 0.0  0.1  0:26.54 /sbin/init splash
 0.0  0.1  0:00.23 ├─ /lib/systemd/systemd --user
 0.0  0.0  0:00.94 │  ├─ tmux                                                                                                                                          
 0.0  0.1  0:00.09 │  │  ├─ -bash
 0.0  0.0  0:00.00 │  │  │  └─ -bash
 0.0  0.0  0:00.00 │  │  │     └─ tail -f tmp.sh
 0.0  0.1  0:00.07 │  │  ├─ -bash
 0.0  0.1  0:00.02 │  │  │  └─ vi edit.txt
 0.0  0.1  0:00.14 │  │  └─ -bash
 4.6  0.1  0:02.60 │  │     └─ ./install_dir/bin/htop 
 1.3  0.5  1:02.26 │  ├─ /usr/lib/gnome-terminal/gnome-terminal-server
 0.0  0.1  0:01.06 │  │  └─ bash
 0.0  0.0  0:00.00 │  │     └─ tmux

F1Help  F2Setup F3SearchF4FilterF5SortedF6CollapF7Nice -F8Nice +F9Kill  F10Quit