Operating System - HP-UX
1832439 Members
3216 Online
110042 Solutions
New Discussion

get program name from ps -ef

 
SOLVED
Go to solution
sharathkv25
Frequent Advisor

get program name from ps -ef

Hi,

$ps -ef | grep jar
otroot 21894 19704 0 20:12:14 pts/tf 0:03 /opt/java1.3/bin/../bin/PA_RISC2
.0/native_threads/java -jar TPI

How do I get the complete program name instead of "TPI" in output?.

This is a jar file named TPIDS.jar

If I search for TPIDS.jar no output. Though the jar file is executing.

$ps -ef | grep TPIDS.jar
No output

I am on HPUX.

Thanks
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor

Re: get program name from ps -ef

How do I get the complete program name instead of "TPI" in output?

First you should note that the program name is your case is java -- as that is the true executable. Your TPIDS.jar file is simply a data file albeit a data file that is interpreted or executed as pcode. In any event, add the -x argument so that ps -efx should be used. This will display more of the command line. Note that the "-x" ps option is not supported in all version of HP-UX. It first became available at 11.0 and only if a patch was applied. Do a man ps and if the -x option is mentioned then you are good to go.

If it ain't broke, I can fix that.
Arturo Galbiati
Esteemed Contributor
Solution

Re: get program name from ps -ef

hI,
ps -efx | grep TPIDS.jar

add x to the option.
man ps for furhter info.
HTH,
Art