LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-26-2013, 08:18 AM   #1
rahulchandrak
Member
 
Registered: Apr 2010
Posts: 33

Rep: Reputation: 2
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.

Last edited by rahulchandrak; 02-26-2013 at 08:25 AM.
 
Old 02-26-2013, 10:03 AM   #2
Habitual
Senior Member
 
Registered: Jan 2011
Distribution: Undecided
Posts: 3,173
Blog Entries: 4

Rep: Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760
dupe?
 
Old 02-26-2013, 10:12 AM   #3
rahulchandrak
Member
 
Registered: Apr 2010
Posts: 33

Original Poster
Rep: Reputation: 2
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
 
Old 02-27-2013, 01:33 PM   #4
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 666

Rep: Reputation: 133Reputation: 133
You could try
Code:
tr '\0 ' ' < /proc/PID/cmdline
 
Old 02-27-2013, 02:29 PM   #5
Habitual
Senior Member
 
Registered: Jan 2011
Distribution: Undecided
Posts: 3,173
Blog Entries: 4

Rep: Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760
Quote:
Originally Posted by rahulchandrak View Post
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
View stack of process grob115 Programming 4 03-04-2011 10:06 PM
Capture packets from Linux Kernel TCP/IP stack Iyyaaz Linux - Kernel 1 12-23-2010 10:09 AM
single 8K process stack vs 4K process stack and a seperate 4K interrupt stack charvak Linux - Kernel 1 03-17-2010 06:58 PM
Getting the stack size of a process aravinda78 Programming 4 12-12-2008 08:32 AM
Perl to get the complete process info for all process alix123 Programming 4 08-16-2007 01:36 AM


All times are GMT -5. The time now is 04:32 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration