4

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?

U880D
  • 8,601
  • 6
  • 24
  • 40

1 Answers1

1

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.

Rachid
  • 19
  • 2