Performing a thread dump in Linux or Windows--reference
Linux/Unix1. Find the Java/Tomcat process id. You should see output like this 2. Execute the following command to generate a thread dump Run this command every 5-10 seconds,5 times. 3.The thread dump is written to the standard output.? It may logged in the console or 4. If you are running JDK 6.0+,you may also use jstack to produce a thread dump. > threaddump.txt or % jstackWindowsRunning as a Windows service 1a. If installed using Tomcat installer,click All Programs ->Apache Tomcat 6.0->Monitor Tomcat. An icon should appear in task bar. 1b. If not installed using Tomcat installer,navigate to The Tomcat monitor icon should appear in the system tray.; 2. Right click the the icon and select Thread Dump. Run this command every 5-10 seconds,5 times 3. Look for the thread dump in? Running from startup.bat 1. Open "Windows Task Manager", 2. Find the process ID of the java process 3. Make sure 4. Execute the following command to generate a thread dump > threaddump.txtRun this command every 5-10 seconds,5 times If you receive an error running jstack such as the below,then you may need to use psexec: ? 1. Download psexec from?. 2. Unzip the 'PSTools' directory to a suitable place on your server. 3. Open a command prompt?as Administrator?and navigate to the location of the PSTools folder using the command prompt. ? |