I am using CentOS. How to get heap dump in AdoptOpenJDK?
Terminal commands like
jcmd <pid> GC.heap_dump <file-path>
or
jmap -dump:live,file=<file-path> <pid>
don't work.
Is there a simple way to get dump of a Java application by using PID?
Are you running on the JDK?
Tools like jcmd and jmap are only available in JDK. So make sure you run on the JDK instead of the JRE and try again.
In Docker it could be as simple as changing something like jvm-centos-adoptopenjdk-hotspot-jre to jvm-centos-adoptopenjdk-hotspot-jdk.
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