Beta Draft: 2017-03-28


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).


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] 

The process ID to which the jhsdb should attach. The process must be a Java process. To get a list of Java processes running on a machine, use the jps command.


An optional unique ID to use when multiple debug servers are running on the same remote host.


The Java executable from which the core dump was produced.


The core file to which the jhsdb should attach.


The command-line options for a jhsdb mode. See Common Options for jhsdb Modes, Options for debugd Mode, Options for jinfo Mode, Options for jmap Mode, Options for jmap Mode, Options for jstack Mode, and Options for jsnap Mode .


Either the pid or the pair of executable and core must be provided.


You can use the jhsdb utility to obtain specific information from a hanging or crashed JVM. To attach the jhsdb utility to a hanging or crashed JVM, you must provide either the path to the executable with the path to the coredump or the pid of the hanging process.


Attaching jhsdb 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 any one of the following modes:

jhsdb clhsdb

Starts interactive command-line debugger.

jhsdb debugd

Starts the remote debug server.

jhsdb hsdb

Starts interactive GUI debugger.

jhsdb jstack

Prints stack and locks information.

jhsdb jmap

Prints heap information.

jhsdb jinfo

Prints basic JVM information.

jhsdb jsnap

Prints performance counter information.

Common Options for jhsdb Modes

The pid, exe, or core options must be provided.


The pid of the hanging process.


The executable file name.


The core dump file name.


Displays the options available for the command.

Options for debugd Mode


Optional unique id for this debug server. This is required if multiple debug servers are run on the same machine.

Options for jinfo Mode

Without specified options, jhsdb jinfo prints both flags and properties.


Prints VM flags.


Prints Java system properties.


Prints jinfo specific help message.

Options for jmap Mode


Prints java heap summary.


Dumps java heap in hprof binary format.


Prints histogram of java object heap.


Prints class loader statistics.


Prints information on objects awaiting finalization.


Prints jmap specific help.

Options for jstack Mode


Prints java.util.concurrent locks information.


Attempts to print both java and native frame if platform allows it.


Prints jstack specific help.

Options for jsnap Mode


Prints all performance counters.


Prints jsnap specific help.