1) Use wsadmin jython code for thread dumps (be careful that indention is meaningful in jython)
2) heap dump
A. Use admin console to set up automatic memory dump - this is only for testing and development OR when you have a severe production problem, because the generation of dump will cause the production system an actual pause. Use the following sequence of panels, then, check "Enable Performance and Diagnostic Advisor Framework (Runtime Performance Advisor)"
Application servers > ClstAppSrv01 > Performance and Diagnostic Advisor Configuration
B. Use wsadmin and jython to generate a heap dump
------------------------------------------------------------------------------------------------------Use the following in wsadmin to call the jython program (windows):
# define a function that will find the JVM name and generate the dump
# the name of the jython program is wasgeneratethreaddump.py
def generateThreadDump(serverName):serverJVM = AdminControl.queryNames("type=JVM,process="+serverName+",*")AdminControl.invoke(serverJVM,"dumpThreads")
# call the function
generateThreadDump("ClstAppSrv02")
-------------------------------------------------------------------------------------------------------
Then, you should see the dump file. You can use IBM Support Assistant to view and analyze the dump.wsadmin -lang jython -f wasgeneratethreaddump.py
2) heap dump
A. Use admin console to set up automatic memory dump - this is only for testing and development OR when you have a severe production problem, because the generation of dump will cause the production system an actual pause. Use the following sequence of panels, then, check "Enable Performance and Diagnostic Advisor Framework (Runtime Performance Advisor)"
Application servers > ClstAppSrv01 > Performance and Diagnostic Advisor Configuration
B. Use wsadmin and jython to generate a heap dump
------------------------------------------------------------------------------------------------------3) Of course, both can be generated from using kill -3 taking JVM PID as argument in UNIX/LINUX environment (be careful - sometimes there are anomalies - once I got into trouble issuing kill -3 because of a bug in a monitoring tool. Generally speaking, wsadmin and jython is a safer route)
# define a function that will find the JVM name and generate the dump
# the name of the jython program is wasgeneratethreaddump.py
def generateThreadDump(serverName):
serverJVM = AdminControl.queryNames("type=JVM,process="+serverName+",*"
AdminControl.invoke(serverJVM,"generateHeapDump")
# call the function
generateThreadDump("ClstAppSrv02")
-------------------------------------------------------------------------------------------------------
java dmp
javacore txt
Snap trc
No comments:
Post a Comment