LinuxCommandLibrary

jmap

Prints shared object memory maps or heap memory details for a process, core file, or remote debug server. This command is experimental and unsupported.

TLDR

Print shared object mappings for a Java process (output like pmap)

$ jmap [java_pid]
copy


Print heap summary information
$ jmap -heap [filename.jar] [java_pid]
copy


Print histogram of heap usage by type
$ jmap -histo [java_pid]
copy


Dump contents of the heap into a binary file for analysis with jhat
$ jmap -dump:format=b,file=[path/to/file] [java_pid]
copy


Dump live objects of the heap into a binary file for analysis with jhat
$ jmap -dump:live,format=b,file=[path/to/file] [java_pid]
copy

Help


Copied to clipboard