Re: Which command can get detail output of java process status like "ps axwww" on linux ? (321 Views)
Reply
Honored Contributor
mtoo.guo
Posts: 898
Registered: ‎07-06-2005
Message 1 of 5 (321 Views)

Which command can get detail output of java process status like "ps axwww" on linux ?

Hello,

Here is one question confused me,on linux OS,I can get below output using "ps axwww" command:
--------------------------
%TIME PID PPID TOT SECS SIZE(Kb) UID COMMAND
93.30 14540 14539 3517009.08 31700 dzsys /opt/java1.4/bin/PA_RISC2.0/java -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -DADAPTER_CONFIG_DIR=/home/dzsys/child/config/standard -cp /home/dzsys/child/lib/adapter.jar:/home/dzsys/child/lib/mqsych.jar:/home/dzsys/child/lib/log4j-1.2.8.jar:/home/dzsys/child/lib/com.ibm.mq.jar:/home/dzsys/child/lib/com.ibm.mqbind.jar:/home/dzsys/child/lib/com.ibm.mqjms.jar:/home/dzsys/child/lib/connector.jar:/home/dzsys/child/lib/xercesImpl.jar:/home/dzsys/child/lib/xml-apis.jar:/home/dzsys/child/lib/junit.jar:/home/dzsys/child/lib/commons-codec-1.2.jar:/home/dzsys/child/lib/commons-logging.jar:/home/dzsys/child/lib/commons-pool.jar:/home/dzsys/child/lib/classes12.jar:/home/dzsys/child/lib/ifxjdbc.jar:/home/dzsys/child/lib/jdom.jar:/home/dzsys/child/config/standard com.mob.mq.children.Run
4.52 24008 1 4284.31 188964 dxuser /opt/java1.4/bin/PA_RISC2.0/java -Xms256M -Xmx256M -cp ..//lib/b2b20081107.jar:..//lib/ServerHelpDoc.jar:..//lib/rowset.jar:..//lib/adapter.jar:..//lib/connector.jar:..//lib/sample.jar:..//lib/ifxjdbc.jar:..//lib/xalan.jar:..//lib/ojdbc14.jar:..//lib/jconn2d.jar:..//lib/xercesImpl.jar:..//lib/com.ibm.mq.jar:..//lib/jhall.jar:..//lib/xml-apis.jar:..//lib/com.ibm.mqbind.jar:..//lib/log4j-1.2.8.jar:..//lib/xmlParserAPIs.jar:..//lib/com.ibm.mqjms.jar:..//lib/proxool-0.8.3.jar:..//lib/psijni.jar:..//lib/commons-beanutils.jar:..//lib/commons-fileupload.jar:..//lib/commons-logging.jar:..//lib/commons-collections-3.1.jar:..//lib/jta.jar:..//lib/quartz-1.6.0.jar:..//lib/commons-httpclient-2.0.2.jar:..//lib/commons-pool.jar:..//lib/commons-digester.jar:..//lib/commons-lang.jar:..//lib/commons-validator.jar:..//lib/commons-codec-1.2.jar:..//config b2b.filesend.server.SendServer
0.24 12863 1 40820.48 29940 patrol PatrolAgent -id P11_msgpcomm
0.21 1889 1 294.29 8112 root mad -u root -g bin
0.10 1451 1 153.68 114160 dxuser /opt/java1.4/bin/PA_RISC2.0/java -Xms64M -Xmx128M -cp ..//lib/censerver1020.jar:..//lib/adapter.jar:..//lib/ifxjdbc.jar:..//lib/com.ibm.mq.jar:..//lib/com.ibm.mqbind.jar:..//lib/com.ibm.mqjms.jar:..//lib/connector.jar:..//lib/xercesImpl.jar:..//lib/trustapp.jar:..//lib/jconn2d.jar:..//lib/classes12.jar:..//lib/censerver.jar:..//lib/xmlParserAPIs.jar:..//lib/commons-codec-1.2.jar:..//lib/commons-logging.jar:..//lib/commons-pool.jar:..//lib/log4j-1.2.8.jar:..//lib/xml-apis.jar:..//lib/sample.jar:..//lib/jdom.jar:..//config com.sysnet.dcss.monitor.Start


--------------------------


But on hpux ,I do not know how to get these detail java info running on my servers.Pls help ,TKS very much!
Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 2 of 5 (321 Views)

Re: Which command can get detail output of java process status like "ps axwww" on linux ?

Hi:

You can use:

# ps -fp

...to see details about a process by .

You can use:

# UNIX95= ps -C -o user,pid,ppid,etime,args

...for example, to see the user, pid, ppid, elapased time and arguments used with a process by name . Note the 'UNIX95= ' on the command line without a semicolon. This arms XPG4 behavior only for the duration of the command line.

On HP-UX, the command line size reported is set to 128-characters by default. This can be increased up to 1020 characters if '/etc/default/ps' is appropriately configured. See the "Notes" section of the 'ps' manpages:

http://docs.hp.com/en/B2355-60130/ps.1.html

Regards!

...JRF...
Honored Contributor
mtoo.guo
Posts: 898
Registered: ‎07-06-2005
Message 3 of 5 (321 Views)

Re: Which command can get detail output of java process status like "ps axwww" on linux ?

Sorry ,my OS version is 11.11,is it support this function ?
Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 4 of 5 (321 Views)

Re: Which command can get detail output of java process status like "ps axwww" on linux ?

Hi:

OK. What I cited above regarding the '/etc/default/ps' file applies to 11.31.

For 11.23, define the environmental variable 'PS_CMD_BASENAME'. Doing so will cause 'ps' to display the basename of the 'args' column for the COMMAND field, which is configurable up to 1020 characters. Make sure that you have patch PHCO_32475.

For 11.11, if I recall correctly, you are limited to a 64-character argument length as this is all the kernel saves. You may need to add the '-x' switch to enable this.

Regards!

...JRF...


Acclaimed Contributor
Dennis Handly
Posts: 25,292
Registered: ‎03-06-2006
Message 5 of 5 (321 Views)

Re: Which command can get detail output of java process status like "ps axwww" on linux ?

>my OS version is 11.11, does it support this function?

Just use -x as JRF said:
UNIX95=EXTENDED_PS ps -Hf -C -x
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.