LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Capture complete process structure/stack (http://www.linuxquestions.org/questions/linux-general-1/capture-complete-process-structure-stack-4175451756/)

rahulchandrak 02-26-2013 09:18 AM

Capture complete process structure/stack
 
Hi All,

There are a lot of java processes running on the server, generally, we capture the PIDs of the java processes using command 'ps -ef | grep java'. In general, the java processes have a lot of jars in their structure like the following

========================================================
java -DCORDYS_INSTALL_DIR=/opt/abcd/clouprod01 -cp "/opt/abcd/clouprod01/scp.jar:/opt/abcd/clouprod01/scp.jar:/usr/lib/mysql-connector-java-5.1.22-bin.jar::/usr/lib/mysql-connector-java-5.1.22-bin.jar: com.eibus.tools.admin.cmc" -DProcessName=ABCD

=====================================================

In the above java process, there are a few parameters which are passed as arguments to the java process like "-DProcessName=ABCD".

In my case, for few java processes, there are almost 50 jar files which get loaded when the java process starts. As a result of that, the result of the ps command is not showing the full structure/stack of the java process. The results are coming like

======================================================
java -DCORDYS_INSTALL_DIR=/opt/abcd/clouprod01 -cp "/opt/abcd/clouprod01/scp.jar:/opt/abcd/clouprod01/scp.jar:
======================================================

Can anyone help us in tracing the full structure/stack of the java process using either PS command or any other command.

Habitual 02-26-2013 11:03 AM

dupe?

rahulchandrak 02-26-2013 11:12 AM

Hi Habitual,

Its not a duplicate post, this post is about getting the complete trace of the java process, where as the earlier one was capturing a word from the java process

Valery Reznic 02-27-2013 02:33 PM

You could try
Code:

tr '\0 ' ' < /proc/PID/cmdline

Habitual 02-27-2013 03:29 PM

Quote:

Originally Posted by rahulchandrak (Post 4900144)
Hi Habitual,

Its not a duplicate post, this post is about getting the complete trace of the java process, where as the earlier one was capturing a word from the java process

no worries. :)

java all looks the same to me?


All times are GMT -5. The time now is 09:57 PM.