1. There are many ways to generate heap dump , the next way looks like the easiest ( for me ) to generate manually the heap dump
- Start the wsadmin scripting client
- follow the procedure in this article "Generating heap dumps manually"
set objectName [$AdminControl queryNames WebSphere:type=JVM,process=server1,node=MYXXXNode01,*]
$AdminControl invoke $objectName generateHeapDump
2. To analyze the output - download two useful tools - to analyze heap dump :
- HeapRoots
- HeapAnalyzer
- Eclipse Memory Analyzer Tool --> THE BEST --> you can read all about it in my post here Eclipse Memory Analyzer with phd files - IBM dump format
java -jar HR207.jar "C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\heapdump.20100905.152441.6336.0001.phd"
command sample:
ts -100 ->Tabulating all objects (100), sorted by total-size
os -100 -> Showing all objects(100), sorted by size.
up -> move up with the results
down -> move down with the results (next chunk)
os -100 > tt.txt -> redirect results to file tt.txt
to run heapanalyzer i used ( its failed to open large heap dump):
java -Xmx1000m -jar ha406.jar "C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\heapdump.20100905.152441.6336.0001.phd"
all commands tested on windows with websphere 7.0 , should be ok on linux platform.
reference:
Generating heap dumps manually
Solving memory problems in WebSphere applications
Webcast replay: Using IBM HeapAnalyzer to diagnose Java heap issues
enjoy
Yaniv T
No comments:
Post a Comment