JHSDB(1)

πŸ“¦ version 27.0.1.0.3.u1, in arch rolling

πŸ’… 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: The debugd subcommand and --connect options 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 that jhsdb should attach to. it must be a Java process, no exceptions πŸ™…β€β™€οΈ. wanna see which Java processes are running on a machine? use the ps command or, if the JVM processes aren't running in a separate docker instance, the jps command. iykyk πŸ’…
  • executable β€” the Java executable file from which the core dump was produced.
  • coredump β€” the core file that jhsdb should 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 a jhsdb mode. 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 the pid, or the pair of executable and core files, or the [server-id@]debugd-host must be provided for debugd, jstack, jmap, jinfo and jsnap modes. 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.
  • jhsdb command --help β€” displays the options available for the command. always check the menu before you order, periodt πŸ’…

πŸ”₯ OPTIONS FOR THE DEBUGD MODE πŸ”₯

  • --serverid server-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 πŸŽ€
  • --rmiport port β€” sets the port number the RMI connector is bound to. if you don't specify it, a random available port is used. surprise port! 🎁
  • --registryport port β€” 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 port 1099 is used. chain of command, bestie πŸ‘‘
  • --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 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 πŸ’€
  • --dumpfile name β€” 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 the java.util.concurrent locks 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