Linux: Process Details With PS
A lot of IBM based software run listeners with a common name. Occasionally, one of these listeners will hang and that individual process killed and restarted. In the case below, IBM Websphere was running with a generic named “java” listener. Instead of just killing the process, I needed to know what it actually was,
A typical ps just shows the user and the process called ‘java’
[server1 ~]# ps -auxc | grep java
tstuser 7005 4.0 8.4 476516 329140 ? Sl 11:33 4:04 java
Needed more details. The following returns the full path to the application, but cuts off all the rest of the data
[server1 ~]# ps -ef
Here is the full output of ‘ps -ef’ using grep to only return the process I was looking for (PID 70005) that was found in the above ps -ef example.
[server1 ~]# ps -ef | grep 7005
tstuser 7005 1 3 11:33 ? 00:04:14 /app/IBM/WebSphere/AppServer/java/bin/java -Dosgi.install.area=/opt/IBM/WebSphere/AppServer -Dosgi.configuration.area=/opt/IBM/hub-simple/wasND/Profiles/profile/configuration -Djava.awt.headless=true -Dosgi.framework.extensions=com.x.cds -Xscmx50M -Xbootclasspath/p:/opt/IBM/WebSphere/AppServer/java/jre/lib/ext/ibmorb.ja bcgnode_server1.x.com server1
I removed about 10 more lines from the full argument output, but you can still see alot the arguments that were passed to the java executable when it was started.
Note: There are definitely more ways of doing the same thing in Linux, but this is the first I always come to.