Skip to Content

I recently had to create a series of Thread Dumps with SUP.

Here are the steps to get a thread dump from a running SUP mlsrv12 process:

  1. Download PsTools package including PsExec from Microsoft: http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
    /wp-content/uploads/2012/12/image_165439.png
  2. Extract the PsExec to some folder, like C:\temp Go to Task manager and find out the PID of the MLSRV12
    process. If the column is not seen, goto View – Select Columns – Choose
    PID.
    /wp-content/uploads/2012/12/2_165533.png
  3. Alternatively, use the PSLIST tool to search for process id (Pid):
    /wp-content/uploads/2012/12/3_165534.png
  4. C:\>pslist mlsrv12
  5. Open CMD prompt in the Administrators mode: right-click on “Command Prompt” and select Run As Administrator
    /wp-content/uploads/2012/12/4_165535.png
  6. In this command prompt navigate to the folder where you extracted PsExec to and execute psexec -s
    C:\Sybase\UnwiredPlatform\JDK1.6.0_26-x64\bin\jstack PID >> C:\threaddump.log

    If SUP runs in 32-bit mode, use the corresponding jstack from the 32-bit JDK:
    psexec -s
    C:\Sybase\UnwiredPlatform\JDK1.6.0_26\bin\jstack PID >>
    C:\threaddump.log

    /wp-content/uploads/2012/12/5_165536.png
  7. Repeat the step above in interval every 10 to 30 seconds to get multiple thread dumps. This helps to understand which classes were executed in threads or were maybe hanging on some blocked objects:
    /wp-content/uploads/2012/12/6_165537.png
  8. Here’re some Links about how to analyze Thread dumps:
    http://allthingsmdw.blogspot.com/2012/02/analyzing-thread-dumps-in-middleware.html
    http://allthingsmdw.blogspot.com/2012/02/analyzing-thread-dumps-in-middleware_08.html
    http://docs.oracle.com/cd/E15289_01/doc.40/e15061/using_threaddumps.htm#g1101982

  10. With the below mentioned tools you can automate your analysis:
         http://allthingsmdw.blogspot.de/2012/02/analyzing-thread-dumps-in-middleware_9856.html
         http://java.net/projects/tda/downloads
         https://service.sap.com/sap/support/notes/1020246
         and it’s screenshot:
/wp-content/uploads/2012/12/7_165538.png

Have Fun!

–Stephen

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply