You use the jhsdb tool to attach to a Java process or to launch a postmortem debugger to analyze the content of a core dump from a crashed Java Virtual Machine (JVM).
Synopsis
jhsdb clhsdb [--pid pid | --exe executable --core coredump]
jhsdb debugd [options] pid [server-id]|[option] executable core [server-id]
jhsdb hsdb [--pid pid | --exe executable --core coredump]
jhsdb jstack [--pid pid | --exe executable --core coredump] [options]
jhsdb jmap [--pid pid | --exe executable --core coredump] [options]
jhsdb jinfo [--pid pid | --exe executable --core coredump] [options]
jhsdb jsnap [options] [--pid pid | --exe executable --core coredump]
pidThe process ID to which the jhsdb tool should attach. The process must be a Java process. To get a list of Java processes running on a machine, use the jps command.
server-idAn optional unique ID to use when multiple debug servers are running on the same remote host.
executableThe Java executable file from which the core dump was produced.
coreThe core file to which the jhsdb tool should attach.
optionsThe command-line options for a jhsdb mode. See Common Options for jhsdb Modes, Options for the debugd Mode, Options for the jinfo Mode, Options for the jmap Mode, Options for the jmap Mode, Options for the jstack Mode, and Options for the jsnap Mode.
Note:
Either the pid or the pair of executable and core files must be provided.
Description
You can use the jhsdb tool to attach to a Java process or to launch a postmortem debugger to analyze the content of a core-dump from a crashed Java Virtual Machine (JVM). This command is experimental and unsupported.
Note:
Attaching the jhsdb tool to a live process will cause the process to hang and the process will probably crash when the debugger detaches.
The jhsdb tool can be launched in any one of the following modes:
jhsdb clhsdbStarts the interactive command-line debugger.
jhsdb debugdStarts the remote debug server.
jhsdb hsdbStarts the interactive GUI debugger.
jhsdb jstackPrints stack and locks information.
jhsdb jmapPrints heap information.
jhsdb jinfoPrints basic JVM information.
jhsdb jsnapPrints performance counter information.
Common Options for jhsdb Modes
In addition to any required jstack, jmap, jinfo or jsnap mode specific options, the pid, exe, or core options must be provided for all modes. The following options are available for all modes.
Options for the debugd Mode
Options for the jinfo Mode
Without specified options, the jhsdb jinfo prints both flags and properties.
Options for the jmap Mode
In addition to the following mode specific options, the pid, exe, or core options described in Common Options for jhsdb Modes must be provided.
Prints the same information as Solaris pmap.
--heapPrints the java heap summary.
--binaryheapDumps the java heap in hprof binary format.
--dumpfilePrints the name of the dumpfile.
--histoPrints the histogram of java object heap.
--clstatsPrints the class loader statistics.
--finalizerinfoPrints the information on objects awaiting finalization.
Options for the jstack Mode
In addition to the following mode specific options, the pid, exe, or core options described in Common Options for jhsdb Modes must be provided.
Options for the jsnap Mode
In addition to the following mode specific option, the pid, exe, or core options described in Common Options for jhsdb Modes must be provided.