- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to see the complete listing of a process u...
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
04-20-2005 12:28 AM
04-20-2005 12:28 AM
How to see the complete listing of a process using ps
In sun there is a alternative command "/usr/ucb/ps -auxwww" that gives the full listing for the command.
Can anyone please help me out with doing the same on hpux.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2005 12:34 AM
04-20-2005 12:34 AM
Re: How to see the complete listing of a process using ps
# UNIX95= ps -e -opid -o args
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2005 12:35 AM
04-20-2005 12:35 AM
Re: How to see the complete listing of a process using ps
ps -efx > x.x
vi x.x
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2005 12:53 AM
04-20-2005 12:53 AM
Re: How to see the complete listing of a process using ps
is what you can get. If it's truncated, you cannot get more. at least not on HP-UX with ps
you could dive into the /dev/mem space for that process to find the argc/argv, but by the time you found it, the process has ended
It's time HP-UX would support Linux' /proc system (optional) :)
perl's Proc::ProcessTable /might/ give you more:
Linux:
lt09:/home/merijn 116 > perl -MProc::ProcessTable -le'$p=Proc::ProcessTable->new;for(@{$p->table}){$_->pid == $$ and print $_->pid," ",$_->cmndline}'
8899 perl -MProc::ProcessTable -le$p=Proc::ProcessTable->new;for(@{$p->table}){$_->pid == $$ and print $_->pid," ",$_->cmndline}
lt09:/home/merijn 117 >
HP-UX 11.00 (see the truncation):
a5:/u/usr/merijn 101 > perl -MProc::ProcessTable -le'$p=Proc::ProcessTable->new;for(@{$p->table}){$_->pid == $$ and print $_->pid," ",$_->cmndline}'
15587 perl -MProc::ProcessTable -le$p=Proc::ProcessTable->new;for(
a5:/u/usr/merijn 102 >
HP-UX 11.11 (other truncation):
r3:/u/usr/merijn 101 > perl -MProc::ProcessTable -le'$p=Proc::ProcessTable->new;
for(@{$p->table}){$_->pid == $$ and print $_->pid," ",$_->cmndline}'
24860 perl -MProc::ProcessTable -le$p=Proc::ProcessTable->new;for(@{$
r3:/u/usr/merijn 102 >
HP-UX 10.20 (same as 11.00):
d3:/u/usr/merijn 103 > perl -MProc::ProcessTable -le'$p=Proc::ProcessTable->new;for(@{$p->table}){$_->pid == $$ and print $_->pid," ",$_->cmndline}'
667 perl -MProc::ProcessTable -le$p=Proc::ProcessTable->new;for(
d3:/u/usr/merijn 104 >
AIX 5.2 (no truncation):
i4:/u/usr/merijn 101 > perl -MProc::ProcessTable -le'$p=Proc::ProcessTable->new;for(@{$p->table}){$_->pid == $$ and print $_->pid," ",$_->cmndline}'
25332 perl -MProc::ProcessTable -le$p=Proc::ProcessTable->new;for(@{$p->table}){$_->pid == $$ and print $_->pid," ",$_->cmndline}
i4:/u/usr/merijn 102 >
AIX 4.3 (no truncation):
i2:/u/usr/merijn 101 > perl -MProc::ProcessTable -le'$p=Proc::ProcessTable->new;for(@{$p->table}){$_->pid == $$ and print $_->pid," ",$_->cmndline}'
27332 perl -MProc::ProcessTable -le$p=Proc::ProcessTable->new;for(@{$p->table}){$_->pid == $$ and print $_->pid," ",$_->cmndline}
i2:/u/usr/merijn 102 >
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2005 12:55 AM
04-20-2005 12:55 AM
Re: How to see the complete listing of a process using ps
You can see a lot but from man ps
args The command line given when the process was
created. This column should be the last one
specified, if it is desired. Only a subset of the
command line is saved by the kernel; as much of
the command line will be displayed as is
available. The output in this column may contain
spaces. The default heading for this column is
COMMAND if -o is specified and CMD otherwise.
Thus for a long command forget it
export UNIX95=XPG4
ps -exH -o user,ruser -o pid,ppid -o args="Command_arguments_used_______________
________________________________________________________________________________
__________________________________________"
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2005 01:15 AM
04-20-2005 01:15 AM
Re: How to see the complete listing of a process using ps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2005 04:55 PM
04-20-2005 04:55 PM
Re: How to see the complete listing of a process using ps
$ ps -efx
Please note that this option is not avaiable by default in 11.00, you can either install patch for this or you can enable XPG4 behavior by setting env variable UNIX95.
$ UNIX95=1 ps -e -o pid,args
To add spice, be aware that program that changes their name while calling exec will see that "command name without -x" is not same as the "basename of first argument of commmand line with -x".