< prev index next >

src/jdk.jcmd/share/man/jcmd.1

Print this page

        

@@ -19,11 +19,11 @@
 .\" or visit www.oracle.com if you need additional information or have any
 .\" questions.
 .\"
 .\" Automatically generated by Pandoc 2.3.1
 .\"
-.TH "JCMD" "1" "2018" "JDK 13" "JDK Commands"
+.TH "JCMD" "1" "2020" "JDK 14" "JDK Commands"
 .hy
 .SH NAME
 .PP
 jcmd \- send diagnostic command requests to a running Java Virtual
 Machine (JVM)

@@ -87,11 +87,11 @@
 Using \f[CB]jcmd\f[R] without arguments is the same as using
 \f[CB]jcmd\ \-l\f[R].
 .RE
 .TP
 .B \f[CB]\-h\f[R]
-Displays the\f[CB]jcmd\f[R] utility\[aq]s command\-line help.
+Displays the \f[CB]jcmd\f[R] utility\[aq]s command\-line help.
 .RS
 .RE
 .SH DESCRIPTION
 .PP
 The \f[CB]jcmd\f[R] utility is used to send diagnostic command requests to

@@ -247,11 +247,11 @@
 \f[CB]\-all\f[R]: (Optional) Inspects all objects, including unreachable
 objects (BOOLEAN, false)
 .RE
 .TP
 .B \f[CB]GC.class_stats\f[R] [\f[I]options\f[R]] [\f[I]arguments\f[R]]
-Provide statistics about Java class meta data.
+(Deprecated) Provide statistics about Java class meta data.
 .RS
 .PP
 Impact: High \-\-\- depends on Java heap size and content.
 .PP
 \f[B]Note:\f[R]

@@ -355,42 +355,290 @@
 .PP
 Impact: Medium \-\-\- depends on the Java content.
 .RE
 .TP
 .B \f[CB]JFR.check\f[R] [\f[I]options\f[R]]
