5.40.3 Creating Thread Dump

 

Identifying problems in the JavaTM platform is made easy by creating thread dumps. A thread dump contains a set of statements which help the system administrator to easily identify the problem in the program.

 

Creating a Thread Dump in Windows NT

 

Perform the following steps to create a thread dump:

 

To adjust the display setting:

  1. Select the Command Prompt window where the program is running.

  2. Click the uppermost left corner of the Command Prompt window. The drop-down menu is displayed.

  3. Select the Properties option.

  4. Select the Layout tab, and change the height value in Screen Buffer Size to 2000.

 


  1. Click OK to save the change.

To generate and copy the thread dump:
  1. Press the Ctrl+Break keys. The thread dump is generated and displayed in the command window.

  2. Scroll back in the command window until you reach the beginning of the dump "Full thread dump:"

  3. Select all the text that follows "Full thread dump:"

 

  1. Copy the text to any editor, and save the file.

Creating a thread dump in UNIX

 

There are two ways to create a thread dump on a Unix computer.

  1. In a shell, other than the shell where the program is running, find the java process ID using the ps command.

  2. Send the java process a SIGQUIT signal:

  1. $ kill -3 pid
    where pid is the java process ID. This sends the thread dump to stdout.

Note: If you are using KSH: The INT and QUIT signals for an invoked command are ignored if the command is followed by & and the monitor option is not active. In other words, you cannot get a thread dump of a process that is running in the background.

 


 


Copyright © 2013, ZOHO Corp. All Rights Reserved.