Pstree

Unix command that shows the running processes as a tree
pstree output in FreeBSD

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.

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}

See also

  • top
  • ps
  • kill
  • nice
  • tree

References

  1. ^ "Ps(1): Report snapshot of current processes - Linux man page".

External links

  • The psmisc package
  • The pstree Command by The Linux Information Project (LINFO)
  • Gnome Process Tree
  • The portable version of pstree on GitHub
  • pstree(1) – Linux General Commands Manual
  • ptree(1) – Solaris 11.4 User Commands Reference Manual
  • v
  • t
  • e
Unix command-line interface programs and shell builtins
File system
  • cat
  • chattr
  • chmod
  • chown
  • chgrp
  • cksum
  • cmp
  • cp
  • dd
  • du
  • df
  • file
  • fuser
  • ln
  • ls
  • mkdir
  • mv
  • pax
  • pwd
  • rm
  • rmdir
  • split
  • tee
  • touch
  • type
  • umask
Processes
User environment
Text processing
Shell builtins
  • alias
  • cd
  • echo
  • test
  • unset
  • wait
Searching
Documentation
Software development
Miscellaneous
  • bc
  • cal
  • expr
  • lp
  • od
  • sleep
  • true and false
  • Categories
    • Standard Unix programs
    • Unix SUS2008 utilities
  • List


Stub icon

This Unix-related article is a stub. You can help Wikipedia by expanding it.

  • v
  • t
  • e