Table 2-2 summarizes the options and tools that are designed for postmortem diagnostics. If an application crashes, these options and tools can be used to obtain additional information, either at the time of the crash or later using information from the crash dump.
Table 2-2 Postmortem Diagnostics Tools
Tool or Option | Description and Usage |
---|---|
Fatal Error Log |
When an irrecoverable (fatal) error occurs, an error log is created. This file contains much information obtained at the time of the fatal error. In many cases it is the first item to examine when a crash occurs. See Appendix A. |
|
This command-line option specifies the generation of a heap dump when the VM detects a native out-of-memory error. See The -XX:HeapDumpOnOutOfMemoryError Option. |
|
This command-line option specifies a sequence of user-supplied scripts or commands to be executed when a fatal error occurs. For example, on Windows, this option can execute a command to force a crash dump. This option is very useful on systems where a post-mortem debugger is not configured. See The -XX:OnError Option. |
|
This command-line option suspends a process when a fatal error occurs. Depending on the user response, the option can launch the native debugger (for example, |
Other |
Several other |
Java VisualVM (postmortem use on Oracle Solaris and Linux operating systems only) |
This utility can analyze a core dump by providing a readable display of the core dump in the form of a heap dump and a thread dump, as well as overview information (for example, JVM arguments and system properties. See Java VisualVM. |
|
Debugger support includes an |
|
This utility provides a convenient means to browse the object topology in a heap dump. See The jhat Utility. |
(postmortem use on Oracle Solaris and Linux operating systems only) |
This utility can obtain configuration information from a core file obtained from a crash or from a core file obtained using the |
(postmortem use on Oracle Solaris and Linux operating systems only) |
This utility can obtain memory map information, including a heap histogram, from a core file obtained from a crash or from a core file obtained using the |
(Oracle Solaris and Linux operating systems only) |
The Serviceability Agent Debug Daemon ( |
|
This utility can obtain Java and native stack information from a Java process. On Oracle Solaris and Linux operating systems the utility can also get the information from a core file or a remote debug server. See The jstack Utility. |
Native tools |
Each operating system has native tools and utilities that can be used for postmortem diagnosis. See Native Operating System Tools. |