Operating System - HP-UX
1829320 Members
1718 Online
109989 Solutions
New Discussion

ps -ef | complete process command and arguments.

 
SOLVED
Go to solution
Paddy_1
Valued Contributor

ps -ef | complete process command and arguments.

On AIX when I use ps -ef | grep java I get a complete listing of the command issues and its arguments whereas HP-UX truncates it to some fixed length(I think 256).How do I extend this to view the complete arguments so as to let me differentiate between two instances.

How do I go about seeing the complete thing.
For example currently I see the following :

someflow 24286 24285 0 Oct 27 ? 0:00 /opt/java1.3/jre/bin/../bin/PA_RISC2.0/native_threads/java -cp
wasadmin 574 1 0 Oct 31 ? 45:59 /opt/WebSphere/AppServer/java/bin/../bin/PA_RISC2.0/native_thre
someflow 12562 1 0 Nov 1 ? 13:21 /opt/java1.4/bin/PA_RISC2.0/java -Djava.rmi.server.codebase=fil
wasadmin 7433 574 0 Oct 31 ? 28:45 /opt/WebSphere/AppServer/java/bin/../bin/PA_RISC2.0/native_thre

Thanks for your support
Paddy
The sufficiency of my merit is to know that my merit is NOT sufficient
8 REPLIES 8
Pete Randall
Outstanding Contributor
Solution

Re: ps -ef | complete process command and arguments.

Paddy,

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
Camel_1
Valued Contributor

Re: ps -ef | complete process command and arguments.

user ps -exf, it shows the lines in extend format.
Marco Santerre
Honored Contributor

Re: ps -ef | complete process command and arguments.

-x in your option list of ps is the answer to your problem
Cooperation is doing with a smile what you have to do anyhow.
Graham Cameron_1
Honored Contributor

Re: ps -ef | complete process command and arguments.

Have you tried "ps -ex" ?

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
Ramkumar Devanathan
Honored Contributor

Re: ps -ef | complete process command and arguments.

paddy,

"ps -eo args" will work too. but it does have a limitation on the length of the command line.

let me know if this works better with ps -x.

run as below -

# UNIX95=1 ps -eo args

HTH.
- ramd.
HPE Software Rocks!
Paddy_1
Valued Contributor

Re: ps -ef | complete process command and arguments.

Ram,
Here is the output with ps -eo.Thats exactly i use on AIX but of no avail on HP-UX
$ps -eo args
ps: illegal option -- o
usage: ps [-edaflP] [-u ulist] [-g glist] [-p plist] [-t tlist] [-R prmgroup]

I am running HP-Version B.11.00

The sufficiency of my merit is to know that my merit is NOT sufficient
Ramkumar Devanathan
Honored Contributor

Re: ps -ef | complete process command and arguments.

Paddy,

This requires to be run as below since this is a feature based on the unix 95 standard.

# UNIX95=1 ps -eo args

a lot of other options are supported too, such as the process length, cpu usage in last interval, etc.

look up the manpage - that should give you some more details.

hth.
- ramd.
HPE Software Rocks!
Scot Bean
Honored Contributor

Re: ps -ef | complete process command and arguments.

FYI.

PHCO_26274 (and its dependencies) deliver this feature on 11.00.

Standard in 11i.

Earliest 11.00 QPK is Sep02.