Add option to show processes within a cgroup in cgroup view #8238
Description
In #8114 it was stated that "Personally, I think cgroup view is much more informative. Process names are often named really strangely and is not very informative.". This can be true, but not in every case.
Consider for example this cgroup view that below presents:
│└─ user.slice 190.94% 20.6 GB 0.07% 0.00% 14.10% 21.1 MB/s 111.7 MB/s 132.8 MB/s 53 15 1805 |│
│ └─ user-1000.slice 190.94% 20.5 GB 0.08% 0.00% 13.62% 21.1 MB/s 111.7 MB/s 132.8 MB/s 52 12 1805 |│
│ └─ session-3.scope 1.43% 1 GB 0.00% 0.00% 0.00% 0.0 B/s 0.0 B/s 0.0 B/s 0 0 34 |│
│ └─ [email protected] 189.51% 19.5 GB 0.10% 0.00% 13.60% 21.1 MB/s 111.7 MB/s 132.8 MB/s 50 12 1771 |│
│ └─ app.slice 189.54% 19.5 GB 0.10% 0.00% 13.71% 21.1 MB/s 111.7 MB/s 132.8 MB/s 36 12 1684 |│
│ └─ app-git\x2dmaintenance.slice 0.00% 1.8 GB 0.00% 0.00% 0.00% 0.0 B/s 0.0 B/s 0.0 B/s 0 4 0 |│
│ └─ app-gnome-Nextcloud-64991.scope 0.01% 102.3 MB 0.00% 0.13% 0.13% 0.0 B/s 0.0 B/s 0.0 B/s 0 0 16 |│
│ └─ app-gnome-blueman-65005.scope 0.04% 19.8 MB 0.00% 0.00% 0.00% ? ? ? 0 0 10 |│
│ └─ app-gnome-herbstluftwm-64986.scope 1.39% 888.8 MB 0.00% 0.00% 0.00% 0.0 B/s 0.0 B/s 0.0 B/s 0 0 81 |│
│ └─ app-gnome-org.gnome.Evolution\x2dal 0.00% 3.6 MB 0.00% 0.00% 0.00% 0.0 B/s 0.0 B/s 0.0 B/s 0 0 8 |│
│ └─ app-gnome\x2dsession\x2dmanager.sli 0.00% 3.4 MB 0.00% 0.00% 0.00% 0.0 B/s 0.0 B/s 0.0 B/s 1 0 5 |│
│ └─ gnome-session-manager@gnome-flas 0.00% 3.4 MB 0.00% 0.00% 0.00% ? ? ? 0 0 5 |│
│ └─ app-rofi-google\x2dchrome\x2dstable 8.81% 4.6 GB 0.13% 0.00% 7.14% 0.0 B/s 2.3 MB/s 2.3 MB/s 0 0 1100 |│
│ └─ app-rofi-thunderbird-162.service 69.83% 1.4 GB 0.12% 0.00% 0.00% 0.0 B/s 0.0 B/s 0.0 B/s 0 0 114 |│
│ └─ atuin-daemon.service 0.02% 58.7 MB 0.00% 0.00% 0.88% 0.0 B/s 16.6 KB/s 16.6 KB/s 0 0 4 |│
│ └─ dbus.socket 0.00% 0.0 B 0.00% 0.00% 0.00% 0.0 B/s 0.0 B/s 0.0 B/s 0 0 0 ▒│
│ └─ dconf.service 0.00% 444 KB 0.00% 0.00% 0.00% ? ? ? 0 0 4 ▒│
│ └─ dirmngr.service 0.00% 3.3 MB 0.00% 0.00% 0.00% 0.0 B/s 0.0 B/s 0.0 B/s 0 0 1 ▒│
│ └─ dunst.service 0.00% 4.5 MB 0.00% 0.00% 0.00% ? ? ? 0 0 6 ▒│
│ └─ emacs-29.service 0.00% 91.2 MB 0.00% 0.00% 0.00% 0.0 B/s 0.0 B/s 0.0 B/s 0 0 5 ▒│
│ └─ evolution-addressbook-factory.servi 0.00% 2 MB 0.00% 0.00% 0.00% ? ? ? 0 0 7 ▒│
│ └─ evolution-calendar-factory.service 0.00% 1.9 MB 0.00% 0.00% 0.00% ? ? ? 0 0 10 ▒│
│ └─ evolution-source-registry.service 0.00% 2 MB 0.00% 0.00% 0.00% 0.0 B/s 0.0 B/s 0.0 B/s 0 0 5 ▒│
│ └─ gnome-keyring-daemon.service 0.00% 2.3 MB 0.00% 0.00% 0.00% 0.0 B/s 0.0 B/s 0.0 B/s 0 0 6 ▒│
│ └─ gnome-session-monitor.service 0.00% 612 KB 0.00% 0.00% 0.00% ? ? ? 0 0 2 ▒│
│ └─ kitty-102799-0.scope 0.00% 246 MB 0.00% 0.00% 0.00% 0.0 B/s 0.0 B/s 0.0 B/s 0 0 10 ▒│
│ └─ kitty-106668-0.scope 55.63% 4.1 GB 0.22% 0.00% 9.33% 16.4 MB/s 1.6 KB/s 16.4 MB/s 0 0 13 ▒│
│ └─ kitty-139855-0.scope 0.00% 36.6 MB 0.00% 0.00% 0.00% 0.0 B/s 201.9 KB/s 201.9 KB/s 0 0 24 ▒│
│ └─ kitty-141847-0.scope 0.00% 18.5 MB 0.00% 0.00% 0.00% 0.0 B/s 0.0 B/s 0.0 B/s 0 0 1 ▒│
│ └─ kitty-145762-0.scope 0.00% 1.1 GB 0.00% 0.00% 0.00% 0.0 B/s 0.0 B/s 0.0 B/s 0 0 10 ▒│
│ └─ kitty-146047-0.scope 0.49% 2.3 GB 0.00% 0.00% 32.19% 4.6 MB/s 13.3 MB/s 18 MB/s 0 0 2 ▒│
│ └─ kitty-146185-0.scope 36.41% 1.9 GB 0.43% 0.00% 1.66% 0.0 B/s 95.9 MB/s 95.9 MB/s 0 0 2
Here, the terminal kitty
does the right thing™ and creates a scope for every terminal window. However, just looking at the cgroup view, does not tell me what exactly it is that kitty-106668-0.scope
is performing creating some CPU load.
If the processes with their arguments where listed as descendants of kitty-106668-0.scope
, I would in many cases immediately get an idea what is running there and what it is doing. Right now, I have to zoom (via z
) into the cgroup to see its processes.
BTW, thanks for below, it is IMHO currently the best tool for cgroup-based performance-metric analysis.