IBM Support

Process to get a thread dump or javacore during server shutdown

Question & Answer


Question

How can I get a thread dump or javacore at server shutdown?

Cause

There are many different situations where it could be useful to have a thread dump during server shutdown.

The following are examples:
  • Server shutdown because nodeagent stopped the hung server.
     
  • Server shutdown by calling System.exit() from application code running in server.
     
  • Sporadic server shutdown.

Answer

This feature is disabled by default and can be enabled by adding a system property as described in the following document.

Once this property is set, a thread dump will be triggered during server shutdown. For platforms where an IBM Software Development Kit is used, a javacore will be generated in the working directory of the application server. For all other platforms, a thread dump will be written to the native_stdout.log (Solaris/HP thread dumps are written out to the native_stdout.log as well as verbosegc).file for the application server. In addition to the thread dump, the stack trace of the current thread that is processing shutdown will be printed in the SystemErr.log for the application server.

For WebSphere Application Server v8.5.5 and higher:
  1. Open the administrative console.
     
  2. Select Servers > Application Servers > server_name > Server Infrastructure > Java and Process Management > Process Definition > Java Virtual Machine > Custom Properties > New.
     
  3. Add a new Custom Property for the JVM:

    System Property Name: com.ibm.ws.runtime.dumpShutdown
    System Property Value: true
     
  4. Save your changes and restart the Application Server.

[{"Type":"MASTER","Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"ARM Category":[{"code":"a8m50000000CdWJAA0","label":"WebSphere Application Server traditional-All Platforms-\u003ESystem Management-\u003ETraditional WAS-\u003EStart\/Stop"},{"code":"a8m50000000CdWJAA0","label":"WebSphere Application Server traditional-All Platforms-\u003ESystem Management-\u003ETraditional WAS-\u003EStart\/Stop"},{"code":"a8m50000000CdWJAA0","label":"WebSphere Application Server traditional-All Platforms-\u003ESystem Management-\u003ETraditional WAS-\u003EStart\/Stop"}],"ARM Case Number":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.5.5;9.0.0;9.0.5"}]

Document Information

Modified date:
10 May 2022

UID

swg21304559