If you get unexplained server hangs under WebSphere, you can obtain, from theWebSphere server, a thread dump to help diagnose the problem.In the case of a server hang, you can force an application to create a thread dump.On unix/Linux machines find the process id (PID) of the hung JVM and issue:
kill -3 PID.
Look for an output file in the installation root directory with a name like javacore.date.time.id.txt.Using wasadmin prompt, get the handle of the server:
wsadmin>set jvm [$AdminControl completeObjectNametype=JVM,process=server1,*]wsadmin>$AdminControl invoke $jvm dumpThreads
If an application server spontaneously dies, look for a file. The JVM creates the file in theproduct directory structure, with a name like javacore[number].txt.Heap Dumps
A heapdump is a snapshot of JVM memory
it shows the live objects on the heap alongwith references between objects. It is used to determine memory usage patterns andmemory leak suspects.To enable automated heap dump generation support, perform the following steps in theadministrative console: (heap dump will generated upon receiving the out.of.memoryexceptios)
1. Click Servers > server_name2. Click server_name >Runtime Performance Advisor Configuration.3. Click the Runtime tab.4. Select the Enable automatic heap dump collection check box.5. Click OK.