Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jmap [option] <executable <core> - what does that mean and how to use it?

Tags:

java

jmap

I'm trying to use jmap utility. It's too hard to specify pid each time, so I search for easier option. In jmap's help I found an option

jmap [option] < executable < core >

But this absolutely not self-explanatory. What stands for executable/core? How can I specify it ? Haven't found any sample.

like image 878
Boris Avatar asked Feb 02 '26 21:02

Boris


1 Answers

From the documentation:

executable

Java executable from which the core dump was produced.

core

core file for which the memory map is to be printed.

I agree, that is a bit terse...

The core is the core dump to get the heap from, and the executable is the Java executable the app that produced the core dump was run with

And this question provides an example of using it:

jmap -dump:format=b,file=dump.hprof /usr/java/jdk1.6.0_16/bin/java core.dump.2878
like image 148
ppeterka Avatar answered Feb 04 '26 10:02

ppeterka



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!