How to generate thread dumps and heap dumps in WebSphere Application Server 8.5.5

How to generate thread dumps and heap dumps in WebSphere Application Server 8.5.5


Purpose – To generate thread dumps and heap dumps in WebSphere Application Server 8.5.5

Thread dumps – Thread dumps can actually be considered as a stack traces of all the threads. It would useful for troubleshooting application related issues and exceptions. It provides the complete stack trace of the methods that are being invoked in the stack trace.

Heap dumps – Heap is the place were java objects live. So basically heap dumps provides information on the state of the java heap memory. It shows the live java objects on the heap and reference between them. It is used for analyzing the memory leaks and memory usage patterns

Procedure to take Thread and Heap dumps in Websphere 8.5

Using wsadmin

Step1: Connect to the wsadmin client

./wsadmin.sh -lang jython -user user_name -password pwd

Step2: Get the reference to the JVM object

wsadmin>JVM=AdminControl.queryNames(‘type=JVM,process=server1,*’)

Step3: Invoke dumpThreads and generateHeapDump operations on the JVM object

wsadmin>AdminControl.invoke(JVM,’dumpThreads’)
wsadmin>AdminControl.invoke(JVM,’generateHeapDump’)

The heap and thread dump files will be available in the JVM’s App server profile directory.

Hope you enjoyed reading this article. Thank you.