ptree.1 (2010 09)

p
ptree(1) ptree(1)
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 chil-
dren 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:
/usr/bin/ptree 100 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.
SEE ALSO
pgrep(1), pkill(1), ps(1), fork(2).
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)