pstree

pstree is a Linux command that shows the running processes as a tree. It is used as a more visual alternative to the ps command. The root of the tree is either init or the process with the given pid. It can also be installed in other Unix systems.

pstree output in FreeBSD

In BSD systems, a similar output is created using ps -d, in Linux ps axjf[1] produces similar output.

Examples

pstree pid

user@host ~$ pstree 1066
rsyslogd─┬─{in:imjournal}
         └─{rs:main Q:Reg}

pstree username

user@host ~# pstree username
dbus-daemon───{dbus-daemon}

dbus-launch

bash───firefox─┬─6*[{Analysis Helper}]
               ├─{BgHangManager}
               ├─{Cache2 I/O}
               ├─{Compositor}
               ├─{GMPThread}
               ├─{Gecko_IOThread}
               ├─{Hang Monitor}
               ├─{ImageBridgeChil}
               ├─{ImageIO}
               ├─{JS Watchdog}
               ├─{Link Monitor}
               ├─{Socket Thread}
               ├─{SoftwareVsyncTh}
               ├─{StreamTrans #1}
               ├─{Timer}
               └─{gmain}
gollark: Oh yes, and on the Linux thing: it's not not a suitable desktop OS because some vague level of technical competence is required, or because of market share.
gollark: Yes, it's not ideal otherwise.
gollark: Also, the nonremovable cable is meant to reduce voltage drop or something.
gollark: <@151391317740486657> On the data gathering thing: yes, I don't throw away all my stuff in order to not be spied on by Google/MS/whoever, that would be very impractical.
gollark: It's reasonably general purpose and is used happily by some people! You may not like it but it is good for some.

See also

References


This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.