1 ---
   2 # Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.
   8 #
   9 # This code is distributed in the hope that it will be useful, but WITHOUT
  10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 # version 2 for more details (a copy is included in the LICENSE file that
  13 # accompanied this code).
  14 #
  15 # You should have received a copy of the GNU General Public License version
  16 # 2 along with this work; if not, write to the Free Software Foundation,
  17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 #
  19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 # or visit www.oracle.com if you need additional information or have any
  21 # questions.
  22 #
  23 
  24 title: 'JCMD(1) JDK @@VERSION_SHORT@@ | JDK Commands'
  25 date: @@COPYRIGHT_YEAR@@
  26 lang: en
  27 ---
  28 
  29 ## Name
  30 
  31 jcmd - send diagnostic command requests to a running Java Virtual Machine
  32 (JVM)
  33 
  34 ## Synopsis
  35 
  36 `jcmd` \[*pid* \| *main-class*\] *command*... \| `PerfCounter.print` \| `-f`
  37 *filename*
  38 
  39 `jcmd` \[`-l`\]
  40 
  41 `jcmd` `-h`
  42 
  43 *pid*
  44 :   When used, the `jcmd` utility sends the diagnostic command request to the
  45     process ID for the Java process.
  46 
  47 *main-class*
  48 :   When used, the `jcmd` utility sends the diagnostic command request to all
  49     Java processes with the specified name of the main class.
  50 
  51 *command*
  52 :   The `command` must be a valid `jcmd` command for the selected JVM. The list
  53     of available commands for `jcmd` is obtained by running the `help` command
  54     (`jcmd` *pid* `help`) where *pid* is the process ID for the running Java
  55     process.
  56 
  57 `Perfcounter.print`
  58 :   Prints the performance counters exposed by the specified Java process.
  59 
  60 `-f` *filename*
  61 :   Reads and executes commands from a specified file, *filename*.
  62 
  63 `-l`
  64 :   Displays the list of Java Virtual Machine process identifiers that are not
  65     running in a separate docker process along with the main class and
  66     command-line arguments that were used to launch the process. If the JVM is
  67     in a docker process, you must use tools such as `ps` to look up the PID.
  68 
  69     **Note:**
  70 
  71     Using `jcmd` without arguments is the same as using `jcmd -l`.
  72 
  73 `-h`
  74 :   Displays the `jcmd` utility's command-line help.
  75 
  76 ## Description
  77 
  78 The `jcmd` utility is used to send diagnostic command requests to the JVM. It
  79 must be used on the same machine on which the JVM is running, and have the same
  80 effective user and group identifiers that were used to launch the JVM. Each
  81 diagnostic command has its own set of options and arguments. To display the description,
  82 syntax, and a list of available options and arguments for a diagnostic command, use the
  83 name of the command as the argument. For example:
  84 
  85 >   `jcmd` *pid* `help` *command*
  86 
  87 If arguments contain spaces, then you must surround them with single or double
  88 quotation marks (`'` or `"`). In addition, you must escape single or double
  89 quotation marks with a backslash (`\`) to prevent the operating system shell
  90 from processing quotation marks. Alternatively, you can surround these
  91 arguments with single quotation marks and then with double quotation marks (or
  92 with double quotation marks and then with single quotation marks).
  93 
  94 If you specify the process identifier (*pid*) or the main class (*main-class*)
  95 as the first argument, then the `jcmd` utility sends the diagnostic command
  96 request to the Java process with the specified identifier or to all Java
  97 processes with the specified name of the main class. You can also send the
  98 diagnostic command request to all available Java processes by specifying `0` as
  99 the process identifier.
 100 
 101 ## Commands for jcmd
 102 
 103 The *command* must be a valid `jcmd` diagnostic command for the selected JVM.
 104 The list of available commands for `jcmd` is obtained by running the `help`
 105 command (`jcmd` *pid* `help`) where *pid* is the process ID for a running Java
 106 process. If the *pid* is `0`, commands will be sent to all Java processes. The
 107 main class argument will be used to match, either partially or fully, the class
 108 used to start Java. If no options are given, it lists the running Java process
 109 identifiers that are not in separate docker processes along with the main class
 110 and command-line arguments that were used to launch the process (the same as
 111 using `-l`).
 112 
 113 `jcmd` *commands* may take options and arguments.  *Options* are specified using
 114 either *key* or *key*`=`*value* syntax.  *Arguments* are given as just a value,
 115 never name=value.
 116 
 117 
 118 The following commands are available:
 119 
 120 `help` \[*options*\] \[*arguments*\]
 121 :   For more information about a specific command.
 122 
 123     *arguments*:
 124 
 125     -   *command name*: The name of the command for which we want help (STRING,
 126         no default value)
 127 
 128     **Note:**
 129 
 130     The following *options* must be specified using either *key* or
 131     *key*`=`*value* syntax.
 132 
 133     *options*:
 134 
 135     -   `-all`: (Optional) Show help for all commands (BOOLEAN, false) .
 136 
 137 `Compiler.CodeHeap_Analytics`  \[*function*\] \[*granularity*\]
 138 :   Print CodeHeap analytics
 139 
 140     Impact: Low: Depends on code heap size and content. Holds CodeCache_lock during analysis step, usually sub-second duration.
 141 
 142     *arguments*:
 143 
 144     -   *function*: (Optional) Function to be performed (aggregate, UsedSpace, FreeSpace, MethodCount, MethodSpace, MethodAge, MethodNames, discard (STRING, all)
 145 
 146     -   *granularity*: (Optional) Detail level - smaller value -> more detail (INT, 4096)
 147 
 148 `Compiler.codecache`
 149 :   Prints code cache layout and bounds.
 150 
 151     Impact: Low
 152 
 153 `Compiler.codelist`
 154 :   Prints all compiled methods in code cache that are alive.
 155 
 156     Impact: Medium
 157 
 158 `Compiler.directives_add` *arguments*
 159 :   Adds compiler directives from a file.
 160 
 161     Impact: Low
 162 
 163     *arguments*:
 164 
 165     -   *filename*: The name of the directives file (STRING, no default value)
 166 
 167 `Compiler.directives_clear`
 168 :   Remove all compiler directives.
 169 
 170     Impact: Low
 171 
 172 `Compiler.directives_print`
 173 :   Prints all active compiler directives.
 174 
 175     Impact: Low
 176 
 177 `Compiler.directives_remove`
 178 :   Remove latest added compiler directive.
 179 
 180     Impact: Low
 181 
 182 `Compiler.memory` \[*options*\]
 183 :   Print compilation footprint
 184 
 185     Impact: Medium: Pause time depends on number of compiled methods
 186 
 187     **Note:**
 188 
 189     The *options* must be specified using either *key* or *key*`=`*value*
 190     syntax.
 191 
 192     *options*:
 193 
 194     -   `-H`: (Optional) Human readable format (BOOLEAN, false)
 195     -   `-s`: (Optional) Minimum memory size (MEMORY SIZE, 0)
 196 
 197 `Compiler.perfmap` \[*arguments*\] (Linux only)
 198 :   Write map file for Linux perf tool.
 199 
 200     Impact: Low
 201 
 202     *arguments*:
 203 
 204     -   *filename*: (Optional) The name of the map file.  If %p is specified in the filename, it is expanded to the JVM's PID. (FILE, "/tmp/perf-%p.map")
 205 
 206 `Compiler.queue`
 207 :   Prints methods queued for compilation.
 208 
 209     Impact: Low
 210 
 211 `GC.class_histogram` \[*options*\]
 212 :   Provides statistics about the Java heap usage.
 213 
 214     Impact: High --- depends on Java heap size and content.
 215 
 216     **Note:**
 217 
 218     The *options* must be specified using either *key* or *key*`=`*value*
 219     syntax.
 220 
 221     *options*:
 222 
 223     -   `-all`: (Optional) Inspects all objects, including unreachable objects
 224         (BOOLEAN, false)
 225     -  `-parallel`: (Optional) Number of parallel threads to use for heap inspection.
 226        0 (the default) means let the VM determine the number of threads to use.
 227        1 means use one thread (disable parallelism). For any other value the VM will
 228        try to use the specified number of threads, but might use fewer. (INT, 0)
 229 
 230 `GC.finalizer_info`
 231 :   Provides information about the Java finalization queue.
 232 
 233     Impact: Medium
 234 
 235 `GC.heap_dump` \[*options*\] *filename*
 236 :   Generates a HPROF format dump of the Java heap.
 237 
 238     Impact: High --- depends on the Java heap size and content. Request a full
 239     GC unless the `-all` option is specified.
 240 
 241     **Note:**
 242 
 243     The following *options* must be specified using either *key* or
 244     *key*`=`*value* syntax.
 245 
 246     *options*:
 247 
 248     -   `-all`: (Optional) Dump all objects, including unreachable objects
 249         (BOOLEAN, false)
 250     -   `-gz`: (Optional) If specified, the heap dump is written in gzipped format
 251          using the given compression level. 1 (recommended) is the fastest, 9 the
 252          strongest compression. (INT, 1)
 253     -   `-overwrite`: (Optional) If specified, the dump file will be overwritten if
 254          it exists (BOOLEAN, false)
 255     -   `-parallel`: (Optional) Number of parallel threads to use for heap dump. The VM will try to use the specified number of threads, but might use fewer. (INT, 1)
 256 
 257     *arguments*:
 258 
 259     -   *filename*: The name of the dump file.  If %p is specified in the filename, it is expanded to the JVM's PID. (FILE, no default value)
 260 
 261 `GC.heap_info`
 262 :   Provides generic Java heap information.
 263 
 264     Impact: Medium
 265 
 266 `GC.run`
 267 :   Calls `java.lang.System.gc()`.
 268 
 269     Impact: Medium --- depends on the Java heap size and content.
 270 
 271 `GC.run_finalization`
 272 :   Calls `java.lang.System.runFinalization()`.
 273 
 274     Impact: Medium --- depends on the Java content.
 275 
 276 `JFR.check` \[*options*\]
 277 :   Show information about a running flight recording
 278 
 279     Impact: Low
 280 
 281     **Note:**
 282 
 283     The *options* must be specified using either *key* or *key*`=`*value*
 284     syntax. If no parameters are entered, information for all active recordings is shown.
 285 
 286     *options*:
 287 
 288     -   `name`: (Optional) Name of the flight recording. (STRING, no default value)
 289 
 290     -   `verbose`: (Optional) Flag for printing the event settings for the recording
 291         (BOOLEAN, false)
 292 
 293 `JFR.configure` \[*options*\]
 294 :   Set the parameters for a flight recording
 295 
 296     Impact: Low
 297 
 298     **Note:**
 299 
 300     The *options* must be specified using either *key* or *key*`=`*value*
 301     syntax. If no parameters are entered, the current settings are displayed.
 302 
 303     *options*:
 304 
 305     -   `dumppath`: (Optional) Path to the location where a recording file is written
 306         in case the VM runs into a critical error, such as a system
 307         crash. (STRING, The default location is the current directory)
 308 
 309     -   `globalbuffercount`: (Optional) Number of global buffers. This option is
 310         a legacy option: change the `memorysize` parameter to alter the number of
 311         global buffers. This value cannot be changed once JFR has been initialized.
 312         (STRING, default determined by the value for `memorysize`)
 313 
 314     -   `globalbuffersize`: (Optional) Size of the global buffers, in bytes. This
 315         option is a legacy option: change the `memorysize` parameter to alter
 316         the size of the global buffers. This value cannot be changed once JFR
 317         has been initialized. (STRING, default determined by the value for `memorysize`)
 318 
 319     -   `maxchunksize`: (Optional) Maximum size of an individual data chunk in bytes
 320         if one of the following suffixes is not used: 'm' or 'M' for megabytes OR
 321         'g' or 'G' for gigabytes. This value cannot be changed once JFR has been
 322         initialized. (STRING, 12M)
 323 
 324     -   `memorysize`: (Optional) Overall memory size, in bytes if one of the following
 325         suffixes is not used: 'm' or 'M' for megabytes OR 'g' or 'G' for gigabytes.
 326         This value cannot be changed once JFR has been initialized. (STRING, 10M)
 327 
 328     -   `repositorypath`: (Optional) Path to the location where recordings are stored
 329         until they are written to a permanent file. (STRING, The default location is
 330         the temporary directory for the operating system. On Linux operating systems,
 331         the temporary directory is `/tmp`. On Windwows, the temporary directory is
 332         specified by the `TMP` environment variable.)
 333 
 334     -   `preserve-repository=`{`true`\|`false`} : Specifies whether files stored in
 335         the disk repository should be kept after the JVM has exited. If false, files
 336         are deleted. By default, this parameter is disabled.
 337 
 338     -   `stackdepth`: (Optional) Stack depth for stack traces. Setting this value
 339         greater than the default of 64 may cause a performance degradation.
 340         This value cannot be changed once JFR has been initialized.  (LONG, 64)
 341 
 342     -   `thread_buffer_size`: (Optional) Local buffer size for each thread in bytes if one
 343         of the following suffixes is not used: 'k' or 'K' for kilobytes or 'm' or 'M'
 344         for megabytes. Overriding this parameter could reduce performance and is
 345         not recommended. This value cannot be changed once JFR has been initialized.
 346         (STRING, 8k)
 347 
 348     -   `samplethreads`: (Optional) Flag for activating thread sampling. (BOOLEAN, true)
 349 
 350 `JFR.dump` \[*options*\]
 351 :   Write data to a file while a flight recording is running
 352 
 353     Impact: Low
 354 
 355     **Note:**
 356 
 357     The *options* must be specified using either *key* or *key*`=`*value* syntax.
 358     No options are required. The recording continues to run after the data is written.
 359 
 360     *options*:
 361 
 362     -   `begin`: (Optional) Specify the time from which recording data will be included
 363         in the dump file. The format is specified as local time. (STRING, no default value)
 364 
 365     -   `end`: (Optional) Specify the time to which recording data will be included in the
 366         dump file. The format is specified as local time. (STRING, no default value)
 367 
 368         **Note:** For both `begin` and `end`, the time must be in a format that can be read
 369         by java.time.LocalTime::parse(STRING), java.time.LocalDateTime::parse(STRING)
 370         or java.time.Instant::parse(STRING). For example, "13:20:15", "2020-03-17T09:00:00"
 371         or "2020-03-17T09:00:00Z".
 372 
 373         **Note:** `begin` and `end` times correspond to the timestamps found within the recorded
 374         information in the flight recording data.
 375 
 376         Another option is to use a time relative to the current time that is specified
 377         by a negative integer followed by "s", "m" or "h".  For example, "-12h", "-15m" or "-30s"
 378 
 379     -   `filename`: (Optional) Name of the file to which the flight recording data
 380         is dumped. If no filename is given, a filename is generated from the PID and
 381         the current date. The filename may also be a directory in which case, the filename
 382         is generated from the PID and the current date in the specified directory.
 383         If %p and/or %t is specified in the filename, it expands to the JVM's PID and
 384         the current timestamp, respectively.
 385         (FILE, no default value)
 386 
 387     -   `maxage`: (Optional) Length of time for dumping the flight recording data
 388         to a file. (INTEGER followed by 's' for seconds 'm' for minutes or 'h' for hours,
 389         no default value)
 390 
 391     -   `maxsize`: (Optional) Maximum size for the amount of data to dump from a flight
 392         recording in bytes if one of the following suffixes is not used: 'm' or 'M' for megabytes
 393         OR 'g' or 'G' for gigabytes. (STRING, no default value)
 394 
 395     -   `name`: (Optional) Name of the recording. If no name is given, data
 396         from all recordings is dumped. (STRING, no default value)
 397 
 398     -   `path-to-gc-roots`: (Optional) Flag for saving the path to garbage collection (GC)
 399         roots at the time the recording data is dumped. The path information is useful for
 400         finding memory leaks but collecting it can cause the application to pause for
 401         a short period of time. Turn on this flag only when you have an application
 402         that you suspect has a memory leak. (BOOLEAN, false)
 403 
 404 `JFR.start` \[*options*\]
 405 :   Start a flight recording
 406 
 407     Impact: Low
 408 
 409     **Note:**
 410 
 411     The *options* must be specified using either *key* or *key*`=`*value*
 412     syntax. If no parameters are entered, then a recording is started with default values.
 413 
 414     *options*:
 415 
 416     -   `delay`: (Optional) Length of time to wait before starting to record
 417         (INTEGER followed by 's' for seconds 'm' for minutes or 'h' for hours, 0s)
 418 
 419     -   `disk`: (Optional) Flag for also writing the data to disk while recording
 420         (BOOLEAN, true)
 421 
 422     -   `dumponexit`: (Optional) Flag for writing the recording to disk when the
 423         Java Virtual Machine (JVM) shuts down. If set to 'true' and no value is given
 424         for `filename`, the recording is written to a file in the directory where
 425         the process was started. The file name is a system-generated name that
 426         contains the process ID, the recording ID and the current time stamp.
 427         (For example: `id-1-2019_12_12_10_41.jfr`) (BOOLEAN, false)
 428 
 429     -   `duration`: (Optional) Length of time to record. Note that `0s` means forever
 430         (INTEGER followed by 's' for seconds 'm' for minutes or 'h' for hours, 0s)
 431 
 432     -   `filename`: (Optional) Name of the file to which the flight recording data
 433         is written when the recording is stopped. If no filename is given, a filename
 434         is generated from the PID and the current date and is placed in the directory
 435         where the process was started. The filename may also be a directory in which case,
 436         the filename is generated from the PID and the current date in the specified directory.
 437         If %p and/or %t is specified in the filename, it expands to the JVM's PID
 438         and the current timestamp, respectively.
 439         (FILE, no default value)
 440 
 441     -   `maxage`: (Optional) Maximum time to keep the recorded data on disk. This
 442         parameter is valid only when the `disk` parameter is set to `true`. Note
 443         `0s` means forever. (INTEGER followed by 's' for seconds 'm'
 444         for minutes or 'h' for hours, 0s)
 445 
 446     -   `maxsize`: (Optional) Maximum size of the data to keep on disk in bytes if one
 447         of the following suffixes is not used: 'm' or 'M' for megabytes OR 'g' or 'G' for gigabytes.
 448         This parameter is valid only when the `disk` parameter is set to 'true'. The value must
 449         not be less than the value for the `maxchunksize` parameter set with the `JFR.configure` command.
 450         (STRING, 0 (no maximum size))
 451 
 452     -   `name`: (Optional) Name of the recording. If no name is provided, a name is generated.
 453         Make note of the generated name that is shown in the response to the command so that
 454         you can use it with other commands. (STRING, system-generated default name)
 455 
 456     -   `path-to-gc-roots`: (Optional) Flag for saving the path to garbage collection (GC)
 457         roots at the end of a recording. The path information is useful for finding memory leaks
 458         but collecting it is time consuming. Turn on this flag only when you
 459         have an application that you suspect has a memory leak. If the `settings` parameter
 460         is set to 'profile', then the information collected includes the stack trace
 461         from where the potential leaking object was allocated. (BOOLEAN, false)
 462 
 463     -   `settings`: (Optional) Name of the settings file that identifies which events to record.
 464         To specify more than one file, separate the names with a comma (','). Include the path
 465         if the file is not in `JAVA-HOME`/lib/jfr. The following profiles are included with
 466         the JDK in the `JAVA-HOME`/lib/jfr directory: 'default.jfc': collects a predefined set
 467         of information with low overhead, so it has minimal impact on performance and can be
 468         used with recordings that run continuously; 'profile.jfc': Provides more data than the
 469         'default.jfc' profile, but with more overhead and impact on performance. Use this
 470         configuration for short periods of time when more information is needed. Use `none` to
 471         start a recording without a predefined configuration file.
 472         (STRING, `JAVA-HOME`/lib/jfr/default.jfc)
 473 
 474     Event settings and .jfc options can be specified using the following syntax:
 475 
 476     -   `option`: (Optional) Specifies the option value to modify. To list available
 477         options, use the `JAVA_HOME`/bin/jfr tool.
 478 
 479     -   `event-setting`: (Optional) Specifies the event setting value to modify. Use the form:
 480         `<event-name>#<setting-name>=<value>`
 481         To add a new event setting, prefix the event name with '+'.
 482 
 483     You can specify values for multiple event settings and .jfc options by
 484     separating them with a whitespace. In case of a conflict between a parameter
 485     and a .jfc option, the parameter will take precedence. The whitespace
 486     delimiter can be omitted for timespan values, i.e. 20ms. For more
 487     information about the settings syntax, see Javadoc of the jdk.jfr
 488     package.
 489 
 490 `JFR.stop` \[*options*\]
 491 :   Stop a flight recording
 492 
 493     Impact: Low
 494 
 495     **Note:**
 496 
 497     The *options* must be specified using either *key* or *key*`=`*value*
 498     syntax. If no parameters are entered, then no recording is stopped.
 499 
 500     *options*:
 501 
 502     -   `filename`: (Optional) Name of the file to which the recording is
 503         written when the recording is stopped. If %p and/or %t is specified
 504         in the filename, it expands to the JVM's PID and the current
 505         timestamp, respectively. If no path is provided, the data from the
 506         recording is discarded. (FILE, no default value)
 507 
 508     -   `name`: (Optional) Name of the recording (STRING, no default value)
 509 
 510 
 511 `JFR.view` \[*options*\]
 512 :   Display event data in predefined views.
 513 
 514     Impact: Medium
 515 
 516     **Note:**
 517 
 518     The *options* must be specified using either *key* or *key*`=`*value*
 519     syntax. If no parameters are entered, then a list of available views
 520     are displayed.
 521 
 522     *options*:
 523 
 524     -   `cell-height`: (Optional) Maximum number of rows in a table cell.
 525         (INT, default value depends on the view)
 526 
 527     -   `maxage`: (Optional) Length of time for the view to span.
 528         (INT followed by 's' for seconds 'm' for minutes or 'h' for hours,
 529         default value is 10m)
 530 
 531     -   `maxsize`: (Optional) Maximum size for the view to span in bytes if one
 532         of the following suffixes is not used: 'm' or 'M' for megabytes OR
 533         'g' or 'G' for gigabytes. (STRING, default value is 32MB)
 534 
 535     -   `truncate`: (Optional) Maximum number of rows in a table cell.
 536         (INT, default value depends on the view)
 537 
 538     -   `verbose`: (Optional) Displays the query that makes up the view.
 539         (BOOLEAN, default value is false)
 540 
 541     -   `width`: (Optional) The width of the view in characters. (INT,
 542         default value depends on the view)
 543 
 544     *arguments*:
 545 
 546     -   `view`: Name of the view or event type to display. Use `help JFR.view`
 547         to see a list of available views. (STRING, no default value)
 548 
 549     The view parameter can be an event type name. Use `JFR.view types` to see
 550     a list. To display all views, use `JFR.view all-views`. To display all
 551     events, use `JFR.view all-events`.
 552 
 553 `JVMTI.agent_load` \[*arguments*\]
 554 :   Loads JVMTI native agent.
 555 
 556     Impact: Low
 557 
 558     *arguments*:
 559 
 560     -   *library path*: Absolute path of the JVMTI agent to load. (STRING, no
 561         default value)
 562 
 563     -   *agent option*: (Optional) Option string to pass the agent. (STRING, no
 564         default value)
 565 
 566 `JVMTI.data_dump`
 567 :   Signal the JVM to do a data-dump request for JVMTI.
 568 
 569     Impact: High
 570 
 571 `ManagementAgent.start` \[*options*\]
 572 :   Starts remote management agent.
 573 
 574     Impact: Low --- no impact
 575 
 576     **Note:**
 577 
 578     The following *options* must be specified using either *key* or
 579     *key*`=`*value* syntax.
 580 
 581     *options*:
 582 
 583     -   `config.file`: (Optional) Sets `com.sun.management.config.file`
 584         (STRING, no default value)
 585 
 586     -   `jmxremote.host`: (Optional) Sets `com.sun.management.jmxremote.host`
 587         (STRING, no default value)
 588 
 589     -   `jmxremote.port`: (Optional) Sets `com.sun.management.jmxremote.port`
 590         (STRING, no default value)
 591 
 592     -   `jmxremote.rmi.port`: (Optional) Sets
 593         `com.sun.management.jmxremote.rmi.port` (STRING, no default value)
 594 
 595     -   `jmxremote.ssl`: (Optional) Sets `com.sun.management.jmxremote.ssl`
 596         (STRING, no default value)
 597 
 598     -   `jmxremote.registry.ssl`: (Optional) Sets
 599         `com.sun.management.jmxremote.registry.ssl` (STRING, no default value)
 600 
 601     -   `jmxremote.authenticate`: (Optional) Sets
 602         `com.sun.management.jmxremote.authenticate` (STRING, no default value)
 603 
 604     -   jmxremote.password.file: (Optional) Sets
 605         `com.sun.management.jmxremote.password.file` (STRING, no default value)
 606 
 607     -   `jmxremote.access.file`: (Optional) Sets
 608         `com.sun.management.jmxremote.acce ss.file` (STRING, no default value)
 609 
 610     -   `jmxremote.login.config`: (Optional) Sets
 611         `com.sun.management.jmxremote.log in.config` (STRING, no default value)
 612 
 613     -   `jmxremote.ssl.enabled.cipher.suites`: (Optional) Sets
 614         `com.sun.management`.
 615 
 616     -   `jmxremote.ssl.enabled.cipher.suite`: (STRING, no default value)
 617 
 618     -   `jmxremote.ssl.enabled.protocols`: (Optional) Sets
 619         `com.sun.management.jmxr emote.ssl.enabled.protocols` (STRING, no
 620         default value)
 621 
 622     -   `jmxremote.ssl.need.client.auth`: (Optional) Sets
 623         `com.sun.management.jmxre mote.need.client.auth` (STRING, no default
 624         value)
 625 
 626     -   `jmxremote.ssl.config.file`: (Optional) Sets
 627         `com.sun.management.jmxremote. ssl_config_file` (STRING, no default
 628         value)
 629 
 630     -   `jmxremote.autodiscovery`: (Optional) Sets
 631         `com.sun.management.jmxremote.au todiscovery` (STRING, no default
 632         value)
 633 
 634     -   `jdp.port`: (Optional) Sets `com.sun.management.jdp.port` (INT, no
 635         default value)
 636 
 637     -   `jdp.address`: (Optional) Sets `com.sun.management.jdp.address`
 638         (STRING, no default value)
 639 
 640     -   `jdp.source_addr`: (Optional) Sets `com.sun.management.jdp.source_addr`
 641         (STRING, no default value)
 642 
 643     -   `jdp.ttl`: (Optional) Sets `com.sun.management.jdp.ttl` (INT, no
 644         default value)
 645 
 646     -   `jdp.pause`: (Optional) Sets `com.sun.management.jdp.pause` (INT, no
 647         default value)
 648 
 649     -   `jdp.name`: (Optional) Sets `com.sun.management.jdp.name` (STRING, no
 650         default value)
 651 
 652 `ManagementAgent.start_local`
 653 :   Starts the local management agent.
 654 
 655     Impact: Low --- no impact
 656 
 657 `ManagementAgent.status`
 658 :   Print the management agent status.
 659 
 660     Impact: Low --- no impact
 661 
 662 `ManagementAgent.stop`
 663 :   Stops the remote management agent.
 664 
 665     Impact: Low --- no impact
 666 
 667 `System.dump_map` \[*options*\] (Linux only)
 668 :   Dumps an annotated process memory map to an output file.
 669 
 670     Impact: Low
 671 
 672     **Note:**
 673 
 674     The following *options* must be specified using either *key* or
 675     *key*`=`*value* syntax.
 676 
 677     *options*:
 678 
 679     -    `-H`: (Optional) Human readable format (BOOLEAN, false)
 680     -    `-F`: (Optional) File path.  If %p is specified in the filename, it is expanded to the JVM's PID.  (FILE, "vm_memory_map_%p.txt")
 681 
 682 `System.map` \[*options*\] (Linux only)
 683 :   Prints an annotated process memory map of the VM process.
 684 
 685     Impact: Low
 686 
 687     **Note:**
 688 
 689     The following *options* must be specified using either *key* or
 690     *key*`=`*value* syntax.
 691 
 692     *options*:
 693 
 694     -    `-H`: (Optional) Human readable format (BOOLEAN, false)
 695 
 696 `System.native_heap_info` (Linux only)
 697 :   Attempts to output information regarding native heap usage through malloc_info(3). If unsuccessful outputs "Error: " and a reason.
 698 
 699     Impact: Low
 700 
 701 `System.trim_native_heap` (Linux only)
 702 :   Attempts to free up memory by trimming the C-heap.
 703 
 704     Impact: Low
 705 
 706 `Thread.dump_to_file` \[*options*\] *filepath*
 707 :   Dump threads, with stack traces, to a file in plain text or JSON format.
 708 
 709     Impact: Medium: Depends on the number of threads.
 710 
 711     **Note:**
 712 
 713     The following *options* must be specified using either *key* or
 714     *key*`=`*value* syntax.
 715 
 716     *options*:
 717 
 718     -   `-overwrite`: (Optional) May overwrite existing file (BOOLEAN, false)
 719     -   `-format`: (Optional) Output format ("plain" or "json") (STRING, plain)
 720 
 721     *arguments*:
 722 
 723     -   *filepath*:  The file path to the output file.  If %p is specified in the filename, it is expanded to the JVM's PID.  (FILE, no default value)
 724 
 725 `Thread.print` \[*options*\]
 726 :   Prints all threads with stacktraces.
 727 
 728     Impact: Medium --- depends on the number of threads.
 729 
 730     **Note:**
 731 
 732     The following *options* must be specified using either *key* or
 733     *key*`=`*value* syntax.
 734 
 735     *options*:
 736 
 737     -   `-e`: (Optional) Print extended thread information (BOOLEAN, false)
 738     -   `-l`: (Optional) Prints `java.util.concurrent` locks (BOOLEAN, false)
 739 
 740 `Thread.vthread_summary`
 741 :   Print the virtual thread scheduler, timeout schedulers, I/O pollers, and thread groupings.
 742 
 743     Impact: Low
 744 
 745 `VM.cds` \[*arguments*\]
 746 :   Dump a static or dynamic shared archive that includes all currently loaded classes.
 747 
 748     Impact: Medium --- pause time depends on number of loaded classes
 749 
 750     *arguments*:
 751 
 752     -   *subcmd*:  must be either `static_dump` or `dynamic_dump` (STRING, no default value)
 753     -   *filename*: (Optional) Name of the shared archive to be dumped.  If %p is specified in the filename, it is expanded to the JVM's PID.  (FILE, "java_pid%p_\<subcmd\>.jsa")
 754 
 755     If `dynamic_dump` is specified, the target JVM must be started with the JVM option
 756     `-XX:+RecordDynamicDumpInfo`.
 757 
 758 `VM.class_hierarchy` \[*options*\] \[*arguments*\]
 759 :   Print a list of all loaded classes, indented to show the class hierarchy.
 760     The name of each class is followed by the ClassLoaderData\* of its
 761     ClassLoader, or "null" if it is loaded by the bootstrap class loader.
 762 
 763     Impact: Medium --- depends on the number of loaded classes.
 764 
 765     **Note:**
 766 
 767     The following *options* must be specified using either *key* or
 768     *key*`=`*value* syntax.
 769 
 770     *options*:
 771 
 772     -   `-i`: (Optional) Inherited interfaces should be printed. (BOOLEAN,
 773         false)
 774 
 775     -   `-s`: (Optional) If a classname is specified, print its subclasses
 776          in addition to its superclasses. Without this option only the
 777          superclasses will be printed. (BOOLEAN, false)
 778 
 779     *arguments*:
 780 
 781     -   *classname*: (Optional) The name of the class whose hierarchy should be
 782         printed. If not specified, all class hierarchies are printed. (STRING,
 783         no default value)
 784 
 785 `VM.classes` \[*options*\]
 786 :   Print all loaded classes
 787 
 788     Impact: Medium: Depends on number of loaded classes.
 789 
 790     The following *options* must be specified using either *key* or
 791     *key*`=`*value* syntax.
 792 
 793     *options*:
 794 
 795     -   `-verbose`: (Optional) Dump the detailed content of a Java class.
 796         Some classes are annotated with flags: `F` = has, or inherits, a non-empty finalize method,
 797         `f` = has final method, `W` = methods rewritten, `C` = marked with `@Contended` annotation,
 798         `R` = has been redefined, `S` = is shared class (BOOLEAN, false)
 799 
 800 `VM.classloader_stats`
 801 :   Print statistics about all ClassLoaders.
 802 
 803     Impact: Low
 804 
 805 `VM.classloaders` \[*options*\]
 806 :   Prints classloader hierarchy.
 807 
 808     Impact: Medium --- Depends on number of class loaders and classes loaded.
 809 
 810     The following *options* must be specified using either *key* or
 811     *key*`=`*value* syntax.
 812 
 813     *options*:
 814 
 815     -   `show-classes`: (Optional) Print loaded classes. (BOOLEAN, false)
 816     -   `verbose`: (Optional) Print detailed information. (BOOLEAN, false)
 817     -   `fold`: (Optional) Show loaders of the same name and class as one. (BOOLEAN, true)
 818 
 819 `VM.command_line`
 820 :   Print the command line used to start this VM instance.
 821 
 822     Impact: Low
 823 
 824 `VM.dynlibs`
 825 :   Print loaded dynamic libraries.
 826 
 827     Impact: Low
 828 
 829 `VM.events` \[*options*\]
 830 :   Print VM event logs
 831 
 832     Impact: Low --- Depends on event log size.
 833 
 834     *options*:
 835 
 836     **Note:**
 837 
 838     The following *options* must be specified using either *key* or
 839     *key*`=`*value* syntax.
 840 
 841     -   `log`: (Optional) Name of log to be printed.
 842         If omitted, all logs are printed. (STRING, no default value)
 843     -   `max`: (Optional) Maximum number of events to be printed (newest first).
 844         If omitted, all events are printed. (STRING, no default value)
 845 
 846 `VM.flags` \[*options*\]
 847 :   Print the VM flag options and their current values.
 848 
 849     Impact: Low
 850 
 851     **Note:**
 852 
 853     The following *options* must be specified using either *key* or
 854     *key*`=`*value* syntax.
 855 
 856     *options*:
 857 
 858     -   `-all`: (Optional) Prints all flags supported by the VM (BOOLEAN,
 859         false).
 860 
 861 `VM.info`
 862 :   Print information about the JVM environment and status.
 863 
 864     Impact: Low
 865 
 866 `VM.log` \[*options*\]
 867 :   Lists current log configuration, enables/disables/configures a log output,
 868     or rotates all logs.
 869 
 870     Impact: Low
 871 
 872     *options*:
 873 
 874     **Note:**
 875 
 876     The following *options* must be specified using either *key* or
 877     *key*`=`*value* syntax.
 878 
 879     -   `output`: (Optional) The name or index (\#) of output to configure.
 880         (STRING, no default value)
 881 
 882     -   `output_options`: (Optional) Options for the output. (STRING, no
 883         default value)
 884 
 885     -   `what`: (Optional) Configures what tags to log. (STRING, no default
 886         value )
 887 
 888     -   `decorators`: (Optional) Configures which decorators to use. Use 'none'
 889         or an empty value to remove all. (STRING, no default value)
 890 
 891     -   `disable`: (Optional) Turns off all logging and clears the log
 892         configuration. (BOOLEAN, no default value)
 893 
 894     -   `list`: (Optional) Lists current log configuration. (BOOLEAN, no
 895         default value)
 896 
 897     -   `rotate`: (Optional) Rotates all logs. (BOOLEAN, no default value)
 898 
 899 `VM.metaspace`  \[*options*\]
 900 :   Prints the statistics for the metaspace
 901 
 902     Impact: Medium --- Depends on number of classes loaded.
 903 
 904     **Note:**
 905 
 906     The following *options* must be specified using either *key* or
 907     *key*`=`*value* syntax.
 908 
 909     *options*:
 910 
 911     -   `basic`: (Optional) Prints a basic summary (does not need a safepoint). (BOOLEAN, false)
 912     -   `show-loaders`: (Optional) Shows usage by class loader. (BOOLEAN, false)
 913     -   `show-classes`: (Optional) If show-loaders is set, shows loaded classes for each loader. (BOOLEAN, false)
 914     -   `by-chunktype`: (Optional) Break down numbers by chunk type. (BOOLEAN, false)
 915     -   `by-spacetype`: (Optional) Break down numbers by loader type. (BOOLEAN, false)
 916     -   `vslist`: (Optional) Shows details about the underlying virtual space. (BOOLEAN, false)
 917     -   `chunkfreelist`: (Optional) Shows details about global chunk free lists (ChunkManager). (BOOLEAN, false)
 918     -   `scale`: (Optional) Memory usage in which to scale. Valid values are: 1, KB, MB
 919         or GB (fixed scale) or "dynamic" for a dynamically chosen scale. (STRING, dynamic)
 920 
 921 `VM.native_memory` \[*options*\]
 922 :   Print native memory usage
 923 
 924     Impact: Medium
 925 
 926     **Note:**
 927 
 928     The following *options* must be specified using either *key* or
 929     *key*`=`*value* syntax.
 930 
 931     *options*:
 932 
 933     -   `summary`: (Optional) Requests runtime to report current memory
 934         summary, which includes total reserved and committed memory, along with
 935         memory usage summary by each subsystem. (BOOLEAN, false)
 936 
 937     -   `detail`: (Optional) Requests runtime to report memory allocation &gt;=
 938         1K by each callsite. (BOOLEAN, false)
 939 
 940     -   `baseline`: (Optional) Requests runtime to baseline current memory
 941         usage, so it can be compared against in later time. (BOOLEAN, false)
 942 
 943     -   `summary.diff`: (Optional) Requests runtime to report memory summary
 944         comparison against previous baseline. (BOOLEAN, false)
 945 
 946     -   `detail.diff`: (Optional) Requests runtime to report memory detail
 947         comparison against previous baseline, which shows the memory allocation
 948         activities at different callsites. (BOOLEAN, false)
 949 
 950     -   `statistics`: (Optional) Prints tracker statistics for tuning purpose.
 951         (BOOLEAN, false)
 952 
 953     -   `scale`: (Optional) Memory usage in which scale, KB, MB or GB (STRING,
 954         KB)
 955 
 956 `VM.set_flag` \[*arguments*\]
 957 :   Sets VM flag option using the provided value.
 958 
 959     Impact: Low
 960 
 961     *arguments*:
 962 
 963     -   *flag name*: The name of the flag that you want to set (STRING, no
 964         default value)
 965 
 966     -   *string value*: (Optional) The value that you want to set (STRING, no
 967         default value)
 968 
 969 `VM.stringtable` \[*options*\]
 970 :   Dump string table.
 971 
 972     Impact: Medium --- depends on the Java content.
 973 
 974     **Note:**
 975 
 976     The following *options* must be specified using either *key* or
 977     *key*`=`*value* syntax.
 978 
 979     *options*:
 980 
 981     -   `-verbose`: (Optional) Dumps the content of each string in the table
 982         (BOOLEAN, false)
 983 
 984 `VM.symboltable` \[*options*\]
 985 :   Dump symbol table.
 986 
 987     Impact: Medium --- depends on the Java content.
 988 
 989     **Note:**
 990 
 991     The following *options* must be specified using either *key* or
 992     *key*`=`*value* syntax).
 993 
 994     *options*:
 995 
 996     -   `-verbose`: (Optional) Dumps the content of each symbol in the table
 997         (BOOLEAN, false)
 998 
 999 `VM.system_properties`
1000 :   Print system properties.
1001 
1002     Impact: Low
1003 
1004 `VM.systemdictionary`
1005 :   Prints the statistics for dictionary hashtable sizes and bucket length.
1006 
1007     Impact: Medium
1008 
1009     **Note:**
1010 
1011     The following *options* must be specified using either *key* or
1012     *key*`=`*value* syntax.
1013 
1014     *options*:
1015 
1016     -   `verbose`: (Optional) Dump the content of each dictionary entry for all
1017         class loaders (BOOLEAN, false) .
1018 
1019 `VM.uptime` \[*options*\]
1020 :   Print VM uptime.
1021 
1022     Impact: Low
1023 
1024     **Note:**
1025 
1026     The following *options* must be specified using either *key* or
1027     *key*`=`*value* syntax.
1028 
1029     *options*:
1030 
1031     -   `-date`: (Optional) Adds a prefix with the current date (BOOLEAN,
1032         false)
1033 
1034 `VM.version`
1035 :   Print JVM version information.
1036 
1037     Impact: Low