JHSDB(1)
π JHSDB β the manual page, but make it make sense β¨
okay so bestie, gather round π«Ά this is the manual page for jhsdb, straight out of the JDK Commands manual, and I'm gonna walk you through it like we're texting at 2am. no cap, it's actually kind of iconic. let's go π
πΈ NAME πΈ
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) π§
β¨ SYNOPSIS β¨
β οΈ WARNING: Thedebugdsubcommand and--connectoptions are deprecated. They will be removed in a future release. likeβ¦ they're on their way out, bestie π
jhsdb clhsdb [--pid pid | --exe executable --core coredump]
jhsdb hsdb [--pid pid | --exe executable --core coredump]
jhsdb debugd (--pid pid | --exe executable --core coredump) [options]
jhsdb jstack (--pid pid | --exe executable --core coredump | --connect
[server-id@]debugd-host) [options]
jhsdb jmap (--pid pid | --exe executable --core coredump | --connect
[server-id@]debugd-host) [options]
jhsdb jinfo (--pid pid | --exe executable --core coredump | --connect
[server-id@]debugd-host) [options]
jhsdb jsnap (--pid pid | --exe executable --core coredump | --connect
[server-id@]debugd-host) [options]
π the arguments, explained π
pidβ the process ID thatjhsdbshould attach to. it must be a Java process, no exceptions π ββοΈ. wanna see which Java processes are running on a machine? use thepscommand or, if the JVM processes aren't running in a separate docker instance, thejpscommand. iykyk πexecutableβ the Java executable file from which the core dump was produced.coredumpβ the core file thatjhsdbshould attach to.[server-id@]debugd-hostβ an optional server ID plus the address of the remote debug server (debugd). the server-id part is optional, hence the brackets, bestie π¦optionsβ the command-line options for ajhsdbmode. check out Options for the debugd Mode, Options for the jstack Mode, Options for the jmap Mode, Options for the jinfo Mode, and Options for the jsnap Mode. it's giving menu at a restaurant π
π Note: either thepid, or the pair ofexecutableandcorefiles, or the[server-id@]debugd-hostmust be provided fordebugd,jstack,jmap,jinfoandjsnapmodes. pick one, you can't just show up empty-handed π
π¦ DESCRIPTION π¦
you can 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). sounds intense, right? it is. this command is experimental and unsupported β so, like, it's the cool underground thing, not the officially-sponsored thing π
β οΈ 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. not me casually ending your process's whole career π please be careful, bestie.
the jhsdb tool can be launched in any one of the following modes:
jhsdb clhsdbβ starts the interactive command-line debugger. main character energy, terminal edition π₯οΈjhsdb hsdbβ starts the interactive GUI debugger. windows! buttons! slay β¨jhsdb debugdβ starts the remote debug server.jhsdb jstackβ prints stack and locks information.jhsdb jmapβ prints heap information.jhsdb jinfoβ prints basic JVM information.jhsdb jsnapβ prints performance counter information.jhsdbcommand--helpβ displays the options available for the command. always check the menu before you order, periodt π
π₯ OPTIONS FOR THE DEBUGD MODE π₯
--serveridserver-id β an optional unique ID for this debug server. it's required if multiple debug servers are run on the same machine β like, if there's more than one of you at the party, you need name tags π--rmiportport β sets the port number the RMI connector is bound to. if you don't specify it, a random available port is used. surprise port! π--registryportport β sets the RMI registry port. this option overrides the system property'sun.jvm.hotspot.rmi.port'. if it's not specified, the system property is used; and if the system property isn't set either, the default port1099is used. chain of command, bestie π--hostnamehostname β sets the hostname the RMI connector is bound to. the value could be a hostname or an IPv4/IPv6 address. this option overrides the system property'java.rmi.server.hostname'. if it's not specified, the system property is used; and if the system property isn't set either, a system hostname is used. same energy as above, different property π
π OPTIONS FOR THE JINFO MODE π
--flagsβ prints the VM flags. π©--syspropsβ prints the Java system properties.- no option β prints the VM flags and the Java system properties. you get both, bestie, it's a combo meal π
π OPTIONS FOR THE JMAP MODE π
- no option β prints the same information as Solaris
pmap. blast from the past ngl π΅ --heapβ prints the java heap summary.--binaryheapβ dumps the java heap in hprof binary format. certified binary moment π--dumpfilename β the name of the dumpfile.--histoβ prints the histogram of java object heap. data visualization era β¨--clstatsβ prints the class loader statistics.--finalizerinfoβ prints the information on objects awaiting finalization. they're in their waiting-for-their-moment arc π
β OPTIONS FOR THE JSTACK MODE β
--locksβ prints thejava.util.concurrentlocks information. π--mixedβ attempts to print both java and native frames if the platform allows it. cross-platform hope, we love to see it π«Ά
π OPTIONS FOR THE JSNAP MODE π
--allβ prints all performance counters. go big or go home, periodt π
π SEE ALSO / sign-off π
and that's the whole page, bestie π you made it to the end, i'm so proud of you. this little tour of jhsdb comes from JDK 27.0.1.0.3, dated 2026, and it's part of the JDK Commands manual β so yeah, go debug something iconic, and remember: live processes will hang and probably crash when the debugger detaches π slay responsibly πβ¨
π¦ where this page comes from
- arch rolling: jdk-openjdk 27.0.1.0.3.u1-1 Β· LicenseRef-Java
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms