jmap Command Examples

Java memory map tool. More information: https://docs.oracle.com/en/java/javase/20/docs/specs/man/jmap.html.

jmap {{java_pid}}

jmap -heap {{filename.jar}} {{java_pid}}

jmap -histo {{java_pid}}

jmap -dump:format=b,file={{path/to/file}} {{java_pid}}

jmap -dump:live,format=b,file={{path/to/file}} {{java_pid}}