读书人

查看JVM堆内存储器对象的分布状况

发布时间: 2012-12-24 10:43:14 作者: rapoo

查看JVM堆内存对象的分布状况
1. Use JConsole 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.

2. Use jhat
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.

读书人网 >编程

热点推荐