I am creating heap dump using below command:
jmap -dump:file=DumpFile.txt <process-id>
I have opened the generated file - DumpFile.txt
but it is not in readable format. So please let me know how to analyze the data in the generated file.
The jhat command parses a java heap dump file and launches a webserver. jhat enables you to browse heap dumps using your favorite webbrowser. Note that you should have a hprof binary format output to be able to parse it with jhat . You can use format=b option to generate the dump in this format.
jmap is a tool to print statistics about memory in a running JVM. We can use it for local or remote processes. To capture a heap dump using jmap, we need to use the dump option: jmap -dump:[live],format=b,file=<file-path> <pid>
You should use jmap -heap:format=b <process-id>
without any paths. So it creates a *.bin file which you can open with jvisualvm.exe
(same path as jmap). It's a great tool to open such dump files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With