[PLUG] how to obtain a java vm stack dump

Carlos Konstanski ckonstanski at pippiandcarlos.com
Thu Apr 26 14:36:02 UTC 2007


On Wed, 25 Apr 2007, tkubaska at charter.net wrote:

> Date: Wed, 25 Apr 2007 17:45:38 -0700
> From: tkubaska at charter.net
> Reply-To: "General Linux/UNIX discussion and help;	civil and on-topic"
>     <plug at lists.pdxlinux.org>
> To: PLUG <plug at lists.pdxlinux.org>
> Subject: [PLUG] how to obtain a java vm stack dump
> 
> I have a simple question . and yes, I've googled and tried some things, but I dont have enough experience to evaluate whether I'm doing the right stuff and would appreciate some guidance. I want to obtain a java vm stack dump.
>
> Here's what I tried . is this the right thing to do?
> jstack -m 5037
> where 5037 is the pid of my java program.
>
> I'm running on Suse 10.2 and -m and -h seem to be the only jstack options that man jstack gives me; but docs on Internet list many other convenient options.  My java is Sun's 1.5.0.0_011 JDK.
>
> My java program hangs and I'm trying to find out why. Interesting that it does not hang on other Linux distros using the same JDK.
>
> Thanks.
> -ted

For seeing what is going on inside a JVM at runtime, the most complete
solution is a profiler.  When I get a chance later today, I will
explain exactly how to set up a JVM to run under a free, open source
one.

Carlos Konstanski



More information about the PLUG mailing list