Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > P

ptree(1)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

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:

/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).

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.