PSTREE(1)

NAME
pstree - list processes as a tree

SYNOPSIS
pstree [-Uw] [-f file] [-g n] [-u user] [-s string] [-p pid] [pid ...]

DESCRIPTION
Tree sorted output frontend for ps(1). pstree uses the output of the ps(1) program to show a nicely formatted process family tree.

If given one or more pid arguments pstree shows just the branches rooted at the given pids. By default it starts at pid 1. (If no argument is given).

The options are as follows:

-U  Don't show branches containing only root processes.

-w  Wide output, not truncated to window width.

-f file
    Read input from file (- is stdin) instead of running “ps -kaxwwo user,pid,ppid,pgid,command”.

-g n
    Use graphics chars for tree. n = 1: IBM-850, n = 2: VT100.

-u user
    Show only branches containing processes of user.

-s string
    Show only branches containing process with string in commandline.

-p pid
    Show only branches containing process pid.

EXAMPLES
Show branches of processes containing “httpd” using VT100 graphic chars:

$ pstree -g 2 -s httpd

Show process number “15495” and its descendants:

$ pstree 15495

SEE ALSO
ps(1), top(1)