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 `VM.cds` \[*arguments*\]
 741 :   Dump a static or dynamic shared archive that includes all currently loaded classes.
 742 
 743     Impact: Medium --- pause time depends on number of loaded classes
 744 
 745     *arguments*:
 746 
 747     -   *subcmd*:  must be either `static_dump` or `dynamic_dump` (STRING, no default value)
 748     -   *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")
 749 
 750     If `dynamic_dump` is specified, the target JVM must be started with the JVM option
 751     `-XX:+RecordDynamicDumpInfo`.
 752 
 753 `VM.class_hierarchy` \[*options*\] \[*arguments*\]
 754 :   Print a list of all loaded classes, indented to show the class hierarchy.
 755     The name of each class is followed by the ClassLoaderData\* of its
 756     ClassLoader, or "null" if it is loaded by the bootstrap class loader.
 757 
 758     Impact: Medium --- depends on the number of loaded classes.
 759 
 760     **Note:**
 761 
 762     The following *options* must be specified using either *key* or
 763     *key*`=`*value* syntax.
 764 
 765     *options*:
 766 
 767     -   `-i`: (Optional) Inherited interfaces should be printed. (BOOLEAN,
 768         false)
 769 
 770     -   `-s`: (Optional) If a classname is specified, print its subclasses
 771          in addition to its superclasses. Without this option only the
 772          superclasses will be printed. (BOOLEAN, false)
 773 
 774     *arguments*:
 775 
 776     -   *classname*: (Optional) The name of the class whose hierarchy should be
 777         printed. If not specified, all class hierarchies are printed. (STRING,
 778         no default value)
 779 
 780 `VM.classes` \[*options*\]
 781 :   Print all loaded classes
 782 
 783     Impact: Medium: Depends on number of loaded classes.
 784 
 785     The following *options* must be specified using either *key* or
 786     *key*`=`*value* syntax.
 787 
 788     *options*:
 789 
 790     -   `-verbose`: (Optional) Dump the detailed content of a Java class.
 791         Some classes are annotated with flags: `F` = has, or inherits, a non-empty finalize method,
 792         `f` = has final method, `W` = methods rewritten, `C` = marked with `@Contended` annotation,
 793         `R` = has been redefined, `S` = is shared class (BOOLEAN, false)
 794 
 795 `VM.classloader_stats`
 796 :   Print statistics about all ClassLoaders.
 797 
 798     Impact: Low
 799 
 800 `VM.classloaders` \[*options*\]
 801 :   Prints classloader hierarchy.
 802 
 803     Impact: Medium --- Depends on number of class loaders and classes loaded.
 804 
 805     The following *options* must be specified using either *key* or
 806     *key*`=`*value* syntax.
 807 
 808     *options*:
 809 
 810     -   `show-classes`: (Optional) Print loaded classes. (BOOLEAN, false)
 811     -   `verbose`: (Optional) Print detailed information. (BOOLEAN, false)
 812     -   `fold`: (Optional) Show loaders of the same name and class as one. (BOOLEAN, true)
 813 
 814 `VM.command_line`
 815 :   Print the command line used to start this VM instance.
 816 
 817     Impact: Low
 818 
 819 `VM.dynlibs`
 820 :   Print loaded dynamic libraries.
 821 
 822     Impact: Low
 823 
 824 `VM.events` \[*options*\]
 825 :   Print VM event logs
 826 
 827     Impact: Low --- Depends on event log size.
 828 
 829     *options*:
 830 
 831     **Note:**
 832 
 833     The following *options* must be specified using either *key* or
 834     *key*`=`*value* syntax.
 835 
 836     -   `log`: (Optional) Name of log to be printed.
 837         If omitted, all logs are printed. (STRING, no default value)
 838     -   `max`: (Optional) Maximum number of events to be printed (newest first).
 839         If omitted, all events are printed. (STRING, no default value)
 840 
 841 `VM.flags` \[*options*\]
 842 :   Print the VM flag options and their current values.
 843 
 844     Impact: Low
 845 
 846     **Note:**
 847 
 848     The following *options* must be specified using either *key* or
 849     *key*`=`*value* syntax.
 850 
 851     *options*:
 852 
 853     -   `-all`: (Optional) Prints all flags supported by the VM (BOOLEAN,
 854         false).
 855 
 856 `VM.info`
 857 :   Print information about the JVM environment and status.
 858 
 859     Impact: Low
 860 
 861 `VM.log` \[*options*\]
 862 :   Lists current log configuration, enables/disables/configures a log output,
 863     or rotates all logs.
 864 
 865     Impact: Low
 866 
 867     *options*:
 868 
 869     **Note:**
 870 
 871     The following *options* must be specified using either *key* or
 872     *key*`=`*value* syntax.
 873 
 874     -   `output`: (Optional) The name or index (\#) of output to configure.
 875         (STRING, no default value)
 876 
 877     -   `output_options`: (Optional) Options for the output. (STRING, no
 878         default value)
 879 
 880     -   `what`: (Optional) Configures what tags to log. (STRING, no default
 881         value )
 882 
 883     -   `decorators`: (Optional) Configures which decorators to use. Use 'none'
 884         or an empty value to remove all. (STRING, no default value)
 885 
 886     -   `disable`: (Optional) Turns off all logging and clears the log
 887         configuration. (BOOLEAN, no default value)
 888 
 889     -   `list`: (Optional) Lists current log configuration. (BOOLEAN, no
 890         default value)
 891 
 892     -   `rotate`: (Optional) Rotates all logs. (BOOLEAN, no default value)
 893 
 894 `VM.metaspace`  \[*options*\]
 895 :   Prints the statistics for the metaspace
 896 
 897     Impact: Medium --- Depends on number of classes loaded.
 898 
 899     **Note:**
 900 
 901     The following *options* must be specified using either *key* or
 902     *key*`=`*value* syntax.
 903 
 904     *options*:
 905 
 906     -   `basic`: (Optional) Prints a basic summary (does not need a safepoint). (BOOLEAN, false)
 907     -   `show-loaders`: (Optional) Shows usage by class loader. (BOOLEAN, false)
 908     -   `show-classes`: (Optional) If show-loaders is set, shows loaded classes for each loader. (BOOLEAN, false)
 909     -   `by-chunktype`: (Optional) Break down numbers by chunk type. (BOOLEAN, false)
 910     -   `by-spacetype`: (Optional) Break down numbers by loader type. (BOOLEAN, false)
 911     -   `vslist`: (Optional) Shows details about the underlying virtual space. (BOOLEAN, false)
 912     -   `chunkfreelist`: (Optional) Shows details about global chunk free lists (ChunkManager). (BOOLEAN, false)
 913     -   `scale`: (Optional) Memory usage in which to scale. Valid values are: 1, KB, MB
 914         or GB (fixed scale) or "dynamic" for a dynamically chosen scale. (STRING, dynamic)
 915 
 916 `VM.native_memory` \[*options*\]
 917 :   Print native memory usage
 918 
 919     Impact: Medium
 920 
 921     **Note:**
 922 
 923     The following *options* must be specified using either *key* or
 924     *key*`=`*value* syntax.
 925 
 926     *options*:
 927 
 928     -   `summary`: (Optional) Requests runtime to report current memory
 929         summary, which includes total reserved and committed memory, along with
 930         memory usage summary by each subsystem. (BOOLEAN, false)
 931 
 932     -   `detail`: (Optional) Requests runtime to report memory allocation &gt;=
 933         1K by each callsite. (BOOLEAN, false)
 934 
 935     -   `baseline`: (Optional) Requests runtime to baseline current memory
 936         usage, so it can be compared against in later time. (BOOLEAN, false)
 937 
 938     -   `summary.diff`: (Optional) Requests runtime to report memory summary
 939         comparison against previous baseline. (BOOLEAN, false)
 940 
 941     -   `detail.diff`: (Optional) Requests runtime to report memory detail
 942         comparison against previous baseline, which shows the memory allocation
 943         activities at different callsites. (BOOLEAN, false)
 944 
 945     -   `statistics`: (Optional) Prints tracker statistics for tuning purpose.
 946         (BOOLEAN, false)
 947 
 948     -   `scale`: (Optional) Memory usage in which scale, KB, MB or GB (STRING,
 949         KB)
 950 
 951 `VM.set_flag` \[*arguments*\]
 952 :   Sets VM flag option using the provided value.
 953 
 954     Impact: Low
 955 
 956     *arguments*:
 957 
 958     -   *flag name*: The name of the flag that you want to set (STRING, no
 959         default value)
 960 
 961     -   *string value*: (Optional) The value that you want to set (STRING, no
 962         default value)
 963 
 964 `VM.stringtable` \[*options*\]
 965 :   Dump string table.
 966 
 967     Impact: Medium --- depends on the Java content.
 968 
 969     **Note:**
 970 
 971     The following *options* must be specified using either *key* or
 972     *key*`=`*value* syntax.
 973 
 974     *options*:
 975 
 976     -   `-verbose`: (Optional) Dumps the content of each string in the table
 977         (BOOLEAN, false)
 978 
 979 `VM.symboltable` \[*options*\]
 980 :   Dump symbol table.
 981 
 982     Impact: Medium --- depends on the Java content.
 983 
 984     **Note:**
 985 
 986     The following *options* must be specified using either *key* or
 987     *key*`=`*value* syntax).
 988 
 989     *options*:
 990 
 991     -   `-verbose`: (Optional) Dumps the content of each symbol in the table
 992         (BOOLEAN, false)
 993 
 994 `VM.system_properties`
 995 :   Print system properties.
 996 
 997     Impact: Low
 998 
 999 `VM.systemdictionary`
1000 :   Prints the statistics for dictionary hashtable sizes and bucket length.
1001 
1002     Impact: Medium
1003 
1004     **Note:**
1005 
1006     The following *options* must be specified using either *key* or
1007     *key*`=`*value* syntax.
1008 
1009     *options*:
1010 
1011     -   `verbose`: (Optional) Dump the content of each dictionary entry for all
1012         class loaders (BOOLEAN, false) .
1013 
1014 `VM.uptime` \[*options*\]
1015 :   Print VM uptime.
1016 
1017     Impact: Low
1018 
1019     **Note:**
1020 
1021     The following *options* must be specified using either *key* or
1022     *key*`=`*value* syntax.
1023 
1024     *options*:
1025 
1026     -   `-date`: (Optional) Adds a prefix with the current date (BOOLEAN,
1027         false)
1028 
1029 `VM.version`
1030 :   Print JVM version information.
1031 
1032     Impact: Low