1

The command pstree shows a process tree such as this

systemd-+--agetty
        +--dbus-daemon
        +--login----bash---pstree
        +--systemd-qqsd

I want to show a process tree with some specified attribute for each process (may be stat or pid... - options that you can specify with ps -o)

Is there a way to achieve this behavior with pstree or any other ways?

Tran Triet
  • 675
  • 1
  • 11
  • 27

2 Answers2

2

How about top? Start top then hit V (capital V) to display process tree.

Press f to select the fields to display.

Stéphane Chazelas
  • 522,931
  • 91
  • 1,010
  • 1,501
pi0tr
  • 318
  • 1
  • 2
0

pstree and specific attributes are also part of bashtop. The attributes could be switched by shortcuts. In ubuntu it can be installed by

sudo apt install bashtop

enter image description here

lemrm
  • 1
  • 2