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 hsdb [--pid pid | --exe executable --core coredump]
14
15       jhsdb debugd (--pid pid | --exe executable --core coredump) [options]
16
17       jhsdb  jstack (--pid pid | --exe executable --core coredump | --connect
18       [server-id@]debugd-host) [options]
19
20       jhsdb jmap (--pid pid | --exe executable --core  coredump  |  --connect
21       [server-id@]debugd-host) [options]
22
23       jhsdb  jinfo  (--pid pid | --exe executable --core coredump | --connect
24       [server-id@]debugd-host) [options]
25
26       jhsdb jsnap (--pid pid | --exe executable --core coredump  |  --connect
27       [server-id@]debugd-host) [options]
28
29       pid    The  process  ID  to  which  the  jhsdb tool should attach.  The
30              process must be a Java process.  To get a list of Java processes
31              running on a machine, use the ps command or, if the JVM process‐
32              es are not running in a separate docker instance, the  jps  com‐
33              mand.
34
35       executable
36              The Java executable file from which the core dump was produced.
37
38       coredump
39              The core file to which the jhsdb tool should attach.
40
41       [server-id@]debugd-host
42              An optional server ID and the address of the remote debug server
43              (debugd).
44
45       options
46              The command-line options for a jhsdb mode.  See Options for  the
47              debugd  Mode,  Options for the jstack Mode, Options for the jmap
48              Mode, Options for the jinfo Mode,  and  Options  for  the  jsnap
49              Mode.
50
51       Note:
52
53       Either  the  pid or the pair of executable and core files or the [serv‐
54       er-id@]debugd-host must be provided for debugd, jstack, jmap, jinfo and
55       jsnap modes.
56

DESCRIPTION

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

OPTIONS FOR THE DEBUGD MODE

95       --serverid server-id
96              An  optional  unique ID for this debug server.  This is required
97              if multiple debug servers are run on the same machine.
98
99       --rmiport port
100              Sets the port number to which the RMI connector  is  bound.   If
101              not specified a random available port is used.
102
103       --registryport port
104              Sets  the  RMI  registry port.  This option overrides the system
105              property 'sun.jvm.hotspot.rmi.port'.  If not specified, the sys‐
106              tem  property  is  used.  If the system property is not set, the
107              default port 1099 is used.
108
109       --hostname hostname
110              Sets the hostname the RMI connector is bound.  The  value  could
111              be  a  hostname  or an IPv4/IPv6 address.  This option overrides
112              the system property 'java.rmi.server.hostname'.  If  not  speci‐
113              fied,  the  system  property is used.  If the system property is
114              not set, a system hostname is used.
115

OPTIONS FOR THE JINFO MODE

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       no option
128              Prints the same information as Solaris pmap.
129
130       --heap Prints the java heap summary.
131
132       --binaryheap
133              Dumps the java heap in hprof binary format.
134
135       --dumpfile name
136              The name of the dumpfile.
137
138       --histo
139              Prints the histogram of java object heap.
140
141       --clstats
142              Prints the class loader statistics.
143
144       --finalizerinfo
145              Prints the information on objects awaiting finalization.
146

OPTIONS FOR THE JSTACK MODE

148       --locks
149              Prints the java.util.concurrent locks information.
150
151       --mixed
152              Attempts to print both java and native frames  if  the  platform
153              allows it.
154

OPTIONS FOR THE JSNAP MODE

156       --all  Prints all performance counters.
157
158
159
160JDK 17                               2021                             JHSDB(1)
Impressum