Although the preferred mechanism for controlling the production of Heapdumps is now the use of dump agents with -Xdump:heap, you can also use the previous mechanism, environment variables.
The following table details environment variables specifically concerned with Heapdump production:
Environment Variable | Usage Information |
---|---|
IBM_HEAPDUMP |
Setting either of these to any value (such as true) enables heap dump production by means of signals. |
IBM_HEAPDUMPDIR | The default location into which the Heapdump will be written. |
JAVA_DUMP_OPTS | Use this environment variable to control the conditions under which Heapdumps (and other dumps) are produced. See Dump agent environment variables for more information . |
IBM_HEAPDUMP_OUTOFMEMORY | By setting this environment variable to false, you disable Heapdumps for an OutOfMemory condition. |
IBM_JAVA_HEAPDUMP_TEST | Use this environment variable to cause the JVM to generate both phd and text versions of Heapdumps. Equivalent to opts=PHD+CLASSIC on the -Xdump:heap option. |
IBM_JAVA_HEAPDUMP_TEXT | Use this environment variable to cause the JVM to generate a text (human readable) Heapdump. Equivalent to opts=CLASSIC on the -Xdump:heap option. |