-See \f[B]JFR.check\f[R]
-[https://www.oracle.com/pls/topic/lookup?ctx=en/java/javase/11/tools&id=JFRCR\-GUID\-DA391CC1\-B5D8\-44F1\-AEDD\-9A534C8DD009]
-in the Java Flight Recorder Command Reference.
+Show information about a running flight recording
 .RS
+.PP
+Impact: Low
+.PP
+\f[B]Note:\f[R]
+.PP
+The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or
+\f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax.
+If no parameters are entered, information for all active recordings is
+shown.
+.PP
+\f[I]options\f[R]:
+.IP \[bu] 2
+\f[CB]name\f[R]: (Optional) Name of the flight recording.
+(STRING, no default value)
+.IP \[bu] 2
+\f[CB]verbose\f[R]: (Optional) Flag for printing the event settings for
+the recording (BOOLEAN, false)
 .RE
 .TP
 .B \f[CB]JFR.configure\f[R] [\f[I]options\f[R]]
-See \f[B]JFR.configure\f[R]
-[https://www.oracle.com/pls/topic/lookup?ctx=en/java/javase/11/tools&id=JFRCR\-GUID\-737D234E\-FD69\-4E8E\-A9F7\-06AE073648DD]
-in the Java Flight Recorder Command Reference.
+Set the parameters for a flight recording
 .RS
+.PP
+Impact: Low
+.PP
+\f[B]Note:\f[R]
+.PP
+The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or
+\f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax.
+If no parameters are entered, the current settings are displayed.
+.PP
+\f[I]options\f[R]:
+.IP \[bu] 2
+\f[CB]globalbuffercount\f[R]: (Optional) Number of global buffers.
+This option is a legacy option: change the \f[CB]memorysize\f[R] parameter
+to alter the number of global buffers.
+This value cannot be changed once JFR has been initalized.
+(STRING, default determined by the value for \f[CB]memorysize\f[R])
+.IP \[bu] 2
+\f[CB]globalbuffersize\f[R]: (Optional) Size of the global buffers, in
+bytes.
+This option is a legacy option: change the \f[CB]memorysize\f[R] parameter
+to alter the size of the global buffers.
+This value cannot be changed once JFR has been initalized.
+(STRING, default determined by the value for \f[CB]memorysize\f[R])
+.IP \[bu] 2
+\f[CB]maxchunksize\f[R]: (Optional) Maximum size of an individual data
+chunk in bytes if one of the following suffixes is not used: \[aq]m\[aq]
+or \[aq]M\[aq] for megabytes OR \[aq]g\[aq] or \[aq]G\[aq] for
+gigabytes.
+This value cannot be changed once JFR has been initialized.
+(STRING, 12M)
+.IP \[bu] 2
+\f[CB]memorysize\f[R]: (Optional) Overall memory size, in bytes if one of
+the following suffixes is not used: \[aq]m\[aq] or \[aq]M\[aq] for
+megabytes OR \[aq]g\[aq] or \[aq]G\[aq] for gigabytes.
+This value cannot be changed once JFR has been initialized.
+(STRING, 10M)
+.IP \[bu] 2
+\f[CB]repositorypath\f[R]: (Optional) Path to the location where
+recordings are stored until they are written to a permanent file.
+(STRING, The default location is the temporary directory for the
+operating system.
+On Linux operating systems, the temporary directory is \f[CB]/tmp\f[R].
+On Windwows, the temporary directory is specified by the \f[CB]TMP\f[R]
+environment variable.)
+.IP \[bu] 2
+\f[CB]stackdepth\f[R]: (Optional) Stack depth for stack traces.
+Setting this value greater than the default of 64 may cause a
+performance degradation.
+This value cannot be changed once JFR has been initialized.
+(LONG, 64)
+.IP \[bu] 2
+\f[CB]thread_buffer_size\f[R]: (Optional) Local buffer size for each
+thread in bytes if one of the following suffixes is not used:
+\[aq]k\[aq] or \[aq]K\[aq] for kilobytes or \[aq]m\[aq] or \[aq]M\[aq]
+for megabytes.
+Overriding this parameter could reduce performance and is not
+recommended.
+This value cannot be changed once JFR has been initialized.
+(STRING, 8k)
+.IP \[bu] 2
+\f[CB]samplethreads\f[R]: (Optional) Flag for activating thread sampling.
+(BOOLEAN, true)
 .RE
 .TP
 .B \f[CB]JFR.dump\f[R] [\f[I]options\f[R]]
-See \f[B]JFR.dump\f[R]
-[https://www.oracle.com/pls/topic/lookup?ctx=en/java/javase/11/tools&id=JFRCR\-GUID\-6EB11926\-4DAF\-4B99\-AF20\-7FCD284EE6C1]
-in the Java Flight Recorder Command Reference.
+Write data to a file while a flight recording is running
 .RS
+.PP
+Impact: Low
+.PP
+\f[B]Note:\f[R]
+.PP
+The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or
+\f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax.
+No options are required.
+The recording continues to run after the data is written.
+.PP
+\f[I]options\f[R]:
+.IP \[bu] 2
+\f[CB]begin\f[R]: (Optional) Specify the time from which recording data
+will be included in the dump file.
+The format is specified as local time.
+(STRING, no default value)
+.IP \[bu] 2
+\f[CB]end\f[R]: (Optional) Specify the time to which recording data will
+be included in the dump file.
+The format is specified as local time.
+(STRING, no default value)
+.RS 2
+.PP
+\f[B]Note:\f[R] For both \f[CB]begin\f[R] and \f[CB]end\f[R], the time must
+be in a format that can be read by java.time.LocalTime::parse(STRING),
+java.time.LocalDateTime::parse(STRING) or
+java.time.Instant::parse(STRING).
+For example, "13:20:15", "2020\-03\-17T09:00:00" or
+"2020\-03\-17T09:00:00Z".
+.PP
+\f[B]Note:\f[R] \f[CB]begin\f[R] and \f[CB]end\f[R] times correspond to the
+timestamps found within the recorded information in the flight recording
+data.
+.PP
+Another option is to use a time relative to the current time that is
+specified by a negative integer followed by "s", "m" or "h".
+For example, "\-12h", "\-15m" or "\-30s"
+.RE
+.IP \[bu] 2
+\f[CB]filename\f[R]: (Optional) Name of the file to which the flight
+recording data is dumped.
+If no filename is given, a filename is generated from the PID and the
+current date.
+The filename may also be a directory in which case, the filename is
+generated from the PID and the current date in the specified directory.
+(STRING, no default value)
+.IP \[bu] 2
+\f[CB]maxage\f[R]: (Optional) Length of time for dumping the flight
+recording data to a file.
+(INTEGER followed by \[aq]s\[aq] for seconds \[aq]m\[aq] for minutes or
+\[aq]h\[aq] for hours, no default value)
+.IP \[bu] 2
+\f[CB]maxsize\f[R]: (Optional) Maximum size for the amount of data to dump
+from a flight recording in bytes if one of the following suffixes is not
+used: \[aq]m\[aq] or \[aq]M\[aq] for megabytes OR \[aq]g\[aq] or
+\[aq]G\[aq] for gigabytes.
+(STRING, no default value)
+.IP \[bu] 2
+\f[CB]name\f[R]: (Optional) Name of the recording.
+If no name is given, data from all recordings is dumped.
+(STRING, no default value)
+.IP \[bu] 2
+\f[CB]path\-to\-gc\-root\f[R]: (Optional) Flag for saving the path to
+garbage collection (GC) roots at the time the recording data is dumped.
+The path information is useful for finding memory leaks but collecting
+it can cause the application to pause for a short period of time.
+Turn on this flag only when you have an application that you suspect has
+a memory leak.
+(BOOLEAN, false)
 .RE
 .TP
 .B \f[CB]JFR.start\f[R] [\f[I]options\f[R]]
-See \f[B]JFR.start\f[R]
-[https://www.oracle.com/pls/topic/lookup?ctx=en/java/javase/11/tools&id=JFRCR\-GUID\-8DC13618\-1515\-4479\-B0FC\-9F4394BE5455]
-in the Java Flight Recorder Command Reference.
+Start a flight recording
 .RS
+.PP
+Impact: Low
+.PP
+\f[B]Note:\f[R]
+.PP
+The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or
+\f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax.
+If no parameters are entered, then a recording is started with default
+values.
+.PP
+\f[I]options\f[R]:
+.IP \[bu] 2
+\f[CB]delay\f[R]: (Optional) Length of time to wait before starting to
+record (INTEGER followed by \[aq]s\[aq] for seconds \[aq]m\[aq] for
+minutes or \[aq]h\[aq] for hours, 0s)
+.IP \[bu] 2
+\f[CB]disk\f[R]: (Optional) Flag for also writing the data to disk while
+recording (BOOLEAN, true)
+.IP \[bu] 2
+\f[CB]dumponexit\f[R]: (Optional) Flag for writing the recording to disk
+when the Java Virtual Machine (JVM) shuts down.
+If set to \[aq]true\[aq] and no value is given for \f[CB]filename\f[R],
+the recording is written to a file in the directory where the process
+was started.
+The file name is a system\-generated name that contains the process ID,
+the recording ID and the current time stamp.
+(For example: \f[CB]id\-1\-2019_12_12_10_41.jfr\f[R]) (BOOLEAN, false)
+.IP \[bu] 2
+\f[CB]duration\f[R]: (Optional) Length of time to record.
+Note that \f[CB]0s\f[R] means forever (INTEGER followed by \[aq]s\[aq] for
+seconds \[aq]m\[aq] for minutes or \[aq]h\[aq] for hours, 0s)
+.IP \[bu] 2
+\f[CB]filename\f[R]: (Optional) Name of the file to which the flight
+recording data is written when the recording is stopped.
+If no filename is given, a filename is generated from the PID and the
+current date and is placed in the directory where the process was
+started.
+The filename may also be a directory in which case, the filename is
+generated from the PID and the current date in the specified directory.
+(STRING, no default value)
+.IP \[bu] 2
+\f[CB]maxage\f[R]: (Optional) Maximum time to keep the recorded data on
+disk.
+This parameter is valid only when the \f[CB]disk\f[R] parameter is set to
+\f[CB]true\f[R].
+Note \f[CB]0s\f[R] means forever.
+(INTEGER followed by \[aq]s\[aq] for seconds \[aq]m\[aq] for minutes or
+\[aq]h\[aq] for hours, 0s)
+.IP \[bu] 2
+\f[CB]maxsize\f[R]: (Optional) Maximum size of the data to keep on disk in
+bytes if one of the following suffixes is not used: \[aq]m\[aq] or
+\[aq]M\[aq] for megabytes OR \[aq]g\[aq] or \[aq]G\[aq] for gigabytes.
+This parameter is valid only when the \f[CB]disk\f[R] parameter is set to
+\[aq]true\[aq].
+The value must not be less than the value for the \f[CB]maxchunksize\f[R]
+parameter set with the \f[CB]JFR.configure\f[R] command.
+(STRING, 0 (no maximum size))
+.IP \[bu] 2
+\f[CB]name\f[R]: (Optional) Name of the recording.
+If no name is provided, a name is generated.
+Make note of the generated name that is shown in the response to the
+command so that you can use it with other commands.
+(STRING, system\-generated default name)
+.IP \[bu] 2
+\f[CB]path\-to\-gc\-root\f[R]: (Optional) Flag for saving the path to
+garbage collection (GC) roots at the end of a recording.
+The path information is useful for finding memory leaks but collecting
+it is time consuming.
+Turn on this flag only when you have an application that you suspect has
+a memory leak.
+If the \f[CB]settings\f[R] parameter is set to \[aq]profile\[aq], then the
+information collected includes the stack trace from where the potential
+leaking object was allocated.
+(BOOLEAN, false)
+.IP \[bu] 2
+\f[CB]settings\f[R]: (Optional) Name of the settings file that identifies
+which events to record.
+To specify more than one file, separate the names with a comma
+(\[aq],\[aq]).
+Include the path if the file is not in \f[CB]JAVA\-HOME\f[R]/lib/jfr.
+The following profiles are included with the JDK in the
+\f[CB]JAVA\-HOME\f[R]/lib/jfr directory: \[aq]default.jfc\[aq]: collects a
+predefined set of information with low overhead, so it has minimal
+impact on performance and can be used with recordings that run
+continuously; \[aq]profile.jfc\[aq]: Provides more data than the
+\[aq]default.jfc\[aq] profile, but with more overhead and impact on
+performance.
+Use this configuration for short periods of time when more information
+is needed.
+Use \f[CB]none\f[R] to start a recording without a predefined
+configuration file.
+(STRING, \f[CB]JAVA\-HOME\f[R]/lib/jfr/default.jfc)
 .RE
 .TP
 .B \f[CB]JFR.stop\f[R] [\f[I]options\f[R]]
-See \f[B]JFR.stop\f[R]
-[https://www.oracle.com/pls/topic/lookup?ctx=en/java/javase/11/tools&id=JFRCR\-GUID\-66CC94C8\-8EDF\-4BB6\-8E7A\-49973025D4D9]
-in the Java Flight Recorder Command Reference.
+Stop a flight recording
 .RS
+.PP
+Impact: Low
+.PP
+\f[B]Note:\f[R]
+.PP
+The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or
+\f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax.
+If no parameters are entered, then no recording is stopped.
+.PP
+\f[I]options\f[R]:
+.IP \[bu] 2
+\f[CB]filename\f[R]: (Optional) Name of the file to which the recording is
+written when the recording is stopped.
+If no path is provided, the data from the recording is discarded.
+(STRING, no default value)
+.IP \[bu] 2
+\f[CB]name\f[R]: (Optional) Name of the recording (STRING, no default
+value)
 .RE
 .TP
 .B \f[CB]JVMTI.agent_load\f[R] [\f[I]arguments\f[R]]
 Loads JVMTI native agent.
 .RS
< prev index next >