users@glassfish.java.net

Re: Getting thread dump from Glassfish on Linux

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Fri, 02 Mar 2007 17:31:39 -0800

Hi,

if you try with:

${java.home}/bin/jstack PID.

are you getting something?

-- Jeanfrancois

glassfish_at_javadesktop.org wrote:
> How do I get a thread dump from Glassfish on Linux?
>
> Normally, you do a kill -3 <pid>
>
> My problem is two fold.
>
> First, on a normal Unix box, java shows up using 'ps' as a single process. But on Linux, each java thread shows up as a process.
>
> So, I don't know which process to send the signal to. Does it matter which pid I send it too?
>
> Next, where would the thread trace be dumped to?
>
> The problem came up when we had a java thread consuming all of the CPU, so I figured I'd try and run a thread dump to see what the offending thread was doing. I picked the pegged pid from 'top', and did a 'kill -3 <pid>'.
>
> Looking at the $domain/logs/server.log file, there was no thread dump.
>
> So, either:
>
> a) the java process was so hammered, I wasn't getting the thread dump no matter what I did.
>
> b) I sent the signal to the wrong pid, and thus no dump was created.
>
> c) The pid was right, the signal was right, a thread dump was created, but not to the server.log. Instead it went to some unnamed file or, even worse, a bit bucket.
>
> So, any insight in to this process would be welcome.
>
> Thanx!
> [Message sent by forum member 'whartung' (whartung)]
>
> http://forums.java.net/jive/thread.jspa?messageID=206033
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>