The -Xdump option on the command line is the preferred method for producing dumps for cases where the default settings are not enough. You can also produce dumps using the JAVA_DUMP_OPTS environment variable.
If you set agents for a condition using the JAVA_DUMP_OPTS environment variable, default dump agents for that condition are disabled; however, any -Xdump options specified on the command line will be used.
JAVA_DUMP_OPTS="ON<condition>(<agent>[<count>],<agent>[<count>]),ON<condition>(<agent>[<count>],...),...)"where:
ONERROR(SYSDUMP[1]),ONERROR(JAVADUMP)Also, the ONANYSIGNAL condition is parsed before all others, so
ONINTERRUPT(NONE),ONANYSIGNAL(SYSDUMP)has the same effect as
ONANYSIGNAL(SYSDUMP),ONINTERRUPT(NONE)
If the JAVA_DUMP_TOOL environment variable is set, that variable is assumed to specify a valid executable name and is parsed for replaceable fields, such as %pid. If %pid is detected in the string, the string is replaced with the JVM's own process ID. The tool specified by JAVA_DUMP_TOOL is run after any system dump or Heapdump has been taken, before anything else.
Prior to Java 6 SR 2, the DISABLE_JAVADUMP, IBM_HEAPDUMP, and IBM_HEAP_DUMP environment variables took precedence over the JAVA_DUMP_OPTS environment variable.
From Java 6 SR 2, setting JAVA_DUMP_OPTS only affects those conditions you specify. Actions on other conditions are left unchanged. Prior to Java 6 SR 2, setting JAVA_DUMP_OPTS overrides settings for all the conditions.