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