Performing a Thread Dump
A thread dump is a snapshot of every thread that is running in Sterling B2B Integrator at the time the thread dump is generated. You can perform a thread dump to determine bottlenecks in Sterling B2B Integrator.
Typically, problem threads are in a state of waiting. Threads with a state of runnable or R indicate a healthy thread.
For information about the different states of a thread dump, refer to the topic "Reading a Thread Dump."
The subsequent sections describe command-line methods for working with thread dumps. You can also work with thread dumps from the user interface by accessing the JVM Monitor page that is available by navigating to
.- Perform a thread dump.
- Download and delete the dumps that are conducted from the system.
- Enable GC (garbage collector) output. Enabling causes the GC output to be written into the noapp.log.
- (Linux and AIX only) Enable or disable heap dumps. Enabling causes a heap dump to be generated along with thread dumps.
CLA2_PORT
in the sandbox.cfg to
take thread dumps from the User Interface. You can also use the command
line to take a thread dump with the shell script.Performing a Thread Dump in UNIX (HP-UX or Sun Solaris)
- Access the computer on which Sterling B2B Integrator is installed.
- Change your working directory to install_dir.
In the command line, enter cat noapp.pid.
This lists the parent thread process ID.
Enter ps -ef | grep noapp.pid.
This returns all the child process IDs associated with the parent process ID.
Enter kill -QUIT noapp.pid child.pid.
(You must include both the parent PID and the child PID.)
- The thread dump is placed in the noapp.log file in the install_dir/logs directory.
Performing a Thread Dump in UNIX (IBM AIX)
- Access the computer on which Sterling B2B Integrator is installed.
- Change your working directory to install_dir directory.
In the command line, enter cat noapp.pid.
This lists the parent thread process ID.
Enter ps -ef | grep noapp.pid.
This returns all the child process IDs associated with the parent process ID.
Enter kill -QUIT noapp.pid child.pid.
(You must include both the parent PID and the child PID.)
The thread dump is placed in the javacore*.txt file in the install_dir/noapp/bin directory.
Performing a Thread Dump in Linux
- Access the computer on which Sterling B2B Integrator is installed.
- Change your working directory to install_dir directory.
In the command line, enter kill -QUIT noapp.pid child.pid.
(You must include both the parent PID and the child PID.)
The thread dump is completed. Depending on your JVM, the thread dump is placed in one of the following locations:- noapp.log in the install_dir/logs directory
- javacore*.txt
Performing a Thread Dump in Windows
- Navigate to install_dir\bin directory.
- Run hardstop.cmd command to stop Sterling B2B Integrator.
Run the start_si_console.cmd command from the install_dir\bin directory. It will run Sterling B2B Integrator in console mode.
Running the start_si_console.cmd command does not start Sterling B2B Integrator services. It will run Sterling B2B Integrator services in a series of command prompt windows, which cannot be closed while it is running. You can track the progress by watching si_exe.log as running this command takes longer time for Sterling B2B Integrator to start.
Perform a thread dump using the following steps:
- Go to the start_noapp_console.cmd command prompt window.
- Press Ctrl + Break.
- Open the noapp_exe.log file in the install_dir\logs directory and scroll to the bottom.
- Verify that the thread information is present in the log file.
Performing a Thread Dump in IBM iSeries®
- Access the computer on which Sterling B2B Integrator is installed.
- In the iSeries command line, enter WRKACTJOB.
- Locate the two QP0ZSPWP jobs that are running in Sterling B2B Integrator and note the name of the user associated with these jobs.
- Press F11 twice to locate the job numbers.
- In the iSeries command line, enter DMPJVM and press F4.
- In the Dump Java™ Virtual Machine (DMPJVM) panel, enter QP0ZSPWP as the job name and user as the user prompt and jobnumber as the number prompt.
- Press Enter. The thread dump is completed.
- Repeat step 6 for the second job number.
- In the command line, enter WRKSPLF and locate the two QDMPJVM spooled files. These files are the output from your thread dump.
Reading a Thread Dump
- List of all the threads running in a virtual machine.
- List of all the created monitors, including the current owner and number of threads waiting for that monitor to be released.
- List of all the special monitors used internally in the virtual machine.
- Other than IBM JVMs:
- runnable – Running or executable thread.
- object.wait () – Thread is waiting on a condition variable.
- For IBM JVM:
- R – Running or executable thread.
- S – Suspended thread.
- CW – Thread is waiting on a condition variable.
- MW – Thread is waiting on a monitor lock.
- MS – Thread is suspended waiting on a monitor lock. An MS state indicates a virtual machine error.
The following example shows a thread in a runnable state and a thread in a waiting state:
"RMI TCP Accept-0" daemon prio=5 tid=0x015931f0 nid=0x1a
runnable [bbbff000..bbb ffc28]
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
- locked <0xcc709620> (a java.net.PlainSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:448)
at java.net.ServerSocket.accept(ServerSocket.java:419)
at sun.rmi.transport.tcp.TCPTransport.run(TCPTransport.java:334)
at java.lang.Thread.run(Thread.java:534)
"RMI RenewClean-[10.117.2.193:58586,
com.sterlingcommerce.woodstock.util.frame.jndi.AddrClientFactory@c837cd]"
daemon prio=5 tid=0x00b5f6f8 nid=0x13 in Object.wait()
[bc97f000..bc97fc28]
at java.lang.Object.wait(Native Method)
- waiting on <0xcc709728> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
- locked <0xcc709728> (a java.lang.ref.ReferenceQueue$Lock)
at sun.rmi.transport.DGCClient$EndpointEntry$RenewCleanThread.
run(DGCClient.java:500)
at java.lang.Thread.run(Thread.java:534)