NAME
ptree — prints the process tree hierarchy
SYNOPSIS
ptree
[-s]
[pid1|username1
[pid2|username2]...]
DESCRIPTION
ptree
prints the process tree of all processes that match
the specified arguments.
While printing the tree, the child processes are indented to the right from
their respective parent processes.
Options
- -s
Prints the tree starting from the children of
swapper
(usually pid 0).
The default is to print the tree starting from the children of
init
(pid 1).
Operands
- pid
Print the process tree for the process ID number specified by
pid.
- username
Print the process tree for all the processes from the user
specified by
username.
Note that only username
(and not user ID)
can be specified for this instance.
If no operands are specified, then
ptree
prints the process tree of all processes starting
from the children of
init
or
swapper
(if
-s
is specified).
EXTERNAL INFLUENCES
Environment Variables
If
LANG
is not specified or is null, it defaults to
C
(see
lang(5)).
EXAMPLES
Print the process tree for pid 100 and for all processes owned by
user1:
WARNINGS
Process information
can change while
ptree
is running; the tree
displayed by
ptree
is only a snapshot in time.
Some data printed for defunct processes is irrelevant.
Users of
ptree
must not rely on the exact field widths and spacing of its output,
as these will vary depending on the system and the release of HP-UX.