2016-02-16 19:27:52 +00:00
|
|
|
# jmap
|
|
|
|
|
|
|
|
> Java Memory Map Tool.
|
2021-08-23 20:07:19 +01:00
|
|
|
> More information: <https://docs.oracle.com/javase/7/docs/technotes/tools/share/jmap.html>.
|
2016-02-16 19:27:52 +00:00
|
|
|
|
2021-07-13 09:59:48 +01:00
|
|
|
- Print shared object mappings for a Java process (output like pmap):
|
2016-02-16 19:27:52 +00:00
|
|
|
|
|
|
|
`jmap {{java_pid}}`
|
|
|
|
|
|
|
|
- Print heap summary information:
|
|
|
|
|
2016-02-16 20:36:36 +00:00
|
|
|
`jmap -heap {{filename.jar}} {{java_pid}}`
|
2016-02-16 19:27:52 +00:00
|
|
|
|
|
|
|
- Print histogram of heap usage by type:
|
|
|
|
|
|
|
|
`jmap -histo {{java_pid}}`
|
|
|
|
|
|
|
|
- Dump contents of the heap into a binary file for analysis with jhat:
|
|
|
|
|
|
|
|
`jmap -dump:format=b,file={{filename}} {{java_pid}}`
|