twitter
    !! Tell us what you want to Learn / Know !!

Thread Dump

       A Java thread dump is a way of finding out what every thread in the JVM is doing at a particular point in time. This is especially useful if your server sometimes seems to hang when running under load, as an analysis of the dump will show where the threads are stuck.

How to take a thread dump:

      To take the thread dump you should know the Process ID (PID).

      Open the command prompt and type the following command

Step1:
        jps   -lm



The jps command shows the currently running java processes.


 3268 is the process ID
  This is how you get to know the process ID
Step2:        Now type the following command
         jstack  -l  PID  > dump.html


The thread dump will be stored in your current working directory with file name dump.html.I mean in D:\surendra

**You can even use ctrl+break to get the thread dump.

0 comments:

Post a Comment