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] [-t, --thread-names]
13       [-T, --hide-threads] [-u, --uid-changes] [-Z, --security-context]
14       [-A, --ascii, -G, --vt100, -U, --unicode] [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.   -g  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  either
78              the  COLUMNS environment variable or the display width.  If nei‐
79              ther of these methods work, the default of 132 columns is used.
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       -t     Show full names for threads when available.
98
99       -T     Hide threads and only show processes.
100
101       -u     Show uid transitions.  Whenever the uid  of  a  process  differs
102              from  the uid of its parent, the new uid is shown in parentheses
103              after the process name.
104
105       -U     Use UTF-8 (Unicode) line drawing characters.  Under Linux 1.1-54
106              and  above,  UTF-8  mode  is entered on the console with echo -e
107              ' 33%8' and left with echo -e ' 33%@'
108
109       -V     Display version information.
110
111       -Z     (SELinux) Show security context for  each  process.   This  flag
112              will only work if pstree is compiled with SELinux support.
113

FILES

115       /proc  location of the proc file system
116

BUGS

118       Some character sets may be incompatible with the VT100 characters.
119

SEE ALSO

121       ps(1), top(1).
122
123
124
125psmisc                            2016-06-18                         PSTREE(1)
Impressum