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] [-g] --show-pgids] [-l, --long]
11       [-n, --numeric-sort] [-N, --ns-sortns [-p, --show-pids]
12       [-s, --show-parents] [-S, --ns-changes] [-u, --uid-changes]
13       [-Z, --security-context] [-A, --ascii, -G, --vt100, -U, --unicode]
14       [pid, user]
15       pstree -V, --version
16

DESCRIPTION

18       pstree shows running processes as a tree.  The tree is rooted at either
19       pid  or  init  if  pid  is  omitted.   If a user name is specified, all
20       process trees rooted at processes owned by that user are shown.
21
22       pstree visually merges identical branches by  putting  them  in  square
23       brackets and prefixing them with the repetition count, e.g.
24
25           init-+-getty
26                |-getty
27                |-getty
28                `-getty
29
30       becomes
31
32           init---4*[getty]
33
34
35       Child  threads  of a process are found under the parent process and are
36       shown with the process name in curly braces, e.g.
37
38           icecast2---13*[{icecast2}]
39
40
41       If pstree is called as pstree.x11 then it will prompt the user  at  the
42       end of the line to press return and will not return until that has hap‐
43       pened.  This is useful for when pstree is run in a xterminal.
44
45       Certain kernel or mount parameters, such  as  the  hidepid  option  for
46       procfs,  will  hide information for some processes. In these situations
47       pstree will attempt to build the tree without this information, showing
48       process names as question marks.
49
50

OPTIONS

52       -a     Show  command  line arguments.  If the command line of a process
53              is swapped out,  that  process  is  shown  in  parentheses.   -a
54              implicitly disables compaction for processes but not threads.
55
56       -A     Use ASCII characters to draw the tree.
57
58       -c     Disable  compaction of identical subtrees.  By default, subtrees
59              are compacted whenever possible.
60
61       -G     Use VT100 line drawing characters.
62
63       -h     Highlight the current process and its ancestors.  This is a  no-
64              op  if  the  terminal doesn't support highlighting or if neither
65              the current process nor any of its ancestors are in the  subtree
66              being shown.
67
68       -H     Like  -h,  but  highlight the specified process instead.  Unlike
69              with -h, pstree fails when  using  -H  if  highlighting  is  not
70              available.
71
72       -g     Show  PGIDs.   Process Group IDs are shown as decimal numbers in
73              parentheses after each process  name.   -p  implicitly  disables
74              compaction.   If both PIDs and PGIDs are displayed then PIDs are
75              shown first.
76
77       -l     Display long lines.  By default, lines are truncated to the dis‐
78              play  width or 132 if output is sent to a non-tty or if the dis‐
79              play width is unknown.
80
81       -n     Sort processes with the same ancestor by PID instead of by name.
82              (Numeric sort.)
83
84       -N     Show  individual trees for each namespace of the type specified.
85              The available types are: ipc, mnt, net, pid, user, uts.  Regular
86              users  don't  have access to other users' processes information,
87              so the output will be limited.
88
89       -p     Show PIDs.  PIDs are shown as  decimal  numbers  in  parentheses
90              after each process name.  -p implicitly disables compaction.
91
92       -s     Show parent processes of the specified process.
93
94       -S     Show  namespaces  transitions.   Like  -N, the output is limited
95              when running as a regular user.
96
97       -u     Show uid transitions.  Whenever the uid  of  a  process  differs
98              from  the uid of its parent, the new uid is shown in parentheses
99              after the process name.
100
101       -U     Use UTF-8 (Unicode) line drawing characters.  Under Linux 1.1-54
102              and  above,  UTF-8  mode  is entered on the console with echo -e
103              ' 33%8' and left with echo -e ' 33%@'
104
105       -V     Display version information.
106
107       -Z     (SELinux) Show security context for  each  process.   This  flag
108              will only work if pstree is compilied with SELinux support.
109

FILES

111       /proc  location of the proc file system
112

BUGS

114       Some character sets may be incompatible with the VT100 characters.
115

SEE ALSO

117       ps(1), top(1).
118
119
120
121psmisc                            2012-07-28                         PSTREE(1)
Impressum