MacOS – top, group by command

command linemacos

Is it possible to run top and group processes by COMMAND?
Seeing every single individual Chrome process not very helpful

PID                     COMMAND                           %CPU                  MEM
0                       kernel_task                       2.5                   1219M
82793-                  Google Chrome He                  0.0                   427M
15051-                  Google Chrome He                  5.3                   308M+
82557-                  Google Chrome                     7.1                   285M-
14398-                  Google Chrome He                  0.1                   253M-
14580-                  Google Chrome He                  0.1                   250M+
90                      WindowServer                      1.8                   218M-
82626-                  Google Chrome He                  23.1                  194M-
82666-                  Google Chrome He                  0.2                   191M-
86580-                  Google Chrome He                  0.7                   171M-
14596-                  Google Chrome He                  0.5                   164M-
82630-                  Google Chrome He                  1.0                   141M-
82633-                  Google Chrome He                  0.1                   135M-
82622-                  Google Chrome He                  0.5                   134M-
14592-                  Google Chrome He                  0.4                   131M+
82632-                  Google Chrome He                  0.2                   130M+
82663-                  Google Chrome He                  0.4                   130M-
82623-                  Google Chrome He                  0.4                   124M-
82621-                  Google Chrome He                  0.5                   119M-

Best Answer

The key function of top is to offer a life view of all processes in the system, sorted by whatever option you choose. As Chrome spawns several processes (one per tab), they all will be shown (same happens with Safari/Webkit actually).

As an alternative you can install pstree (see this answer for installation instructions) which displays the process hierarchy (but doesn't offer live updating).