1832977 Members
2593 Online
110048 Solutions
New Discussion

Re: pstree

 
Greg Hall
Frequent Advisor

pstree

Hi,

is there anything like pstree, to list a process tree - parent and children, in HPUX?

thanks,Greg
Confucious Confused
2 REPLIES 2
John Poff
Honored Contributor

Re: pstree

Greg,

Try this:

UNIX95=1 ps -e -H


Here is a snippet from the ps man page:

-H (XPG4 Only.) Shows the process hierarchy. Each process is displayed under its parent, and the contents of the args or comm column for that process is indented from that of its parent. Note that this option is expensive in both memory and speed.

You have to set the UNIX95 environment variable to use the XPG4 features of 'ps', but just set it on the command where you run 'ps' as UNIX95 can effect many other commmands also.

JP
Bill McNAMARA_1
Honored Contributor

Re: pstree

Here's a nice link on it
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xcaa1854994d9d4118fef0090279cd0f9,00.html

To see other parameters and differences 'man ps' and look for XPG or UNIX95.

ps -C process_name
save you typing a grep!

For some other interesting env variables see 'man environ'.

Bill
It works for me (tm)