JHSDB(1)
π JHSDB(1) β the JDK Commands girlies' guide to jhsdb
okay so bestie, welcome to jhsdb, straight out of the JDK Commands section of the manual. Yes, the title line up top said JHSDB(1) and the section was JDK Commands β consider yourself formally introduced β¨
πΈ NAME πΈ
jhsdb β it attaches to a Java process, or launches a postmortem debugger to analyze the content of a core dump from a crashed Java Virtual Machine (JVM). literally its whole personality π
π SYNOPSIS π
like, here's the whole fit sheet, no cap:
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]
and the little arguments, expained with love π«Ά
pidβ the process ID thejhsdbtool should attach to. the process must be a Java process, okay? to get a list of Java processes running on a machine, use thepscommand or β if the JVM processes aren't running in a separate docker instance β thejpscommand πexecutableβ the Java executable file from which the core dump was produced.coredumpβ the core file thejhsdbtool should attach to.[server-id@]debugd-hostβ an optional server ID plus the address of the remote debug server (debugd).optionsβ the command-line options for ajhsdbmode. see 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, honestly π
Note: either thepidor the pair ofexecutableandcorefiles or the[server-id@]debugd-hostmust be provided fordebugd,jstack,jmap,jinfoandjsnapmodes. no pick-one-and-ghost, bestie. pick something. π
π¦ DESCRIPTION π¦
so 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). π
π¨ but listen β this command is experimental and unsupported. main character energy, zero warranty.
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 a vibe check you want to fail, ngl π
the jhsdb tool can be launched in any one of the following modes:
jhsdb clhsdbβ starts the interactive command-line debugger.jhsdb hsdbβ starts the interactive GUI debugger.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.jhsdb command --helpβ displays the options available for the command. the "help me help you" of it all β¨
π₯ OPTIONS FOR THE DEBUGD MODE π₯
--serverid server-idβ an optional unique ID for this debug server. this is required if multiple debug servers are run on the same machine. sharing is not caring here, bestie π--rmiport portβ sets the port number to which the RMI connector is bound. if not specified, a random available port is used. lucky dip π--registryport portβ sets the RMI registry port. this option overrides the system property'sun.jvm.hotspot.rmi.port'. if not specified, the system property is used. if the system property is not set, the default port1099is used. three-layer backup plan, we love to see it π--hostname hostnameβ 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 not specified, the system property is used. if the system property is not set, a system hostname is used. same energy, 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. doing both, because why choose π
π§ OPTIONS FOR THE JMAP MODE π§
- no option β prints the same information as Solaris
pmap. --heapβ prints the java heap summary.--binaryheapβ dumps the java heap in hprof binary format.--dumpfile nameβ the name of the dumpfile.--histoβ prints the histogram of java object heap.--clstatsβ prints the class loader statistics.--finalizerinfoβ prints the information on objects awaiting finalization. waiting room behavior π«Ά
β 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. attempts. icon behavior, sometimes it just can't π
π OPTIONS FOR THE JSNAP MODE π
--allβ prints all performance counters. all of them. the full collection. periodt π
and that's the whole page, bestie β go forth and debug responsibly πΈ
π· okay so that's a wrap, mwah π β this little love letter came straight from JDK 23, dated 2024, and the manual page it lives in is JHSDB(1). iykyk ππ¦
π¦ where this page comes from
- opensuse-leap 16.0: java-23-openjdk-devel 23.0.2.0-160000.1.1 Β· Apache-1.1 AND Apache-2.0 AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-only WITH Classpath-exception-2.0 AND LGPL-2.0-only AND MPL-1.0 AND MPL-1.1 AND SUSE-Public-Domain AND W3C
- opensuse-leap 16.0: java-23-openjdk-devel 23.0.2.0-160000.1.1 Β· Apache-1.1 AND Apache-2.0 AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-only WITH Classpath-exception-2.0 AND LGPL-2.0-only AND MPL-1.0 AND MPL-1.1 AND SUSE-Public-Domain AND W3C
- opensuse-leap 16.0: java-23-openjdk-devel 23.0.2.0-160000.1.1 Β· Apache-1.1 AND Apache-2.0 AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-only WITH Classpath-exception-2.0 AND LGPL-2.0-only AND MPL-1.0 AND MPL-1.1 AND SUSE-Public-Domain AND W3C
- Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms