如何获取java heap dump
展开全部
C:/Program Files/Java/jdk1.6.0_20/bin>jmap
Usage:
jmap -histo <pid>
(to connect to running process and print histogram of java object heap
jmap -dump:<dump-options> <pid>
(to connect to running process and dump java heap)
dump-options:
format=b binary default
file=<file> dump heap to <file>
Example: jmap -dump:format=b,file=heap.bin <pid>
或者,运行jconsole, 选择 MBeans -> com.sun.management -> HotSpotDiagnostic -> Operations -> dumpHeap 在参数p0中填写保存dump文件的路径,如果要使用Eclipse Memory Analyzer来分析则文件的后缀要为hprof。点击dumpHeap按钮生成dump文件。
或者在Eclipse Memory Analyzer中直接生成
Usage:
jmap -histo <pid>
(to connect to running process and print histogram of java object heap
jmap -dump:<dump-options> <pid>
(to connect to running process and dump java heap)
dump-options:
format=b binary default
file=<file> dump heap to <file>
Example: jmap -dump:format=b,file=heap.bin <pid>
或者,运行jconsole, 选择 MBeans -> com.sun.management -> HotSpotDiagnostic -> Operations -> dumpHeap 在参数p0中填写保存dump文件的路径,如果要使用Eclipse Memory Analyzer来分析则文件的后缀要为hprof。点击dumpHeap按钮生成dump文件。
或者在Eclipse Memory Analyzer中直接生成
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询