开发者

JMap with JVM Debugging Disabled

开发者 https://www.devze.com 2023-01-16 02:30 出处:网络
Can I use jmap to create a java memory heap on a JVM which was started with debugging disabled? If 开发者_开发知识库so, how?To use jmap you just need a JVMID, which is the process identifier of the JV

Can I use jmap to create a java memory heap on a JVM which was started with debugging disabled? If 开发者_开发知识库so, how?


To use jmap you just need a JVMID, which is the process identifier of the JVM you want to dump.

First use jps to get the JVMID. Then use jmap to dump the heap to a file.

Example:

jmap -dump:format=b,file=heap.bin <JVMID>


(You know about visualvm and that it can connect to a running Java process? Requires Sun Java 6)

0

精彩评论

暂无评论...
验证码 换一张
取 消