JMAP(1)

πŸ“¦ version 17.0.20.1, in opensuse-leap 16.0

πŸ’– NAME πŸ’–

okay bestie, welcome to the JMAP(1) page from the JDK Commands set β€” the command jmap prints details of a specified process, and that's the whole assignment ✨. It's giving diagnostic main character energy, fr fr.

✨ SYNOPSIS ✨

Note: This command is experimental and unsupported. Don't get too attached, okay? πŸ’€
jmap [options] pid
  • options β€” this represents the jmap command-line options. Peep the Options for the jmap Command section below for the full rundown πŸ‘€.
  • pid β€” the process ID for which the information specified by the options is to be printed. Lowkey important: the process must be a Java process. To get a list of Java processes running on a machine, use either the ps command or, if the JVM processes are not running in a separate docker instance, the jps command. iykyk 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

The jmap command prints details of a specified running process. That's it, that's the vibe πŸ’….

Note: This command is unsupported and might not be available in future releases of the JDK. No cap, plan accordingly. 😭

On Windows Systems where the dbgeng.dll file isn't present, the Debugging Tools for Windows must be installed to make these tools work. The PATH environment variable should contain the location of the jvm.dll file that's used by the target process or the location from which the core dump file was produced. Literally make sure your PATH is behaving, bestie 🌈.

πŸ’… OPTIONS FOR THE JMAP COMMAND πŸ’…

  • -clstats pid β€” Connects to a running process and prints class loader statistics of Java heap. Class loader gossip, but make it stats πŸŽ€.
  • -finalizerinfo pid β€” Connects to a running process and prints information on objects awaiting finalization. The "what's still waiting around" vibe check πŸ‘‘.
  • -histo[:live] pid β€” Connects to a running process and prints a histogram of the Java object heap. If the live suboption is specified, it then counts only live objects. Live-objects-only mode when you need that filter, slay ✨.
  • -dump:dump_options pid β€” Connects to a running process and dumps the Java heap. The dump_options include:
    • live β€” When specified, dumps only the live objects; if not specified, then dumps all objects in the heap. So yes, not passing live means all objects, periodt πŸ’€.
    • format=b β€” Dumps the Java heap in hprof binary format.
    • file=filename β€” Dumps the heap to filename.

Example, bestie β€” copy it exactly:

jmap -dump:live,format=b,file=heap.bin pid

mwah πŸ’‹ this page is from JDK 17, dated 2021, and its manual tag is JMAP(1). bye bestie, go check those processes πŸ«ΆπŸ¦‹

πŸ“¦ where this page comes from