244 lines
6.8 KiB
Groff
244 lines
6.8 KiB
Groff
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
|
|
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
.\"
|
|
.\" This code is free software; you can redistribute it and/or modify it
|
|
.\" under the terms of the GNU General Public License version 2 only, as
|
|
.\" published by the Free Software Foundation.
|
|
.\"
|
|
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
|
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
.\" version 2 for more details (a copy is included in the LICENSE file that
|
|
.\" accompanied this code).
|
|
.\"
|
|
.\" You should have received a copy of the GNU General Public License version
|
|
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
|
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
.\"
|
|
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
.\" or visit www.oracle.com if you need additional information or have any
|
|
.\" questions.
|
|
.\"
|
|
.\" Automatically generated by Pandoc 2.3.1
|
|
.\"
|
|
.TH "JHSDB" "1" "2020" "JDK 14" "JDK Commands"
|
|
.hy
|
|
.SH NAME
|
|
.PP
|
|
jhsdb \- attach to a Java process or launch a postmortem debugger to
|
|
analyze the content of a core dump from a crashed Java Virtual Machine
|
|
(JVM)
|
|
.SH SYNOPSIS
|
|
.PP
|
|
\f[CB]jhsdb\f[R] \f[CB]clhsdb\f[R] [\f[CB]\-\-pid\f[R] \f[I]pid\f[R] |
|
|
\f[CB]\-\-exe\f[R] \f[I]executable\f[R] \f[CB]\-\-core\f[R]
|
|
\f[I]coredump\f[R]]
|
|
.PP
|
|
\f[CB]jhsdb\f[R] \f[CB]hsdb\f[R] [\f[CB]\-\-pid\f[R] \f[I]pid\f[R] |
|
|
\f[CB]\-\-exe\f[R] \f[I]executable\f[R] \f[CB]\-\-core\f[R]
|
|
\f[I]coredump\f[R]]
|
|
.PP
|
|
\f[CB]jhsdb\f[R] \f[CB]debugd\f[R] (\f[CB]\-\-pid\f[R] \f[I]pid\f[R] |
|
|
\f[CB]\-\-exe\f[R] \f[I]executable\f[R] \f[CB]\-\-core\f[R]
|
|
\f[I]coredump\f[R]) [\f[I]options\f[R]]
|
|
.PP
|
|
\f[CB]jhsdb\f[R] \f[CB]jstack\f[R] (\f[CB]\-\-pid\f[R] \f[I]pid\f[R] |
|
|
\f[CB]\-\-exe\f[R] \f[I]executable\f[R] \f[CB]\-\-core\f[R] \f[I]coredump\f[R]
|
|
| \f[CB]\-\-connect\f[R] \f[I][server\-id\@]debugd\-host\f[R])
|
|
[\f[I]options\f[R]]
|
|
.PP
|
|
\f[CB]jhsdb\f[R] \f[CB]jmap\f[R] (\f[CB]\-\-pid\f[R] \f[I]pid\f[R] |
|
|
\f[CB]\-\-exe\f[R] \f[I]executable\f[R] \f[CB]\-\-core\f[R] \f[I]coredump\f[R]
|
|
| \f[CB]\-\-connect\f[R] \f[I][server\-id\@]debugd\-host\f[R])
|
|
[\f[I]options\f[R]]
|
|
.PP
|
|
\f[CB]jhsdb\f[R] \f[CB]jinfo\f[R] (\f[CB]\-\-pid\f[R] \f[I]pid\f[R] |
|
|
\f[CB]\-\-exe\f[R] \f[I]executable\f[R] \f[CB]\-\-core\f[R] \f[I]coredump\f[R]
|
|
| \f[CB]\-\-connect\f[R] \f[I][server\-id\@]debugd\-host\f[R])
|
|
[\f[I]options\f[R]]
|
|
.PP
|
|
\f[CB]jhsdb\f[R] \f[CB]jsnap\f[R] (\f[CB]\-\-pid\f[R] \f[I]pid\f[R] |
|
|
\f[CB]\-\-exe\f[R] \f[I]executable\f[R] \f[CB]\-\-core\f[R] \f[I]coredump\f[R]
|
|
| \f[CB]\-\-connect\f[R] \f[I][server\-id\@]debugd\-host\f[R])
|
|
[\f[I]options\f[R]]
|
|
.TP
|
|
.B \f[I]pid\f[R]
|
|
The process ID to which the \f[CB]jhsdb\f[R] tool should attach.
|
|
The process must be a Java process.
|
|
To get a list of Java processes running on a machine, use the
|
|
\f[CB]ps\f[R] command or, if the JVM processes are not running in a
|
|
separate docker instance, the \f[B]jps\f[R] command.
|
|
.RS
|
|
.PP
|
|
\f[B]Note:\f[R] JDK 10 has added support for using the Attach API when
|
|
attaching to Java processes running in a separate docker process.
|
|
However, the \f[CB]jps\f[R] command will not list the JVM processes that
|
|
are running in a separate docker instance.
|
|
If you are trying to connect a Linux host with a Virtual Machine that is
|
|
in a docker container, you must use tools such as \f[CB]ps\f[R] to look up
|
|
the PID of the JVM.
|
|
.RE
|
|
.TP
|
|
.B \f[I]executable\f[R]
|
|
The Java executable file from which the core dump was produced.
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[I]coredump\f[R]
|
|
The core file to which the \f[CB]jhsdb\f[R] tool should attach.
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[I][server\-id\@]debugd\-host\f[R]
|
|
An optional server ID and the address of the remote debug server
|
|
(debugd).
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[I]options\f[R]
|
|
The command\-line options for a \f[CB]jhsdb\f[R] mode.
|
|
See \f[B]Options for the debugd Mode\f[R], \f[B]Options for the jstack
|
|
Mode\f[R], \f[B]Options for the jmap Mode\f[R], \f[B]Options for the jinfo
|
|
Mode\f[R], and \f[B]Options for the jsnap Mode\f[R].
|
|
.RS
|
|
.RE
|
|
.PP
|
|
\f[B]Note:\f[R]
|
|
.PP
|
|
Either the \f[I]pid\f[R] or the pair of \f[I]executable\f[R] and
|
|
\f[I]core\f[R] files or the \f[I][server\-id\@]debugd\-host\f[R] must be
|
|
provided for \f[CB]debugd\f[R], \f[CB]jstack\f[R], \f[CB]jmap\f[R],
|
|
\f[CB]jinfo\f[R] and \f[CB]jsnap\f[R] modes.
|
|
.SH DESCRIPTION
|
|
.PP
|
|
You can use the \f[CB]jhsdb\f[R] 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.
|
|
.PP
|
|
\f[B]Note:\f[R]
|
|
.PP
|
|
Attaching the \f[CB]jhsdb\f[R] tool to a live process will cause the
|
|
process to hang and the process will probably crash when the debugger
|
|
detaches.
|
|
.PP
|
|
The \f[CB]jhsdb\f[R] tool can be launched in any one of the following
|
|
modes:
|
|
.TP
|
|
.B \f[CB]jhsdb\ clhsdb\f[R]
|
|
Starts the interactive command\-line debugger.
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[CB]jhsdb\ hsdb\f[R]
|
|
Starts the interactive GUI debugger.
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[CB]jhsdb\ debugd\f[R]
|
|
Starts the remote debug server.
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[CB]jhsdb\ jstack\f[R]
|
|
Prints stack and locks information.
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[CB]jhsdb\ jmap\f[R]
|
|
Prints heap information.
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[CB]jhsdb\ jinfo\f[R]
|
|
Prints basic JVM information.
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[CB]jhsdb\ jsnap\f[R]
|
|
Prints performance counter information.
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[CB]jhsdb\f[R] \f[I]command\f[R] \f[CB]\-\-help\f[R]
|
|
Displays the options available for the \f[I]command\f[R].
|
|
.RS
|
|
.RE
|
|
.SH OPTIONS FOR THE DEBUGD MODE
|
|
.TP
|
|
.B \f[CB]\-\-serverid\f[R] \f[I]server\-id\f[R]
|
|
An optional unique ID for this debug server.
|
|
This is required if multiple debug servers are run on the same machine.
|
|
.RS
|
|
.RE
|
|
.SH OPTIONS FOR THE JINFO MODE
|
|
.TP
|
|
.B \f[CB]\-\-flags\f[R]
|
|
Prints the VM flags.
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[CB]\-\-sysprops\f[R]
|
|
Prints the Java system properties.
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B no option
|
|
Prints the VM flags and the Java system properties.
|
|
.RS
|
|
.RE
|
|
.SH OPTIONS FOR THE JMAP MODE
|
|
.TP
|
|
.B no option
|
|
Prints the same information as Solaris \f[CB]pmap\f[R].
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[CB]\-\-heap\f[R]
|
|
Prints the \f[CB]java\f[R] heap summary.
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[CB]\-\-binaryheap\f[R]
|
|
Dumps the \f[CB]java\f[R] heap in \f[CB]hprof\f[R] binary format.
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[CB]\-\-dumpfile\f[R] \f[I]name\f[R]
|
|
The name of the dumpfile.
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[CB]\-\-histo\f[R]
|
|
Prints the histogram of \f[CB]java\f[R] object heap.
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[CB]\-\-clstats\f[R]
|
|
Prints the class loader statistics.
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[CB]\-\-finalizerinfo\f[R]
|
|
Prints the information on objects awaiting finalization.
|
|
.RS
|
|
.RE
|
|
.SH OPTIONS FOR THE JSTACK MODE
|
|
.TP
|
|
.B \f[CB]\-\-locks\f[R]
|
|
Prints the \f[CB]java.util.concurrent\f[R] locks information.
|
|
.RS
|
|
.RE
|
|
.TP
|
|
.B \f[CB]\-\-mixed\f[R]
|
|
Attempts to print both \f[CB]java\f[R] and native frames if the platform
|
|
allows it.
|
|
.RS
|
|
.RE
|
|
.SH OPTIONS FOR THE JSNAP MODE
|
|
.TP
|
|
.B \f[CB]\-\-all\f[R]
|
|
Prints all performance counters.
|
|
.RS
|
|
.RE
|