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
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.