Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 06:54 AM
02-07-2002 06:54 AM
I'm looking for a command like "ptree" (SUN Solaris) in HP-UX 11.0, that gives me a process-tree of all processes (parent - child). I want to integrate it into a shell-skript, so I can't use sam. Is there everything else like ps -ef | grep -v grep | grep
Any Idea?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 06:58 AM
02-07-2002 06:58 AM
Re: ptree
You could try:
# UNIX95= ps -eH
Note the blank after the UNIX95 variable and the absence of any semicolon before the 'ps' command. This sets the XPG4 behavior for the duration of the command line only.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 07:16 AM
02-07-2002 07:16 AM
Re: ptree
http://www.netwinder.org/~rocky/xps-home/xps.html
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 07:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 07:40 AM
02-07-2002 07:40 AM
Re: ptree
forget about xps, it doesn't run on hpux - those dogs!
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 08:25 AM
02-07-2002 08:25 AM
Re: ptree
To sort all the proceses by memory size:
# UNIX95= ps -eo vsz,ruser,args | sort -rn | more
To find all processes that have a specific basename:
# UNIX95= ps -fC process_name
No grep needed, and most important, it returns ONLY the deamon (or process) you are after. Check out the difference between:
ps -ef | grep sh
UNIX95= ps -fC sh
The second form (which activates the -C option in XPG4 mode) is really inetresting.
Another feature is the ability to create a customized output format, if you don't need start-time (which varies in format), you can eliminate it. Consider this form:
UNIX95= ps -C sh -o ruser,pid,args
g'd luck
t++
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 01:26 PM
02-07-2002 01:26 PM
Re: ptree
Isn't that one of the char in "The Land Before Time"?
Sorry, my daughter had me watch it with her the other night.
The above UNIX95 should give you what you want.
...jcd...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 11:36 PM
02-07-2002 11:36 PM
Re: ptree
Regards!
Mischa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2002 12:38 AM
02-08-2002 12:38 AM
Re: ptree
the UNIX95- Variable should be set only when needed, because there are a lot of other shell scripts, used by your system, which have problems if this variable is set. ( Some of them even have a command line: unset UNIX95 )
Another remark: You can use the option -H for the ps- command no matter which value was assigned to the variable.
Allways stay on the bright side of life!
Peter