如何收集任何 Java 进程的堆转储
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38783251/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to collect heap dumps of any java process
提问by Pratha
I am new to Heaps , can anyone suggest how can i take heap dump of any java process (like Jmeter). I read about jmap command , but i am not getting where and how to execute / write it (in eclipse or cmd). It might be a very basic question but still suggestions are requested.Can i download jmap.exe and jhat.exe from any where? Thank You
我是 Heaps 的新手,谁能建议我如何获取任何 Java 进程(如 Jmeter)的堆转储。我读过 jmap 命令,但我不知道在哪里以及如何执行/编写它(在 eclipse 或 cmd 中)。这可能是一个非常基本的问题,但仍然需要建议。我可以从任何地方下载 jmap.exe 和 jhat.exe 吗?谢谢
回答by Arnab Biswas
Here is the command:
这是命令:
<JDK_HOME>/jmap -F -dump:live,format=b,file=<file_name.hprof> <process_id>
You can mention the file location here in this command.
您可以在此命令中在此处提及文件位置。