1.

How Do You Take A Thread Dump Of A Java Process?

Answer»

TAKING thread dump is easier than taking heap dump because you don't need to remember tool. In Linux, you can just use the kill command to TAKE the thread dump e.g.

$ kill -3 PID 

will print the thread dump in the log file or where System.out is redirected. Similarly, in Windows, you can use Ctrl + Break from the command PROMPT. Alternatively, you can also use jConsole and VisualVM to take the thread dump of Java application in both Windows and Linux. You can also read Java Performance The Definitive Guide By Scott Oaks to learn more about thread dump and heap dump.

Taking thread dump is easier than taking heap dump because you don't need to remember tool. In Linux, you can just use the kill command to take the thread dump e.g.

$ kill -3 PID 

will print the thread dump in the log file or where System.out is redirected. Similarly, in Windows, you can use Ctrl + Break from the command prompt. Alternatively, you can also use jConsole and VisualVM to take the thread dump of Java application in both Windows and Linux. You can also read Java Performance The Definitive Guide By Scott Oaks to learn more about thread dump and heap dump.



Discussion

No Comment Found