1JHSDB(1)                         JDK Commands                         JHSDB(1)
2
3
4

NAME

6       jhsdb - attach to a Java process or launch a postmortem debugger to an‐
7       alyze the content of a core dump from a crashed  Java  Virtual  Machine
8       (JVM)
9

SYNOPSIS

11       jhsdb clhsdb [--pid pid | --exe executable --core coredump]
12
13       jhsdb debugd [options] (pid | executable coredump) [server-id]
14
15       jhsdb hsdb [--pid pid | --exe executable --core coredump]
16
17       jhsdb jstack [--pid pid | --exe executable --core coredump] [options]
18
19       jhsdb jmap [--pid pid | --exe executable --core coredump] [options]
20
21       jhsdb jinfo [--pid pid | --exe executable --core coredump] [options]
22
23       jhsdb jsnap [options] [--pid pid | --exe executable --core coredump]
24
25       pid    The  process  ID  to  which  the  jhsdb tool should attach.  The
26              process must be a Java process.  To get a list of Java processes
27              running on a machine, use the ps command or, if the JVM process‐
28              es are not running in a separate docker instance, the  jps  com‐
29              mand.
30
31              Note: JDK 10 has added support for using the Attach API when at‐
32              taching to Java processes running in a separate docker  process.
33              However,  the  jps  command will not list the JVM processes that
34              are running in a separate docker instance.  If you are trying to
35              connect  a Linux host with a Virtual Machine that is in a docker
36              container, you must use tools such as ps to look up the  PID  of
37              the JVM.
38
39       server-id
40              An  optional  unique  ID  to use when multiple debug servers are
41              running on the same remote host.
42
43       executable
44              The Java executable file from which the core dump was produced.
45
46       coredump
47              The core file to which the jhsdb tool should attach.
48
49       options
50              The command-line options for a jhsdb mode.  See  Common  Options
51              for  jhsdb  Modes,  Options for the debugd Mode, Options for the
52              jinfo Mode, Options for the jmap  Mode,  Options  for  the  jmap
53              Mode,  Options  for  the  jstack Mode, and Options for the jsnap
54              Mode.
55
56       Note:
57
58       Either the pid or the pair of executable and core files must be provid‐
59       ed.
60

DESCRIPTION

62       You  can  use the jhsdb tool to attach to a Java process or to launch a
63       postmortem debugger to analyze  the  content  of  a  core-dump  from  a
64       crashed  Java  Virtual Machine (JVM).  This command is experimental and
65       unsupported.
66
67       Note:
68
69       Attaching the jhsdb tool to a live process will cause  the  process  to
70       hang and the process will probably crash when the debugger detaches.
71
72       The jhsdb tool can be launched in any one of the following modes:
73
74       jhsdb clhsdb
75              Starts the interactive command-line debugger.
76
77       jhsdb debugd
78              Starts the remote debug server.
79
80       jhsdb hsdb
81              Starts the interactive GUI debugger.
82
83       jhsdb jstack
84              Prints stack and locks information.
85
86       jhsdb jmap
87              Prints heap information.
88
89       jhsdb jinfo
90              Prints basic JVM information.
91
92       jhsdb jsnap
93              Prints performance counter information.
94

COMMON OPTIONS FOR JHSDB MODES

96       In  addition to any required jstack, jmap, jinfo or jsnap mode specific
97       options, the pid, exe, or core options must be provided for all  modes.
98       The following options are available for all modes.
99
100       --pid  The process ID of the hanging process.
101
102       --exe  The executable file name.
103
104       --core The core dump file name.
105
106       --help Displays the options available for the command.
107

OPTIONS FOR THE DEBUGD MODE

109       server-id
110              An  optional  unique ID for this debug server.  This is required
111              if multiple debug servers are run on the same machine.
112

OPTIONS FOR THE JINFO MODE

114       Without specified options, the jhsdb jinfo prints both flags and  prop‐
115       erties.
116
117       --flags
118              Prints the VM flags.
119
120       --sysprops
121              Prints the Java system properties.
122
123       no option
124              Prints the VM flags and the Java system properties.
125

OPTIONS FOR THE JMAP MODE

127       In  addition  to  the following mode specific options, the pid, exe, or
128       core options described in Common Options for jhsdb Modes must  be  pro‐
129       vided.
130
131       no option
132              Prints the same information as Solaris pmap.
133
134       --heap Prints the java heap summary.
135
136       --binaryheap
137              Dumps the java heap in hprof binary format.
138
139       --dumpfile
140              Prints the name of the dumpfile.
141
142       --histo
143              Prints the histogram of java object heap.
144
145       --clstats
146              Prints the class loader statistics.
147
148       --finalizerinfo
149              Prints the information on objects awaiting finalization.
150

OPTIONS FOR THE JSTACK MODE

152       In  addition  to  the following mode specific options, the pid, exe, or
153       core options described in Common Options for jhsdb Modes must  be  pro‐
154       vided.
155
156       --locks
157              Prints the java.util.concurrent locks information.
158
159       --mixed
160              Attempts  to  print  both java and native frames if the platform
161              allows it.
162

OPTIONS FOR THE JSNAP MODE

164       In addition to the following mode specific option,  the  pid,  exe,  or
165       core  options  described in Common Options for jhsdb Modes must be pro‐
166       vided.
167
168       --all  Prints all performance counters.
169
170
171
172JDK 13                               2018                             JHSDB(1)
Impressum