kill -3 to get java thread dump

javanerd picture javanerd · Feb 2, 2011 · Viewed 175k times · Source

I am using kill -3 command to see the JVM's thread dump in unix. But where can I find the output of this kill command? I am lost!!

Answer

Joshua McKinnon picture Joshua McKinnon · Feb 2, 2011

You could alternatively use jstack (Included with JDK) to take a thread dump and write the output wherever you want. Is that not available in a unix environment?

jstack PID > outfile