Pre-General Availability: 2017-05-24

jhsdb

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] 
pid

The 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-id

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

executable

The Java executable file from which the coredump was produced.

core

The core file to which the jhsdb tool should attach.

options

The 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 file must be provided.

Description

You can use the jhsdb tool 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.

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 clhsdb

Starts the interactive command-line debugger.

jhsdb debugd

Starts the remote debug server.

jhsdb hsdb

Starts the 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.

--pid

The process ID of the hanging process.

--exe

The executable file name.

--core

The core dump file name.

--help

Displays the options available for the command.

Options for the debugd Mode

server-id

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

Options for the jinfo Mode

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

--flags

Prints a VM flags.

--sysprops

Prints a Java system properties.

--help

Prints ajinfo specific help message.

Options for the jmap Mode

--heap

Prints a java heap summary.

--binaryheap

Dumps a java heap in hprof binary format.

--histo

Prints a histogram of java object heap.

--clstat

Prints a class loader statistics.

--finalizerinfo

Prints a information on objects awaiting finalization.

--help

Prints a jmap specific help.

Options for the jstack Mode

--locks

Prints a java.util.concurrent locks information.

--mixed

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

--help

Prints a jstack specific help.

Options for the jsnap Mode

--all

Prints all performance counters.

--help

Prints a jsnap specific help.