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

NAME

6       pstree - display a tree of processes
7

SYNOPSIS

9       pstree [-a] [-c] [-h|-Hpid] [-l] [-n] [-p] [-u] [-Z] [-A|-G|-U]
10       [pid|user]
11       pstree -V
12

DESCRIPTION

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

OPTIONS

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

FILES

91       /proc     location of the proc file system
92

AUTHORS

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

BUGS

98       Some character sets may be incompatible with the VT100 characters.
99
100

SEE ALSO

102       ps(1), top(1).
103
104
105
106Linux                             2004-11-09                         PSTREE(1)
Impressum