[[heapdump]]
= Heap Dump (`heapdump`)
The `heapdump` endpoint provides a heap dump from the application's JVM.



[[heapdump.retrieving]]
== Retrieving the Heap Dump
To retrieve the heap dump, make a `GET` request to `/actuator/heapdump`.
The response is binary data and can be large.
Its format depends upon the JVM on which the application is running.
When running on a HotSpot JVM the format is https://docs.oracle.com/javase/8/docs/technotes/samples/hprof.html[HPROF]
and on OpenJ9 it is https://www.eclipse.org/openj9/docs/dump_heapdump/#portable-heap-dump-phd-format[PHD].
Typically, you should save the response to disk for subsequent analysis.
When using curl, this can be achieved by using the `-O` option, as shown in the following example:

include::{snippets}/heapdump/curl-request.adoc[]

The preceding example results in a file named `heapdump` being written to the current working directory.
