若是要即時動態生成heapdump文件可使用jmap命令,jdk6.0已取消了-XX:+HeapDumpOnCtrlBreak配置參數經過ctrl+break的方式。 jmap -dump:format=b,file=temp_heapdump.hprof <pid>orm