Complete command list/argument using ps

Hi,

Using ps, I can't work out what is the right options to use to show full listing of the process or command, can someone please advise what options I should be using?

Example output of a "trimmed" process is as below and I know this is not the complete command line that I've executed, basically I want to show the full listing just as how I executed it from the command line.

Any help will be much appreciated. Thanks in advance.

 
devtest  7077  2933  0 18:27:55 pts/tg    1:07 imp devtest/tester@TEST ROWS=Y IGNORE=Y FILE=PRODUCTIONSUMMARY.dmp CONSTRAINTS=N

This is OS dependant.

with root or PID owner.

/usr/ucb/ps -auwwwx 

There is much variation in the "ps" commans. What Operating System and version you you have?

I tend to use "ps aux wwwf", this provides a wide output with "f" giving you the full path output.

Some OS limit the maximum output size. This thread lists Solaris as an example.

man ps

may tell you if your OS has such limits too.

Should you need the non truncated argument list with Solaris, there is the "pargs" command.

Hi all,

Thanks for all the tremendous response ... My apology for not mentioning that the OS is Solaris.

/usr/ucb/ps -auwwwx does the trick although pargs is very helpful too. Unfortunately as some of you had mentioned, the command is OS dependent so while /usr/ucb/ps -auwwwx works in Solaris, it does not on HP-UX ...:frowning: grrrr ....

I know am asking for some sort of miracle here, but is there an equivalent of the /usr/ucb/ps -auwwwx command that will work across all or most UNIX flavours?

Sample output of the /usr/ucb/ps -auwwwx output as below:

# /usr/ucb/ps -auwwwx | more
USER       PID %CPU %MEM   SZ  RSS TT       S    START  TIME COMMAND
root      7883  0.1  0.2117152113296 ?        S   Sep 08 521:59 /usr/lib/cacao/me/cdc/bin/cvm -Xmx128M -Dcom.su
n.management.jmxremote -Dfile.encoding=utf-8 -Djava.endorsed.dirs=/usr/lib/cacao/lib/endorsed -Xbootclasspath/a
:/usr/lib/cacao/me/support_lib/logging.jar:/usr/lib/cacao/me/support_lib/j2me_xml_ri.jar -Djava.class.path=/usr
/lib/cacao/me/support_lib/jmxremote.jar:/usr/lib/cacao/me/support_lib/sunsasl.jar:/usr/lib/cacao/me/support_lib
/jdmkrt.jar:/usr/lib/cacao/me/support_lib/sasl.jar:/usr/lib/cacao/me/support_lib/jmx.jar:/usr/lib/cacao/me/supp
ort_lib/jmxremote_optional.jar:/usr/lib/cacao/lib/cacao_cacao.jar:/usr/lib/cacao/lib/cacao_j5core.jar:/usr/lib/
cacao/lib/bcprov-jdk14.jar -Djavax.management.builder.initial=com.sun.jdmk.JdmkMBeanServerBuilder -Dcacao.print
.status=true -Dcacao.config.dir=/etc/cacao/instances/scn-agent -Dcacao.monitoring.mode=smf -Dcom.sun.cacao.ssl.
keystore.password.file=/etc/cacao/instances/scn-agent/security/password com.sun.cacao.container.impl.ContainerP
rivate

---------- Post updated at 08:45 PM ---------- Previous update was at 08:42 PM ----------

Hi,

So far, you have the best answer :b:

I know am asking for some sort of miracle here, but is there an equivalent of the /usr/ucb/ps -auwwwx command that will work across all or most UNIX flavours?

There is no variant of the "ps" command which gives the full command arguments (you get as much as the kernel chooses to record) and no syntax which is common across all unix variants.

The nearest you'll get from HP-UX is to invoke the alternative format for "ps" by using "UNIX95= " and ask for the extended arguments list. Note that the space character after the equals sign is important.
For example to show Process ID, User, Extended arguments:

UNIX95= ps -exo pid,user,args