Tuesday, December 21, 2010

How to generate a thread dump ?

Generating a Thread Dump
Windows
The Java application that you want to produce a thread dump for must be running / started in a command console. When you want to produce a thread dump press Ctrl-Break
Note: it's easier to produce a thread dump on Linux as the JVM doesn't need to be started in a console window.
Linux
If the JVM is running in a console then simply press Ctrl-\.
If the JVM is running in the background then send it the QUIT signal:kill -QUIT process_id

Note: the thread dump will show on the console where the to-be-kill process is running on, not the console where you issue the kill command.

No comments: