1JCMD(1)                          JDK Commands                          JCMD(1)
2
3
4

NAME

6       jcmd  -  send diagnostic command requests to a running Java Virtual Ma‐
7       chine (JVM)
8

SYNOPSIS

10       jcmd [pid | main-class] command...  | PerfCounter.print | -f filename
11
12       jcmd [-l]
13
14       jcmd -h
15
16       pid    When used, the jcmd utility sends the diagnostic command request
17              to the process ID for the Java process.
18
19       main-class
20              When used, the jcmd utility sends the diagnostic command request
21              to all Java processes with the specified name of the main class.
22
23       command
24              The command must be a valid jcmd command for the  selected  JVM.
25              The  list  of available commands for jcmd is obtained by running
26              the help command (jcmd pid help) where pid is the process ID for
27              the  running  Java  process.   If the pid is 0, commands will be
28              sent to all Java processes.  The main  class  argument  will  be
29              used  to  match,  either  partially  or fully, the class used to
30              start Java.  If no options are given, it lists the running  Java
31              process  identifiers  with the main class and command-line argu‐
32              ments that were used to launch the process (the  same  as  using
33              -l).
34
35       Perfcounter.print
36              Prints  the  performance  counters exposed by the specified Java
37              process.
38
39       -f filename
40              Reads and executes commands from a specified file, filename.
41
42       -l     Displays the list of Java Virtual  Machine  process  identifiers
43              that are not running in a separate docker process along with the
44              main class and command-line arguments that were used  to  launch
45              the  process.   If  the JVM is in a docker process, you must use
46              tools such as ps to look up the PID.
47
48              Note:
49
50              Using jcmd without arguments is the same as using jcmd -l.
51
52       -h     Displays the jcmd utility's command-line help.
53

DESCRIPTION

55       The jcmd utility is used to send diagnostic  command  requests  to  the
56       JVM.   It must be used on the same machine on which the JVM is running,
57       and have the same effective user and group identifiers that  were  used
58       to  launch  the  JVM.  Each diagnostic command has its own set of argu‐
59       ments.  To display the description, syntax, and a list of available ar‐
60       guments  for  a  diagnostic command, use the name of the command as the
61       argument.  For example:
62
63              jcmd pid help command
64
65       If arguments contain spaces, then you must surround them with single or
66       double  quotation  marks (' or ").  In addition, you must escape single
67       or double quotation marks with a backslash (\) to prevent the operating
68       system  shell  from processing quotation marks.  Alternatively, you can
69       surround these arguments with single quotation marks and then with dou‐
70       ble  quotation marks (or with double quotation marks and then with sin‐
71       gle quotation marks).
72
73       If you specify the process identifier (pid) or the  main  class  (main-
74       class)  as the first argument, then the jcmd utility sends the diagnos‐
75       tic command request to the Java process with the  specified  identifier
76       or  to  all  Java  processes with the specified name of the main class.
77       You can also send the diagnostic command request to all available  Java
78       processes by specifying 0 as the process identifier.
79

COMMANDS FOR JCMD

81       The  command  must  be a valid jcmd diagnostic command for the selected
82       JVM.  The list of available commands for jcmd is  obtained  by  running
83       the help command (jcmd pid help) where pid is the process ID for a run‐
84       ning Java process.  If the pid is 0, commands will be sent to all  Java
85       processes.   The main class argument will be used to match, either par‐
86       tially or fully, the class used to start Java.  If no options are  giv‐
87       en, it lists the running Java process identifiers that are not in sepa‐
88       rate docker processes along with the main class and command-line  argu‐
89       ments that were used to launch the process (the same as using -l).
90
91       The following commands are available:
92
93       help [options] [arguments]
94              For more information about a specific command.
95
96              arguments:
97
98command  name:  The name of the command for which we want help
99                (STRING, no default value)
100
101              Note:
102
103              The following options must be  specified  using  either  key  or
104              key=value syntax.
105
106              options:
107
108-all: (Optional) Show help for all commands (BOOLEAN, false) .
109
110       Compiler.codecache
111              Prints code cache layout and bounds.
112
113              Impact: Low
114
115       Compiler.codelist
116              Prints all compiled methods in code cache that are alive.
117
118              Impact: Medium
119
120       Compiler.perfmap (Linux only)
121              Write map file for Linux perf tool.
122
123              Impact: Low
124
125       Compiler.queue
126              Prints methods queued for compilation.
127
128              Impact: Low
129
130       Compiler.directives_add *filename* *arguments*
131              Adds compiler directives from a file.
132
133              Impact: Low
134
135              arguments:
136
137              filename:  The  name  of the directives file (STRING, no default
138              value)
139
140       Compiler.directives_clear
141              Remove all compiler directives.
142
143              Impact: Low
144
145       Compiler.directives_print
146              Prints all active compiler directives.
147
148              Impact: Low
149
150       Compiler.directives_remove
151              Remove latest added compiler directive.
152
153              Impact: Low
154
155       GC.class_histogram [options]
156              Provides statistics about the Java heap usage.
157
158              Impact: High --- depends on Java heap size and content.
159
160              Note:
161
162              The options must be specified using either key or key=value syn‐
163              tax.
164
165              options:
166
167-all:  (Optional)  Inspects all objects, including unreachable
168                objects (BOOLEAN, false)
169
170-parallel: (Optional) Number of parallel threads  to  use  for
171                heap  inspection.   0 (the default) means let the VM determine
172                the number of threads to use.  1 means use one thread (disable
173                parallelism).   For any other value the VM will try to use the
174                specified number of threads, but might use fewer.  (INT, 0)
175
176       GC.finalizer_info
177              Provides information about the Java finalization queue.
178
179              Impact: Medium
180
181       GC.heap_dump [options] [arguments]
182              Generates a HPROF format dump of the Java heap.
183
184              Impact: High --- depends on the Java heap size and content.  Re‐
185              quest a full GC unless the -all option is specified.
186
187              Note:
188
189              The  following  options  must  be  specified using either key or
190              key=value syntax.
191
192              options:
193
194-all: (Optional) Dump all objects, including  unreachable  ob‐
195                jects (BOOLEAN, false)
196
197-gz:  (Optional)  If  specified,  the  heap dump is written in
198                gzipped format using the given compression level.   1  (recom‐
199                mended) is the fastest, 9 the strongest compression.  (INT, 1)
200
201-overwrite:  (Optional)  If  specified,  the dump file will be
202                overwritten if it exists (BOOLEAN, false)
203
204              arguments:
205
206filename: The name of the dump file (STRING, no default value)
207
208       GC.heap_info
209              Provides generic Java heap information.
210
211              Impact: Medium
212
213       GC.run Calls java.lang.System.gc().
214
215              Impact: Medium --- depends on the Java heap size and content.
216
217       GC.run_finalization
218              Calls java.lang.System.runFinalization().
219
220              Impact: Medium --- depends on the Java content.
221
222       JFR.check [options]
223              Show information about a running flight recording
224
225              Impact: Low
226
227              Note:
228
229              The options must be specified using either key or key=value syn‐
230              tax.   If  no parameters are entered, information for all active
231              recordings is shown.
232
233              options:
234
235name: (Optional) Name of the flight  recording.   (STRING,  no
236                default value)
237
238verbose:  (Optional)  Flag for printing the event settings for
239                the recording (BOOLEAN, false)
240
241       JFR.configure [options]
242              Set the parameters for a flight recording
243
244              Impact: Low
245
246              Note:
247
248              The options must be specified using either key or key=value syn‐
249              tax.   If  no  parameters  are entered, the current settings are
250              displayed.
251
252              options:
253
254globalbuffercount: (Optional) Number of global buffers.   This
255                option  is a legacy option: change the memorysize parameter to
256                alter the number of global  buffers.   This  value  cannot  be
257                changed  once  JFR has been initialized.  (STRING, default de‐
258                termined by the value for memorysize)
259
260globalbuffersize: (Optional) Size of the  global  buffers,  in
261                bytes.   This option is a legacy option: change the memorysize
262                parameter to alter the size of the global buffers.  This value
263                cannot be changed once JFR has been initialized.  (STRING, de‐
264                fault determined by the value for memorysize)
265
266maxchunksize: (Optional) Maximum size of  an  individual  data
267                chunk  in  bytes if one of the following suffixes is not used:
268                'm' or 'M' for megabytes OR 'g' or 'G'  for  gigabytes.   This
269                value  cannot  be  changed  once  JFR  has  been  initialized.
270                (STRING, 12M)
271
272memorysize: (Optional) Overall memory size, in bytes if one of
273                the  following  suffixes is not used: 'm' or 'M' for megabytes
274                OR 'g' or 'G' for gigabytes.  This  value  cannot  be  changed
275                once JFR has been initialized.  (STRING, 10M)
276
277repositorypath:  (Optional) Path to the location where record‐
278                ings are stored until they are written to  a  permanent  file.
279                (STRING,  The  default location is the temporary directory for
280                the operating system.  On Linux operating systems, the  tempo‐
281                rary  directory is /tmp.  On Windwows, the temporary directory
282                is specified by the TMP environment variable.)
283
284preserve-repository={true|false}  :  Specifies  whether  files
285                stored in the disk repository should be kept after the JVM has
286                exited.  If false, files are deleted.  By default, this param‐
287                eter is disabled.
288
289stackdepth:  (Optional) Stack depth for stack traces.  Setting
290                this value greater than the default of 64 may cause a  perfor‐
291                mance  degradation.  This value cannot be changed once JFR has
292                been initialized.  (LONG, 64)
293
294thread_buffer_size: (Optional)  Local  buffer  size  for  each
295                thread  in bytes if one of the following suffixes is not used:
296                'k' or 'K' for kilobytes or 'm' or 'M' for  megabytes.   Over‐
297                riding this parameter could reduce performance and is not rec‐
298                ommended.  This value cannot be changed once JFR has been ini‐
299                tialized.  (STRING, 8k)
300
301samplethreads: (Optional) Flag for activating thread sampling.
302                (BOOLEAN, true)
303
304       JFR.dump [options]
305              Write data to a file while a flight recording is running
306
307              Impact: Low
308
309              Note:
310
311              The options must be specified using either key or key=value syn‐
312              tax.   No  options are required.  The recording continues to run
313              after the data is written.
314
315              options:
316
317begin: (Optional) Specify the time from which  recording  data
318                will be included in the dump file.  The format is specified as
319                local time.  (STRING, no default value)
320
321end: (Optional) Specify the time to which recording data  will
322                be  included in the dump file.  The format is specified as lo‐
323                cal time.  (STRING, no default value)
324
325                Note: For both begin and end, the time must  be  in  a  format
326                that  can  be  read by java.time.LocalTime::parse(STRING), ja‐
327                va.time.LocalDateTime::parse(STRING)     or      java.time.In‐
328                stant::parse(STRING).       For      example,      "13:20:15",
329                "2020-03-17T09:00:00" or "2020-03-17T09:00:00Z".
330
331                Note: begin and end times correspond to the  timestamps  found
332                within the recorded information in the flight recording data.
333
334                Another  option  is to use a time relative to the current time
335                that is specified by a negative integer followed by  "s",  "m"
336                or "h".  For example, "-12h", "-15m" or "-30s"
337
338filename:  (Optional)  Name  of  the  file to which the flight
339                recording data is dumped.  If no filename is given, a filename
340                is  generated from the PID and the current date.  The filename
341                may also be a directory in which case, the filename is  gener‐
342                ated from the PID and the current date in the specified direc‐
343                tory.  If %p and/or %t is specified in the  filename,  it  ex‐
344                pands  to the JVM's PID and the current timestamp, respective‐
345                ly.  (STRING, no default value)
346
347maxage: (Optional) Length  of  time  for  dumping  the  flight
348                recording  data  to a file.  (INTEGER followed by 's' for sec‐
349                onds 'm' for minutes or 'h' for hours, no default value)
350
351maxsize: (Optional) Maximum size for the  amount  of  data  to
352                dump  from a flight recording in bytes if one of the following
353                suffixes is not used: 'm' or 'M' for megabytes OR 'g'  or  'G'
354                for gigabytes.  (STRING, no default value)
355
356name:  (Optional) Name of the recording.  If no name is given,
357                data from all recordings is dumped.  (STRING, no default  val‐
358                ue)
359
360path-to-gc-root:  (Optional)  Flag  for  saving  the  path  to
361                garbage collection (GC) roots at the time the  recording  data
362                is  dumped.  The path information is useful for finding memory
363                leaks but collecting it can cause the application to pause for
364                a  short period of time.  Turn on this flag only when you have
365                an application that you suspect has a memory leak.   (BOOLEAN,
366                false)
367
368       JFR.start [options]
369              Start a flight recording
370
371              Impact: Low
372
373              Note:
374
375              The options must be specified using either key or key=value syn‐
376              tax.  If no parameters are entered, then a recording is  started
377              with default values.
378
379              options:
380
381delay:  (Optional)  Length  of time to wait before starting to
382                record (INTEGER followed by 's' for seconds 'm' for minutes or
383                'h' for hours, 0s)
384
385disk:  (Optional) Flag for also writing the data to disk while
386                recording (BOOLEAN, true)
387
388dumponexit: (Optional) Flag for writing the recording to  disk
389                when  the  Java  Virtual  Machine (JVM) shuts down.  If set to
390                'true' and no value is given for filename,  the  recording  is
391                written  to  a  file  in  the  directory where the process was
392                started.  The file name is a system-generated name  that  con‐
393                tains  the  process  ID, the recording ID and the current time
394                stamp.   (For  example:  id-1-2019_12_12_10_41.jfr)  (BOOLEAN,
395                false)
396
397duration:  (Optional)  Length of time to record.  Note that 0s
398                means forever (INTEGER followed by 's'  for  seconds  'm'  for
399                minutes or 'h' for hours, 0s)
400
401filename:  (Optional)  Name  of  the  file to which the flight
402                recording data is written when the recording is  stopped.   If
403                no filename is given, a filename is generated from the PID and
404                the current date and is placed  in  the  directory  where  the
405                process  was started.  The filename may also be a directory in
406                which case, the filename is generated from  the  PID  and  the
407                current  date  in the specified directory.  If %p and/or %t is
408                specified in the filename, it expands to the JVM's PID and the
409                current timestamp, respectively.  (STRING, no default value)
410
411maxage:  (Optional)  Maximum time to keep the recorded data on
412                disk.  This parameter is valid only when the disk parameter is
413                set to true.  Note 0s means forever.  (INTEGER followed by 's'
414                for seconds 'm' for minutes or 'h' for hours, 0s)
415
416maxsize: (Optional) Maximum size of the data to keep  on  disk
417                in  bytes if one of the following suffixes is not used: 'm' or
418                'M' for megabytes OR 'g' or 'G' for gigabytes.  This parameter
419                is  valid  only when the disk parameter is set to 'true'.  The
420                value must not be less than the value for the maxchunksize pa‐
421                rameter  set  with  the JFR.configure command.  (STRING, 0 (no
422                maximum size))
423
424name: (Optional) Name of the recording.  If no name is provid‐
425                ed, a name is generated.  Make note of the generated name that
426                is shown in the response to the command so that you can use it
427                with other commands.  (STRING, system-generated default name)
428
429path-to-gc-root:  (Optional)  Flag  for  saving  the  path  to
430                garbage collection (GC) roots at the end of a recording.   The
431                path  information  is useful for finding memory leaks but col‐
432                lecting it is time consuming.  Turn on this flag only when you
433                have  an  application  that you suspect has a memory leak.  If
434                the settings parameter is set to 'profile', then the  informa‐
435                tion  collected includes the stack trace from where the poten‐
436                tial leaking object was allocated.  (BOOLEAN, false)
437
438settings: (Optional) Name of the settings file that identifies
439                which  events to record.  To specify more than one file, sepa‐
440                rate the names with a comma (',').  Include the  path  if  the
441                file  is not in JAVA-HOME/lib/jfr.  The following profiles are
442                included with the JDK in the JAVA-HOME/lib/jfr directory: 'de‐
443                fault.jfc':  collects a predefined set of information with low
444                overhead, so it has minimal impact on performance and  can  be
445                used  with  recordings  that  run continuously; 'profile.jfc':
446                Provides more data than the 'default.jfc'  profile,  but  with
447                more  overhead and impact on performance.  Use this configura‐
448                tion for short periods of time when more information is  need‐
449                ed.   Use  none to start a recording without a predefined con‐
450                figuration file.  (STRING, JAVA-HOME/lib/jfr/default.jfc)
451
452              Event settings and .jfc options can be specified using the  fol‐
453              lowing syntax:
454
455option:  (Optional)  Specifies the option value to modify.  To
456                list available options, use the JAVA_HOME/bin/jfr tool.
457
458event-setting: (Optional) Specifies the event setting value to
459                modify.   Use the form: <event-name>#<setting-name>=<value> To
460                add a new event setting, prefix the event name with '+'.
461
462              You can specify values for multiple event settings and .jfc  op‐
463              tions  by  separating them with a whitespace.  In case of a con‐
464              flict between a parameter and a .jfc option, the parameter  will
465              take  precedence.   The  whitespace delimiter can be omitted for
466              timespan values, i.e.  20ms.  For  more  information  about  the
467              settings syntax, see Javadoc of the jdk.jfr package.
468
469       JFR.stop [options]
470              Stop a flight recording
471
472              Impact: Low
473
474              Note:
475
476              The options must be specified using either key or key=value syn‐
477              tax.  If  no  parameters  are  entered,  then  no  recording  is
478              stopped.
479
480              options:
481
482filename:  (Optional)  Name of the file to which the recording
483                is written when the recording is stopped.  If %p and/or %t  is
484                specified in the filename, it expands to the JVM's PID and the
485                current timestamp, respectively.  If no path is provided,  the
486                data  from  the  recording  is discarded.  (STRING, no default
487                value)
488
489name: (Optional) Name of the  recording  (STRING,  no  default
490                value)
491
492       JVMTI.agent_load [arguments]
493              Loads JVMTI native agent.
494
495              Impact: Low
496
497              arguments:
498
499library  path:  Absolute  path  of  the  JVMTI  agent to load.
500                (STRING, no default value)
501
502agent option: (Optional) Option  string  to  pass  the  agent.
503                (STRING, no default value)
504
505       JVMTI.data_dump
506              Signals the JVM to do a data-dump request for JVMTI.
507
508              Impact: High
509
510       ManagementAgent.start [options]
511              Starts remote management agent.
512
513              Impact: Low --- no impact
514
515              Note:
516
517              The  following  options  must  be  specified using either key or
518              key=value syntax.
519
520              options:
521
522config.file:  (Optional)  Sets  com.sun.management.config.file
523                (STRING, no default value)
524
525jmxremote.host:   (Optional)   Sets  com.sun.management.jmxre‐
526                mote.host (STRING, no default value)
527
528jmxremote.port:  (Optional)   Sets   com.sun.management.jmxre‐
529                mote.port (STRING, no default value)
530
531jmxremote.rmi.port:  (Optional) Sets com.sun.management.jmxre‐
532                mote.rmi.port (STRING, no default value)
533
534jmxremote.ssl:   (Optional)   Sets   com.sun.management.jmxre‐
535                mote.ssl (STRING, no default value)
536
537jmxremote.registry.ssl:    (Optional)   Sets   com.sun.manage‐
538                ment.jmxremote.registry.ssl (STRING, no default value)
539
540jmxremote.authenticate:   (Optional)   Sets    com.sun.manage‐
541                ment.jmxremote.authenticate (STRING, no default value)
542
543              • jmxremote.password.file:   (Optional)   Sets   com.sun.manage‐
544                ment.jmxremote.password.file (STRING, no default value)
545
546jmxremote.access.file:   (Optional)    Sets    com.sun.manage‐
547                ment.jmxremote.acce ss.file (STRING, no default value)
548
549jmxremote.login.config:    (Optional)   Sets   com.sun.manage‐
550                ment.jmxremote.log in.config (STRING, no default value)
551
552jmxremote.ssl.enabled.cipher.suites:      (Optional)      Sets
553                com.sun.management.
554
555jmxremote.ssl.enabled.cipher.suite: (STRING, no default value)
556
557jmxremote.ssl.enabled.protocols:  (Optional) Sets com.sun.man‐
558                agement.jmxr emote.ssl.enabled.protocols (STRING,  no  default
559                value)
560
561jmxremote.ssl.need.client.auth:  (Optional)  Sets com.sun.man‐
562                agement.jmxre mote.need.client.auth (STRING, no default value)
563
564jmxremote.ssl.config.file:  (Optional)  Sets   com.sun.manage‐
565                ment.jmxremote. ssl_config_file (STRING, no default value)
566
567jmxremote.autodiscovery:   (Optional)   Sets   com.sun.manage‐
568                ment.jmxremote.au todiscovery (STRING, no default value)
569
570jdp.port: (Optional) Sets com.sun.management.jdp.port (INT, no
571                default value)
572
573jdp.address:  (Optional)  Sets  com.sun.management.jdp.address
574                (STRING, no default value)
575
576jdp.source_addr:     (Optional)      Sets      com.sun.manage‐
577                ment.jdp.source_addr (STRING, no default value)
578
579jdp.ttl:  (Optional)  Sets com.sun.management.jdp.ttl (INT, no
580                default value)
581
582jdp.pause: (Optional) Sets com.sun.management.jdp.pause  (INT,
583                no default value)
584
585jdp.name: (Optional) Sets com.sun.management.jdp.name (STRING,
586                no default value)
587
588       ManagementAgent.start_local
589              Starts the local management agent.
590
591              Impact: Low --- no impact
592
593       ManagementAgent.status
594              Print the management agent status.
595
596              Impact: Low --- no impact
597
598       ManagementAgent.stop
599              Stops the remote management agent.
600
601              Impact: Low --- no impact
602
603       System.native_heap_info (Linux only)
604              Prints information about native heap  usage  through  malloc_in‐
605              fo(3).
606
607              Impact: Low
608
609       System.trim_native_heap (Linux only)
610              Attempts to free up memory by trimming the C-heap.
611
612              Impact: Low
613
614       Thread.print [options]
615              Prints all threads with stacktraces.
616
617              Impact: Medium --- depends on the number of threads.
618
619              Note:
620
621              The  following  options  must  be  specified using either key or
622              key=value syntax.
623
624              options:
625
626-e: (Optional) Print  extended  thread  information  (BOOLEAN,
627                false)
628
629-l:  (Optional)  Prints  java.util.concurrent  locks (BOOLEAN,
630                false)
631
632       VM.cds [arguments]
633              Dumps a static or dynamic shared archive that includes all  cur‐
634              rently loaded classes.
635
636              Impact: Medium --- pause time depends on number of loaded class‐
637              es
638
639              arguments:
640
641subcmd: must be either static_dump or dynamic_dump (STRING, no
642                default value)
643
644filename:  (Optional)  Name of the shared archive to be dumped
645                (STRING, no default value)
646
647              If filename is not specified, a default file name is chosen  us‐
648              ing  the  pid  of  the  target  JVM  process.   For example, ja‐
649              va_pid1234_static.jsa, java_pid5678_dynamic.jsa, etc.
650
651              If filename is not specified as an absolute  path,  the  archive
652              file is created in a directory relative to the current directory
653              of the target JVM process.
654
655              If dynamic_dump is specified, the target  JVM  must  be  started
656              with the JVM option -XX:+RecordDynamicDumpInfo.
657
658       VM.classloaders [options]
659              Prints classloader hierarchy.
660
661              Impact: Medium --- Depends on number of class loaders and class‐
662              es loaded.
663
664              The following options must be  specified  using  either  key  or
665              key=value syntax.
666
667              options:
668
669show-classes:  (Optional)  Print  loaded  classes.   (BOOLEAN,
670                false)
671
672verbose: (Optional)  Print  detailed  information.   (BOOLEAN,
673                false)
674
675fold:  (Optional)  Show  loaders of the same name and class as
676                one.  (BOOLEAN, true)
677
678       VM.classloader_stats
679              Prints statistics about all ClassLoaders.
680
681              Impact: Low
682
683       VM.class_hierarchy [options] [arguments]
684              Prints a list of all loaded classes, indented to show the  class
685              hierarchy.  The name of each class is followed by the ClassLoad‐
686              erData* of its ClassLoader, or "null" if it  is  loaded  by  the
687              bootstrap class loader.
688
689              Impact: Medium --- depends on the number of loaded classes.
690
691              Note:
692
693              The  following  options  must  be  specified using either key or
694              key=value syntax.
695
696              options:
697
698-i: (Optional) Inherited interfaces should be printed.  (BOOL‐
699                EAN, false)
700
701-s:  (Optional)  If  a  classname is specified, print its sub‐
702                classes in addition to its superclasses.  Without this  option
703                only the superclasses will be printed.  (BOOLEAN, false)
704
705              arguments:
706
707classname:  (Optional)  The  name of the class whose hierarchy
708                should be printed.  If not specified,  all  class  hierarchies
709                are printed.  (STRING, no default value)
710
711       VM.command_line
712              Prints the command line used to start this VM instance.
713
714              Impact: Low
715
716       VM.dynlibs
717              Prints the loaded dynamic libraries.
718
719              Impact: Low
720
721       VM.events [options]
722              Print VM event logs
723
724              Impact: Low --- Depends on event log size.
725
726              options:
727
728              Note:
729
730              The  following  options  must  be  specified using either key or
731              key=value syntax.
732
733log: (Optional) Name of log to be printed.   If  omitted,  all
734                logs are printed.  (STRING, no default value)
735
736max: (Optional) Maximum number of events to be printed (newest
737                first).  If omitted, all events are printed.  (STRING, no  de‐
738                fault value)
739
740       VM.info
741              Prints information about the JVM environment and status.
742
743              Impact: Low
744
745       VM.log [options]
746              Lists  current  log configuration, enables/disables/configures a
747              log output, or rotates all logs.
748
749              Impact: Low
750
751              options:
752
753              Note:
754
755              The following options must be  specified  using  either  key  or
756              key=value syntax.
757
758output:  (Optional) The name or index (#) of output to config‐
759                ure.  (STRING, no default value)
760
761output_options: (Optional) Options for the  output.   (STRING,
762                no default value)
763
764what: (Optional) Configures what tags to log.  (STRING, no de‐
765                fault value )
766
767decorators: (Optional) Configures  which  decorators  to  use.
768                Use  'none'  or an empty value to remove all.  (STRING, no de‐
769                fault value)
770
771disable: (Optional) Turns off all logging and clears  the  log
772                configuration.  (BOOLEAN, no default value)
773
774list:  (Optional)  Lists current log configuration.  (BOOLEAN,
775                no default value)
776
777rotate: (Optional) Rotates all  logs.   (BOOLEAN,  no  default
778                value)
779
780       VM.flags [options]
781              Prints the VM flag options and their current values.
782
783              Impact: Low
784
785              Note:
786
787              The  following  options  must  be  specified using either key or
788              key=value syntax.
789
790              options:
791
792-all: (Optional) Prints all flags supported by the  VM  (BOOL‐
793                EAN, false).
794
795       VM.metaspace [options]
796              Prints the statistics for the metaspace
797
798              Impact: Medium --- Depends on number of classes loaded.
799
800              Note:
801
802              The  following  options  must  be  specified using either key or
803              key=value syntax.
804
805              options:
806
807basic: (Optional) Prints a basic  summary  (does  not  need  a
808                safepoint).  (BOOLEAN, false)
809
810show-loaders:  (Optional) Shows usage by class loader.  (BOOL‐
811                EAN, false)
812
813show-classes: (Optional) If show-loaders is set, shows  loaded
814                classes for each loader.  (BOOLEAN, false)
815
816by-chunktype:  (Optional)  Break  down  numbers by chunk type.
817                (BOOLEAN, false)
818
819by-spacetype: (Optional) Break down numbers  by  loader  type.
820                (BOOLEAN, false)
821
822vslist:  (Optional) Shows details about the underlying virtual
823                space.  (BOOLEAN, false)
824
825scale: (Optional) Memory usage in which to scale.  Valid  val‐
826                ues  are: 1, KB, MB or GB (fixed scale) or "dynamic" for a dy‐
827                namically chosen scale.  (STRING, dynamic)
828
829       VM.native_memory [options]
830              Prints native memory usage
831
832              Impact: Medium
833
834              Note:
835
836              The following options must be  specified  using  either  key  or
837              key=value syntax.
838
839              options:
840
841summary:  (Optional) Requests runtime to report current memory
842                summary, which includes total reserved and  committed  memory,
843                along  with memory usage summary by each subsystem.  (BOOLEAN,
844                false)
845
846detail: (Optional) Requests runtime to report  memory  alloca‐
847                tion >= 1K by each callsite.  (BOOLEAN, false)
848
849baseline: (Optional) Requests runtime to baseline current mem‐
850                ory usage, so it  can  be  compared  against  in  later  time.
851                (BOOLEAN, false)
852
853summary.diff:  (Optional)  Requests  runtime  to report memory
854                summary  comparison  against  previous  baseline.    (BOOLEAN,
855                false)
856
857detail.diff:  (Optional) Requests runtime to report memory de‐
858                tail comparison against previous  baseline,  which  shows  the
859                memory  allocation  activities at different callsites.  (BOOL‐
860                EAN, false)
861
862statistics: (Optional) Prints tracker  statistics  for  tuning
863                purpose.  (BOOLEAN, false)
864
865scale:  (Optional)  Memory  usage in which scale, KB, MB or GB
866                (STRING, KB)
867
868       VM.print_touched_methods
869              Prints all methods that have ever been touched during the  life‐
870              time of this JVM.
871
872              Impact: Medium --- depends on Java content.
873
874       VM.set_flag [arguments]
875              Sets the VM flag option by using the provided value.
876
877              Impact: Low
878
879              arguments:
880
881flag  name: The name of the flag that you want to set (STRING,
882                no default value)
883
884string value: (Optional)  The  value  that  you  want  to  set
885                (STRING, no default value)
886
887       VM.stringtable [options]
888              Dumps the string table.
889
890              Impact: Medium --- depends on the Java content.
891
892              Note:
893
894              The  following  options  must  be  specified using either key or
895              key=value syntax.
896
897              options:
898
899-verbose: (Optional) Dumps the content of each string  in  the
900                table (BOOLEAN, false)
901
902       VM.symboltable [options]
903              Dumps the symbol table.
904
905              Impact: Medium --- depends on the Java content.
906
907              Note:
908
909              The  following  options  must  be  specified using either key or
910              key=value syntax).
911
912              options:
913
914-verbose: (Optional) Dumps the content of each symbol  in  the
915                table (BOOLEAN, false)
916
917       VM.systemdictionary
918              Prints  the statistics for dictionary hashtable sizes and bucket
919              length.
920
921              Impact: Medium
922
923              Note:
924
925              The following options must be  specified  using  either  key  or
926              key=value syntax.
927
928              options:
929
930verbose:  (Optional) Dump the content of each dictionary entry
931                for all class loaders (BOOLEAN, false) .
932
933       VM.system_properties
934              Prints the system properties.
935
936              Impact: Low
937
938       VM.uptime [options]
939              Prints the VM uptime.
940
941              Impact: Low
942
943              Note:
944
945              The following options must be  specified  using  either  key  or
946              key=value syntax.
947
948              options:
949
950-date:  (Optional)  Adds a prefix with the current date (BOOL‐
951                EAN, false)
952
953       VM.version
954              Prints JVM version information.
955
956              Impact: Low
957
958
959
960JDK 21                               2023                              JCMD(1)
Impressum