Operating System - HP-UX
1825010 Members
3420 Online
109678 Solutions
New Discussion юеВ

ps -ef display restrction

 
James Hunt
Advisor

ps -ef display restrction

I currently have two processes running that look identical when I do a ps -ef . They have very long process names with the only difference being right at the end of the string - beyond the length of the display. Consequently I'm having difficulty deciding which is which. I get around it by trying to 'grab' the processID when starting the process but I would like to be able to tell which is which from the ps -ef. Any ideas?
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: ps -ef display restrction

James,

Recent versions (11.x) give you the -x option to ps. From the man page:

"-x Shows the command line in extended format."


Have you tried that yet?


Pete


Pete
Massimo Bianchi
Honored Contributor

Re: ps -ef display restrction

try

UNIX95= ps -e -o comm,args,pid

look at the space between UNIX95 and ps !!

Massimo
James R. Ferguson
Acclaimed Contributor

Re: ps -ef display restrction

Hi James:


If you are running 11.11 or a patched version of 11.0 add the '-x' option:

# ps -efx

For 11.0, PHCO_26274, PHKL_29434 & PHKL_26008 add the '-x' option to 'ps' and enable the 'pstat(2)' interface to handle the kernel's extended storage (up to 1020 characters).

Regards!

...JRF...
James Hunt
Advisor

Re: ps -ef display restrction

It looks like I'll need to patch my HPUX11.0 and add the '-x' option. The 'UNIX95' suggestion just gave me the same output albeit in a different format.
Thanks everyone for your time.
Scot Bean
Honored Contributor

Re: ps -ef display restrction

Yep, looks like PHCO_26274 (and its dependencies) deliver this feature on 11.00.

Standard in 11i.

Earliest QPK is Sep02 11.00 QPK.
Joe Zhou
New Member

Re: ps -ef display restrction

what if someone wants to see a command more than 1020 characters? Where to change in the system in order to display more than 1020 chars? There are many java applications with long classpath and jar files, often exceed 1020 char.

Thanks.

-Joe