1 '\" t 2 .\" Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 3 .\" 4 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 .\" 6 .\" This code is free software; you can redistribute it and/or modify it 7 .\" under the terms of the GNU General Public License version 2 only, as 8 .\" published by the Free Software Foundation. 9 .\" 10 .\" This code is distributed in the hope that it will be useful, but WITHOUT 11 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13 .\" version 2 for more details (a copy is included in the LICENSE file that 14 .\" accompanied this code). 15 .\" 16 .\" You should have received a copy of the GNU General Public License version 17 .\" 2 along with this work; if not, write to the Free Software Foundation, 18 .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19 .\" 20 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21 .\" or visit www.oracle.com if you need additional information or have any 22 .\" questions. 23 .\" 24 .\" Arch: generic 25 .\" Software: JDK 8 26 .\" Date: 21 November 2013 27 .\" SectDesc: Troubleshooting Tools 28 .\" Title: jcmd.1 29 .\" 30 .if n .pl 99999 31 .TH jcmd 1 "21 November 2013" "JDK 8" "Troubleshooting Tools" 32 .\" ----------------------------------------------------------------- 33 .\" * Define some portability stuff 34 .\" ----------------------------------------------------------------- 35 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 36 .\" http://bugs.debian.org/507673 37 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html 38 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 39 .ie \n(.g .ds Aq \(aq 40 .el .ds Aq ' 41 .\" ----------------------------------------------------------------- 42 .\" * set default formatting 43 .\" ----------------------------------------------------------------- 44 .\" disable hyphenation 45 .nh 46 .\" disable justification (adjust text to left margin only) 47 .ad l 48 .\" ----------------------------------------------------------------- 49 .\" * MAIN CONTENT STARTS HERE * 50 .\" ----------------------------------------------------------------- 51 52 .SH NAME 53 jcmd \- Sends diagnostic command requests to a running Java Virtual Machine (JVM)\&. 54 .SH SYNOPSIS 55 .sp 56 .nf 57 58 \fBjcmd\fR [\fB\-l\fR|\fB\-h\fR|\fB\-help\fR] 59 .fi 60 .nf 61 62 \fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fBPerfCounter\&.print\fR 63 .fi 64 .nf 65 66 \fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fB\-f\fR \fIfilename\fR 67 .fi 68 .nf 69 70 \fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fIcommand\fR[ \fIarguments\fR] 71 .fi 72 .sp 73 .SH DESCRIPTION 74 The \f3jcmd\fR utility is used to send diagnostic command requests to the JVM\&. It must be used on the same machine on which the JVM is running, and have the same effective user and group identifiers that were used to launch the JVM\&. 75 .PP 76 \fINote:\fR To invoke diagnostic commands from a remote machine or with different identiers, you can use the \f3com\&.sun\&.management\&.DiagnosticCommandMBean\fR interface\&. For more information about the \f3DiagnosticCommandMBean\fR interface, see the API documentation at http://download\&.java\&.net/jdk8/docs/jre/api/management/extension/com/sun/management/DiagnosticCommandMBean\&.html 77 .PP 78 If you run \f3jcmd\fR without arguments or with the \f3-l\fR option, it prints the list of running Java process identifiers with the main class and command-line arguments that were used to launch the process\&. Running \f3jcmd\fR with the \f3-h\fR or \f3-help\fR option prints the tool\(cqs help message\&. 79 .PP 80 If you specify the processes identifier (\fIpid\fR) or the main class (\fImain-class\fR) as the first argument, \f3jcmd\fR sends the diagnostic command request to the Java process with the specified identifier or to all Java processes with the specified name of the main class\&. You can also send the diagnostic command request to all available Java processes by specifying \f30\fR as the process identifier\&. Use one of the following as the diagnostic command request: 81 .TP 82 Perfcounter\&.print 83 Prints the performance counters available for the specified Java process\&. The list of performance counters might vary with the Java process\&. 84 .TP 85 -f \fIfilename\fR 86 .br 87 The name of the file from which to read diagnostic commands and send them to the specified Java process\&. Used only with the \f3-f\fR option\&. Each command in the file must be written on a single line\&. Lines starting with a number sign (\f3#\fR) are ignored\&. Processing of the file ends when all lines have been read or when a line containing the \f3stop\fR keyword is read\&. 88 .TP 89 \fIcommand\fR [\fIarguments\fR] 90 The command to be sent to the specified Java process\&. The list of available diagnostic commands for a given process can be obtained by sending the \f3help\fR command to this process\&. Each diagnostic command has its own set of arguments\&. To see the description, syntax, and a list of available arguments for a command, use the name of the command as the argument for the \f3help\fR command\&. 91 92 \fINote:\fR If any arguments contain spaces, you must surround them with single or double quotation marks (\f3\&'\fR or \f3"\fR)\&. In addition, you must escape single or double quotation marks with a backslash (\f3\e\fR) to prevent the operating system shell from processing quotation marks\&. Alternatively, you can surround these arguments with single quotation marks and then with double quotation marks (or with double quotation marks and then with single quotation marks)\&. 93 .SH OPTIONS 94 Options are mutually exclusive\&. 95 .TP 96 -f \fIfilename\fR 97 .br 98 Reads commands from the specified file\&. This option can be used only if you specify the process identifier or the main class as the first argument\&. Each command in the file must be written on a single line\&. Lines starting with a number sign (\f3#\fR) are ignored\&. Processing of the file ends when all lines have been read or when a line containing the \f3stop\fR keyword is read\&. 99 .TP 100 -h, -help 101 .br 102 Prints a help message\&. 103 .TP 104 -l 105 .br 106 Prints the list of running Java processes identifiers with the main class and command-line arguments\&. 107 .SH SEE\ ALSO 108 .TP 0.2i 109 \(bu 110 jps(1) 111 .RE 112 .br 113 'pl 8.5i 114 'bp | 1 '\" t 2 .\" Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. 3 .\" 4 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 .\" 6 .\" This code is free software; you can redistribute it and/or modify it 7 .\" under the terms of the GNU General Public License version 2 only, as 8 .\" published by the Free Software Foundation. 9 .\" 10 .\" This code is distributed in the hope that it will be useful, but WITHOUT 11 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13 .\" version 2 for more details (a copy is included in the LICENSE file that 14 .\" accompanied this code). 15 .\" 16 .\" You should have received a copy of the GNU General Public License version 17 .\" 2 along with this work; if not, write to the Free Software Foundation, 18 .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19 .\" 20 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21 .\" or visit www.oracle.com if you need additional information or have any 22 .\" questions. 23 .\" 24 .\" Title: jcmd 25 .\" Language: English 26 .\" Date: 03 March 2015 27 .\" SectDesc: Troubleshooting Tools 28 .\" Software: JDK 8 29 .\" Arch: generic 30 .\" Part Number: E38207-04 31 .\" Doc ID: JSSON 32 .\" 33 .if n .pl 99999 34 .TH "jcmd" "1" "03 March 2015" "JDK 8" "Troubleshooting Tools" 35 .\" ----------------------------------------------------------------- 36 .\" * Define some portability stuff 37 .\" ----------------------------------------------------------------- 38 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 39 .\" http://bugs.debian.org/507673 40 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html 41 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 42 .ie \n(.g .ds Aq \(aq 43 .el .ds Aq ' 44 .\" ----------------------------------------------------------------- 45 .\" * set default formatting 46 .\" ----------------------------------------------------------------- 47 .\" disable hyphenation 48 .nh 49 .\" disable justification (adjust text to left margin only) 50 .ad l 51 .\" ----------------------------------------------------------------- 52 .\" * MAIN CONTENT STARTS HERE * 53 .\" ----------------------------------------------------------------- 54 .SH "NAME" 55 jcmd \- Sends diagnostic command requests to a running Java Virtual Machine (JVM)\&. 56 .SH "SYNOPSIS" 57 .sp 58 .if n \{\ 59 .RS 4 60 .\} 61 .nf 62 \fBjcmd\fR [\fB\-l\fR|\fB\-h\fR|\fB\-help\fR] 63 .fi 64 .if n \{\ 65 .RE 66 .\} 67 .sp 68 .if n \{\ 69 .RS 4 70 .\} 71 .nf 72 \fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fBPerfCounter\&.print\fR 73 .fi 74 .if n \{\ 75 .RE 76 .\} 77 .sp 78 .if n \{\ 79 .RS 4 80 .\} 81 .nf 82 \fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fB\-f\fR \fIfilename\fR 83 .fi 84 .if n \{\ 85 .RE 86 .\} 87 .sp 88 .if n \{\ 89 .RS 4 90 .\} 91 .nf 92 \fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fIcommand\fR[ \fIarguments\fR] 93 .fi 94 .if n \{\ 95 .RE 96 .\} 97 .SH "DESCRIPTION" 98 .PP 99 The 100 \fBjcmd\fR 101 utility is used to send diagnostic command requests to the JVM\&. It must be used on the same machine on which the JVM is running, and have the same effective user and group identifiers that were used to launch the JVM\&. 102 .if n \{\ 103 .sp 104 .\} 105 .RS 4 106 .it 1 an-trap 107 .nr an-no-space-flag 1 108 .nr an-break-flag 1 109 .br 110 .ps +1 111 \fBNote\fR 112 .ps -1 113 .br 114 .TS 115 allbox tab(:); 116 l. 117 T{ 118 .PP 119 To invoke diagnostic commands from a remote machine or with different identifiers, you can use the 120 \fBcom\&.sun\&.management\&.DiagnosticCommandMBean\fR 121 interface\&. For more information about the 122 \fBDiagnosticCommandMBean\fR 123 interface, see the API documentation at http://docs\&.oracle\&.com/javase/8/docs/jre/api/management/extension/com/sun/management/DiagnosticCommandMBean\&.html 124 T} 125 .TE 126 .sp 1 127 .sp .5v 128 .RE 129 .PP 130 If you run 131 \fBjcmd\fR 132 without arguments or with the 133 \fB\-l\fR 134 option, it prints the list of running Java process identifiers with the main class and command\-line arguments that were used to launch the process\&. Running 135 \fBjcmd\fR 136 with the 137 \fB\-h\fR 138 or 139 \fB\-help\fR 140 option prints the tool\(cqs help message\&. 141 .PP 142 If you specify the processes identifier (\fIpid\fR) or the main class (\fImain\-class\fR) as the first argument, 143 \fBjcmd\fR 144 sends the diagnostic command request to the Java process with the specified identifier or to all Java processes with the specified name of the main class\&. You can also send the diagnostic command request to all available Java processes by specifying 145 \fB0\fR 146 as the process identifier\&. Use one of the following as the diagnostic command request: 147 .PP 148 Perfcounter\&.print 149 .RS 4 150 Prints the performance counters available for the specified Java process\&. The list of performance counters might vary with the Java process\&. 151 .RE 152 .PP 153 \-f \fIfilename\fR 154 .RS 4 155 The name of the file from which to read diagnostic commands and send them to the specified Java process\&. Used only with the 156 \fB\-f\fR 157 option\&. Each command in the file must be written on a single line\&. Lines starting with a number sign (\fB#\fR) are ignored\&. Processing of the file ends when all lines have been read or when a line containing the 158 \fBstop\fR 159 keyword is read\&. 160 .RE 161 .PP 162 \fIcommand\fR [\fIarguments\fR] 163 .RS 4 164 The command to be sent to the specified Java process\&. The list of available diagnostic commands for a given process can be obtained by sending the 165 \fBhelp\fR 166 command to this process\&. Each diagnostic command has its own set of arguments\&. To see the description, syntax, and a list of available arguments for a command, use the name of the command as the argument for the 167 \fBhelp\fR 168 command\&. 169 .sp 170 \fBNote:\fR 171 If any arguments contain spaces, you must surround them with single or double quotation marks (\fB\*(Aq\fR 172 or 173 \fB"\fR)\&. In addition, you must escape single or double quotation marks with a backslash (\fB\e\fR) to prevent the operating system shell from processing quotation marks\&. Alternatively, you can surround these arguments with single quotation marks and then with double quotation marks (or with double quotation marks and then with single quotation marks)\&. 174 .RE 175 .SH "OPTIONS" 176 .PP 177 Options are mutually exclusive\&. 178 .PP 179 \-f \fIfilename\fR 180 .RS 4 181 Reads commands from the specified file\&. This option can be used only if you specify the process identifier or the main class as the first argument\&. Each command in the file must be written on a single line\&. Lines starting with a number sign (\fB#\fR) are ignored\&. Processing of the file ends when all lines have been read or when a line containing the 182 \fBstop\fR 183 keyword is read\&. 184 .RE 185 .PP 186 \-h 187 .br 188 \-help 189 .RS 4 190 Prints a help message\&. 191 .RE 192 .PP 193 \-l 194 .RS 4 195 Prints the list of running Java processes identifiers with the main class and command\-line arguments\&. 196 .RE 197 .SH "SEE ALSO" 198 .sp 199 .RS 4 200 .ie n \{\ 201 \h'-04'\(bu\h'+03'\c 202 .\} 203 .el \{\ 204 .sp -1 205 .IP \(bu 2.3 206 .\} 207 jps(1) 208 .RE 209 .br 210 'pl 8.5i 211 'bp |