1PSTREE(1)                        User Commands                       PSTREE(1)
2
3
4

NAME

6       pstree - display a tree of processes
7

SYNOPSIS

9       pstree [-a|--arguments] [-c|--compact] [-h|--high‐
10       light-all|-Hpid|--highlight-pid pid] [-l|--long] [-n|--numeric-sort]
11       [-p|--show-pids] [-u|--uid-changes] [-Z|--security-context]
12       [-A|--ascii|-G|--vt100|-U|--unicode] [pid|user]
13       pstree -V|--version
14

DESCRIPTION

16       pstree shows running processes as a tree. The tree is rooted at  either
17       pid or init if pid is omitted. If a user name is specified, all process
18       trees rooted at processes owned by that user are shown.
19
20       pstree visually merges identical branches by  putting  them  in  square
21       brackets and prefixing them with the repetition count, e.g.
22
23           init-+-getty
24                |-getty
25                |-getty
26                `-getty
27
28       becomes
29
30           init---4*[getty]
31
32
33       Child  threads  of a process are found under the parent process and are
34       shown with the process name in curly braces, e.g.
35
36           icecast2---13*[{icecast2}]
37
38
39       If pstree is called as pstree.x11 then it will prompt the user  at  the
40       end of the line to press return and will not return until that has hap‐
41       pened. This is useful for when pstree is run in a xterminal.
42
43

OPTIONS

45       -a     Show command line arguments. If the command line of a process is
46              swapped out, that process is shown in parentheses. -a implicitly
47              disables compaction for processes but not threads.
48
49       -A     Use ASCII characters to draw the tree.
50
51       -c     Disable compaction of identical subtrees. By  default,  subtrees
52              are compacted whenever possible.
53
54       -G     Use VT100 line drawing characters.
55
56       -h     Highlight the current process and its ancestors. This is a no-op
57              if the terminal doesn't support highlighting or if  neither  the
58              current  process  nor  any  of  its ancestors are in the subtree
59              being shown.
60
61       -H     Like -h, but highlight the  specified  process  instead.  Unlike
62              with  -h,  pstree  fails  when  using  -H if highlighting is not
63              available.
64
65       -l     Display long lines. By default, lines are truncated to the  dis‐
66              play  width or 132 if output is sent to a non-tty or if the dis‐
67              play width is unknown.
68
69       -n     Sort processes with the same ancestor by PID instead of by name.
70              (Numeric sort.)
71
72       -p     Show  PIDs.  PIDs  are  shown  as decimal numbers in parentheses
73              after each process name. -p implicitly disables compaction.
74
75       -u     Show uid transitions. Whenever the uid of a process differs from
76              the uid of its parent, the new uid is shown in parentheses after
77              the process name.
78
79       -U     Use UTF-8 (Unicode) line drawing characters. Under Linux  1.1-54
80              and  above,  UTF-8  mode  is entered on the console with echo -e
81              '\033%8' and left with echo -e '\033%@'
82
83       -V     Display version information.
84
85       -Z     (SELinux) Show security context for each process. This flag will
86              only work if pstree is compilied with SELinux support.
87

FILES

89       /proc     location of the proc file system
90

AUTHORS

92       Werner     Almesberger     <werner@almesberger.net>     Craig     Small
93       <csmall@small.dropbear.id.au>
94

BUGS

96       Some character sets may be incompatible with the VT100 characters.
97
98

SEE ALSO

100       ps(1), top(1).
101
102
103
104Linux                             2009-12-16                         PSTREE(1)
Impressum