[b]1. Use JConsole[/b] to collect the memory info
0) Goto jdk\bin to start jconsole.
1) Listen to the started Java Application
2) Navigate to Tab MBeans > com.sun.management > HotspotDiagnostic > Operations > dumpHeap
3) Fill the output file name for parameter p0
4) Click button “dumpHeap” to generate the output file.
[b]2. Use jhat[/b]
use jhat command to start the web server for the data presenation based on the output file by jconsole.
jhat <fileName>
3. Start browser to open it like http://localhost:7000
All the object heap histo is shown on the web page.
版权声明:本文为yawooh原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。