blob: 3f0952e1ad7ab26b09e1d2d6c5f52199fd3fe9f6 [file] [log] [blame]
rgallardb6435452013-11-25 20:19:02 -08001'\" t
rgallardf71f2512015-02-02 10:12:21 -08002.\" Copyright (c) 2004, 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: jstat
25.\" Language: English
26.\" Date: 03 March 2015
27.\" SectDesc: Monitoring Tools
28.\" Software: JDK 8
29.\" Arch: generic
30.\" Part Number: E38207-04
31.\" Doc ID: JSSON
rgallardb6435452013-11-25 20:19:02 -080032.\"
33.if n .pl 99999
rgallardf71f2512015-02-02 10:12:21 -080034.TH "jstat" "1" "03 March 2015" "JDK 8" "Monitoring 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"
rgallardb6435452013-11-25 20:19:02 -080055jstat \- Monitors Java Virtual Machine (JVM) statistics\&. This command is experimental and unsupported\&.
rgallardf71f2512015-02-02 10:12:21 -080056.SH "SYNOPSIS"
57.sp
58.if n \{\
59.RS 4
60.\}
61.nf
rgallardb6435452013-11-25 20:19:02 -080062\fBjstat\fR [ \fIgeneralOption\fR | \fIoutputOptions vmid\fR [ \fIinterval\fR[s|ms] [ \fIcount \fR] ]
rgallardf71f2512015-02-02 10:12:21 -080063.fi
64.if n \{\
65.RE
66.\}
67.PP
rgallardb6435452013-11-25 20:19:02 -080068\fIgeneralOption\fR
rgallardf71f2512015-02-02 10:12:21 -080069.RS 4
70A single general command\-line option
71\fB\-help\fR
72or
73\fB\-options\fR\&. See General Options\&.
74.RE
75.PP
rgallardb6435452013-11-25 20:19:02 -080076\fIoutputOptions\fR
rgallardf71f2512015-02-02 10:12:21 -080077.RS 4
78One or more output options that consist of a single
79\fBstatOption\fR, plus any of the
80\fB\-t\fR,
81\fB\-h\fR, and
82\fB\-J\fR
83options\&. See Output Options\&.
84.RE
85.PP
rgallardb6435452013-11-25 20:19:02 -080086\fIvmid\fR
rgallardf71f2512015-02-02 10:12:21 -080087.RS 4
rgallardb6435452013-11-25 20:19:02 -080088Virtual machine identifier, which is a string that indicates the target JVM\&. The general syntax is the following:
rgallardf71f2512015-02-02 10:12:21 -080089.sp
90.if n \{\
91.RS 4
92.\}
93.nf
94\fB[protocol:][//]lvmid[@hostname[:port]/servername]\fR
95
96.fi
97.if n \{\
98.RE
99.\}
100The syntax of the
101\fBvmid\fR
102string corresponds to the syntax of a URI\&. The
103\fBvmid\fR
104string can vary from a simple integer that represents a local JVM to a more complex construction that specifies a communications protocol, port number, and other implementation\-specific values\&. See Virtual Machine Identifier\&.
105.RE
106.PP
rgallardb6435452013-11-25 20:19:02 -0800107\fIinterval\fR [s|ms]
rgallardf71f2512015-02-02 10:12:21 -0800108.RS 4
109Sampling interval in the specified units, seconds (s) or milliseconds (ms)\&. Default units are milliseconds\&. Must be a positive integer\&. When specified, the
110\fBjstat\fR
111command produces its output at each interval\&.
112.RE
113.PP
rgallardb6435452013-11-25 20:19:02 -0800114\fIcount\fR
rgallardf71f2512015-02-02 10:12:21 -0800115.RS 4
116Number of samples to display\&. The default value is infinity which causes the
117\fBjstat\fR
118command to display statistics until the target JVM terminates or the
119\fBjstat\fR
120command is terminated\&. This value must be a positive integer\&.
121.RE
122.SH "DESCRIPTION"
123.PP
124The
125\fBjstat\fR
126command displays performance statistics for an instrumented Java HotSpot VM\&. The target JVM is identified by its virtual machine identifier, or
127\fBvmid\fR
128option\&.
129.SH "VIRTUAL MACHINE IDENTIFIER"
130.PP
131The syntax of the
132\fBvmid\fR
133string corresponds to the syntax of a URI:
134.sp
135.if n \{\
136.RS 4
137.\}
138.nf
139\fB[protocol:][//]lvmid[@hostname[:port]/servername]\fR
140
141.fi
142.if n \{\
143.RE
144.\}
145.PP
rgallardb6435452013-11-25 20:19:02 -0800146\fIprotocol\fR
rgallardf71f2512015-02-02 10:12:21 -0800147.RS 4
148The communications protocol\&. If the
149\fIprotocol\fR
150value is omitted and a host name is not specified, then the default protocol is a platform\-specific optimized local protocol\&. If the
151\fIprotocol\fR
152value is omitted and a host name is specified, then the default protocol is
153\fBrmi\fR\&.
154.RE
155.PP
rgallardb6435452013-11-25 20:19:02 -0800156\fIlvmid\fR
rgallardf71f2512015-02-02 10:12:21 -0800157.RS 4
158The local virtual machine identifier for the target JVM\&. The
159\fBlvmid\fR
160is a platform\-specific value that uniquely identifies a JVM on a system\&. The
161\fBlvmid\fR
162is the only required component of a virtual machine identifier\&. The
163\fBlvmid\fR
164is typically, but not necessarily, the operating system\*(Aqs process identifier for the target JVM process\&. You can use the
165\fBjps\fR
166command to determine the
167\fBlvmid\fR\&. Also, you can determine the
168\fBlvmid\fR
169on Solaris, Linux, and OS X platforms with the
170\fBps\fR
171command, and on Windows with the Windows Task Manager\&.
172.RE
173.PP
rgallardb6435452013-11-25 20:19:02 -0800174\fIhostname\fR
rgallardf71f2512015-02-02 10:12:21 -0800175.RS 4
176A hostname or IP address that indicates the target host\&. If the
177\fIhostname\fR
178value is omitted, then the target host is the local host\&.
179.RE
180.PP
rgallardb6435452013-11-25 20:19:02 -0800181\fIport\fR
rgallardf71f2512015-02-02 10:12:21 -0800182.RS 4
183The default port for communicating with the remote server\&. If the
184\fIhostname\fR
185value is omitted or the
186\fIprotocol\fR
187value specifies an optimized, local protocol, then the
188\fIport\fR
189value is ignored\&. Otherwise, treatment of the
190\fBport\fR
191parameter is implementation\-specific\&. For the default
192\fBrmi\fR
193protocol, the port value indicates the port number for the rmiregistry on the remote host\&. If the
194\fIport\fR
195value is omitted and the
196\fIprotocol\fR
197value indicates
198\fBrmi\fR, then the default rmiregistry port (1099) is used\&.
199.RE
200.PP
rgallardb6435452013-11-25 20:19:02 -0800201\fIservername\fR
rgallardf71f2512015-02-02 10:12:21 -0800202.RS 4
203The treatment of the
204\fBservername\fR
205parameter depends on implementation\&. For the optimized local protocol, this field is ignored\&. For the
206\fBrmi\fR
207protocol, it represents the name of the RMI remote object on the remote host\&.
208.RE
209.SH "OPTIONS"
210.PP
211The
212\fBjstat\fR
213command supports two types of options, general options and output options\&. General options cause the
214\fBjstat\fR
215command to display simple usage and version information\&. Output options determine the content and format of the statistical output\&.
rgallardb6435452013-11-25 20:19:02 -0800216.PP
217All options and their functionality are subject to change or removal in future releases\&.
rgallardf71f2512015-02-02 10:12:21 -0800218.SS "General Options"
219.PP
rgallardb6435452013-11-25 20:19:02 -0800220If you specify one of the general options, then you cannot specify any other option or parameter\&.
rgallardf71f2512015-02-02 10:12:21 -0800221.PP
222\-help
223.RS 4
rgallardb6435452013-11-25 20:19:02 -0800224Displays a help message\&.
rgallardf71f2512015-02-02 10:12:21 -0800225.RE
226.PP
227\-options
228.RS 4
rgallardb6435452013-11-25 20:19:02 -0800229Displays a list of static options\&. See Output Options\&.
rgallardf71f2512015-02-02 10:12:21 -0800230.RE
231.SS "Output Options"
rgallardb6435452013-11-25 20:19:02 -0800232.PP
rgallardf71f2512015-02-02 10:12:21 -0800233If you do not specify a general option, then you can specify output options\&. Output options determine the content and format of the
234\fBjstat\fR
235command\*(Aqs output, and consist of a single
236\fBstatOption\fR, plus any of the other output options (\fB\-h\fR,
237\fB\-t\fR, and
238\fB\-J\fR)\&. The
239\fBstatOption\fR
240must come first\&.
rgallardb6435452013-11-25 20:19:02 -0800241.PP
rgallardf71f2512015-02-02 10:12:21 -0800242Output is formatted as a table, with columns that are separated by spaces\&. A header row with titles describes the columns\&. Use the
243\fB\-h\fR
244option to set the frequency at which the header is displayed\&. Column header names are consistent among the different options\&. In general, if two options provide a column with the same name, then the data source for the two columns is the same\&.
rgallardb6435452013-11-25 20:19:02 -0800245.PP
rgallardf71f2512015-02-02 10:12:21 -0800246Use the
247\fB\-t\fR
248option to display a time stamp column, labeled Timestamp as the first column of output\&. The Timestamp column contains the elapsed time, in seconds, since the target JVM started\&. The resolution of the time stamp is dependent on various factors and is subject to variation due to delayed thread scheduling on heavily loaded systems\&.
rgallardb6435452013-11-25 20:19:02 -0800249.PP
rgallardf71f2512015-02-02 10:12:21 -0800250Use the interval and count parameters to determine how frequently and how many times, respectively, the
251\fBjstat\fR
252command displays its output\&.
253.PP
254\fBNote:\fR
255Do not to write scripts to parse the
256\fBjstat\fR
257command\*(Aqs output because the format might change in future releases\&. If you write scripts that parse
258\fBjstat\fR
259command output, then expect to modify them for future releases of this tool\&.
260.PP
261\-\fIstatOption\fR
262.RS 4
263Determines the statistics information the
264\fBjstat\fR
265command displays\&. The following lists the available options\&. Use the
266\fB\-options\fR
267general option to display the list of options for a particular platform installation\&. See Stat Options and Output\&.
268.sp
269\fBclass\fR: Displays statistics about the behavior of the class loader\&.
270.sp
271\fBcompiler\fR: Displays statistics about the behavior of the Java HotSpot VM Just\-in\-Time compiler\&.
272.sp
273\fBgc\fR: Displays statistics about the behavior of the garbage collected heap\&.
274.sp
275\fBgccapacity\fR: Displays statistics about the capacities of the generations and their corresponding spaces\&.
276.sp
277\fBgccause\fR: Displays a summary about garbage collection statistics (same as
278\fB\-gcutil\fR), with the cause of the last and current (when applicable) garbage collection events\&.
279.sp
280\fBgcnew\fR: Displays statistics of the behavior of the new generation\&.
281.sp
282\fBgcnewcapacity\fR: Displays statistics about the sizes of the new generations and its corresponding spaces\&.
283.sp
284\fBgcold\fR: Displays statistics about the behavior of the old generation and metaspace statistics\&.
285.sp
286\fBgcoldcapacity\fR: Displays statistics about the sizes of the old generation\&.
287.sp
288\fBgcmetacapacity\fR: Displays statistics about the sizes of the metaspace\&.
289.sp
290\fBgcutil\fR: Displays a summary about garbage collection statistics\&.
291.sp
292\fBprintcompilation\fR: Displays Java HotSpot VM compilation method statistics\&.
293.RE
294.PP
295\-h \fIn\fR
296.RS 4
297Displays a column header every
298\fIn\fR
299samples (output rows), where
300\fIn\fR
301is a positive integer\&. Default value is 0, which displays the column header the first row of data\&.
302.RE
303.PP
304\-t
305.RS 4
rgallard04b0ca42014-10-17 11:33:22 -0700306Displays a timestamp column as the first column of output\&. The time stamp is the time since the start time of the target JVM\&.
rgallardf71f2512015-02-02 10:12:21 -0800307.RE
308.PP
309\-J\fIjavaOption\fR
310.RS 4
311Passes
312\fBjavaOption\fR
313to the Java application launcher\&. For example,
314\fB\-J\-Xms48m\fR
315sets the startup memory to 48 MB\&. For a complete list of options, see
316java(1)\&.
317.RE
318.SS "Stat Options and Output"
319.PP
320The following information summarizes the columns that the
321\fBjstat\fR
322command outputs for each
323\fIstatOption\fR\&.
324.PP
325\-class \fIoption\fR
326.RS 4
rgallardb6435452013-11-25 20:19:02 -0800327Class loader statistics\&.
rgallardf71f2512015-02-02 10:12:21 -0800328.sp
329\fBLoaded\fR: Number of classes loaded\&.
330.sp
331\fBBytes\fR: Number of kBs loaded\&.
332.sp
333\fBUnloaded\fR: Number of classes unloaded\&.
334.sp
335\fBBytes\fR: Number of Kbytes unloaded\&.
336.sp
337\fBTime\fR: Time spent performing class loading and unloading operations\&.
338.RE
339.PP
340\-compiler \fIoption\fR
341.RS 4
342Java HotSpot VM Just\-in\-Time compiler statistics\&.
343.sp
344\fBCompiled\fR: Number of compilation tasks performed\&.
345.sp
346\fBFailed\fR: Number of compilations tasks failed\&.
347.sp
348\fBInvalid\fR: Number of compilation tasks that were invalidated\&.
349.sp
350\fBTime\fR: Time spent performing compilation tasks\&.
351.sp
352\fBFailedType\fR: Compile type of the last failed compilation\&.
353.sp
354\fBFailedMethod\fR: Class name and method of the last failed compilation\&.
355.RE
356.PP
357\-gc \fIoption\fR
358.RS 4
359Garbage\-collected heap statistics\&.
360.sp
361\fBS0C\fR: Current survivor space 0 capacity (kB)\&.
362.sp
363\fBS1C\fR: Current survivor space 1 capacity (kB)\&.
364.sp
365\fBS0U\fR: Survivor space 0 utilization (kB)\&.
366.sp
367\fBS1U\fR: Survivor space 1 utilization (kB)\&.
368.sp
369\fBEC\fR: Current eden space capacity (kB)\&.
370.sp
371\fBEU\fR: Eden space utilization (kB)\&.
372.sp
373\fBOC\fR: Current old space capacity (kB)\&.
374.sp
375\fBOU\fR: Old space utilization (kB)\&.
376.sp
377\fBMC\fR: Metaspace capacity (kB)\&.
378.sp
379\fBMU\fR: Metacspace utilization (kB)\&.
380.sp
381\fBCCSC\fR: Compressed class space capacity (kB)\&.
382.sp
383\fBCCSU\fR: Compressed class space used (kB)\&.
384.sp
385\fBYGC\fR: Number of young generation garbage collection events\&.
386.sp
387\fBYGCT\fR: Young generation garbage collection time\&.
388.sp
389\fBFGC\fR: Number of full GC events\&.
390.sp
391\fBFGCT\fR: Full garbage collection time\&.
392.sp
393\fBGCT\fR: Total garbage collection time\&.
394.RE
395.PP
396\-gccapacity \fIoption\fR
397.RS 4
rgallardb6435452013-11-25 20:19:02 -0800398Memory pool generation and space capacities\&.
rgallardf71f2512015-02-02 10:12:21 -0800399.sp
400\fBNGCMN\fR: Minimum new generation capacity (kB)\&.
401.sp
402\fBNGCMX\fR: Maximum new generation capacity (kB)\&.
403.sp
404\fBNGC\fR: Current new generation capacity (kB)\&.
405.sp
406\fBS0C\fR: Current survivor space 0 capacity (kB)\&.
407.sp
408\fBS1C\fR: Current survivor space 1 capacity (kB)\&.
409.sp
410\fBEC\fR: Current eden space capacity (kB)\&.
411.sp
412\fBOGCMN\fR: Minimum old generation capacity (kB)\&.
413.sp
414\fBOGCMX\fR: Maximum old generation capacity (kB)\&.
415.sp
416\fBOGC\fR: Current old generation capacity (kB)\&.
417.sp
418\fBOC\fR: Current old space capacity (kB)\&.
419.sp
420\fBMCMN\fR: Minimum metaspace capacity (kB)\&.
421.sp
422\fBMCMX\fR: Maximum metaspace capacity (kB)\&.
423.sp
424\fBMC\fR: Metaspace capacity (kB)\&.
425.sp
426\fBCCSMN\fR: Compressed class space minimum capacity (kB)\&.
427.sp
428\fBCCSMX\fR: Compressed class space maximum capacity (kB)\&.
429.sp
430\fBCCSC\fR: Compressed class space capacity (kB)\&.
431.sp
432\fBYGC\fR: Number of young generation GC events\&.
433.sp
434\fBFGC\fR: Number of full GC events\&.
435.RE
436.PP
437\-gccause \fIoption\fR
438.RS 4
439This option displays the same summary of garbage collection statistics as the
440\fB\-gcutil\fR
441option, but includes the causes of the last garbage collection event and (when applicable) the current garbage collection event\&. In addition to the columns listed for
442\fB\-gcutil\fR, this option adds the following columns\&.
443.sp
444\fBLGCC\fR: Cause of last garbage collection
445.sp
446\fBGCC\fR: Cause of current garbage collection
447.RE
448.PP
449\-gcnew \fIoption\fR
450.RS 4
rgallardb6435452013-11-25 20:19:02 -0800451New generation statistics\&.
rgallardf71f2512015-02-02 10:12:21 -0800452.sp
453\fBS0C\fR: Current survivor space 0 capacity (kB)\&.
454.sp
455\fBS1C\fR: Current survivor space 1 capacity (kB)\&.
456.sp
457\fBS0U\fR: Survivor space 0 utilization (kB)\&.
458.sp
459\fBS1U\fR: Survivor space 1 utilization (kB)\&.
460.sp
461\fBTT\fR: Tenuring threshold\&.
462.sp
463\fBMTT\fR: Maximum tenuring threshold\&.
464.sp
465\fBDSS\fR: Desired survivor size (kB)\&.
466.sp
467\fBEC\fR: Current eden space capacity (kB)\&.
468.sp
469\fBEU\fR: Eden space utilization (kB)\&.
470.sp
471\fBYGC\fR: Number of young generation GC events\&.
472.sp
473\fBYGCT\fR: Young generation garbage collection time\&.
474.RE
475.PP
476\-gcnewcapacity \fIoption\fR
477.RS 4
rgallardb6435452013-11-25 20:19:02 -0800478New generation space size statistics\&.
rgallardf71f2512015-02-02 10:12:21 -0800479.sp
480\fBNGCMN\fR: Minimum new generation capacity (kB)\&.
481.sp
482\fBNGCMX\fR: Maximum new generation capacity (kB)\&.
483.sp
484\fBNGC\fR: Current new generation capacity (kB)\&.
485.sp
486\fBS0CMX\fR: Maximum survivor space 0 capacity (kB)\&.
487.sp
488\fBS0C\fR: Current survivor space 0 capacity (kB)\&.
489.sp
490\fBS1CMX\fR: Maximum survivor space 1 capacity (kB)\&.
491.sp
492\fBS1C\fR: Current survivor space 1 capacity (kB)\&.
493.sp
494\fBECMX\fR: Maximum eden space capacity (kB)\&.
495.sp
496\fBEC\fR: Current eden space capacity (kB)\&.
497.sp
498\fBYGC\fR: Number of young generation GC events\&.
499.sp
500\fBFGC\fR: Number of full GC events\&.
501.RE
502.PP
503\-gcold \fIoption\fR
504.RS 4
505Old generation and metaspace behavior statistics\&.
506.sp
507\fBMC\fR: Metaspace capacity (kB)\&.
508.sp
509\fBMU\fR: Metaspace utilization (kB)\&.
510.sp
511\fBCCSC\fR: Compressed class space capacity (kB)\&.
512.sp
513\fBCCSU\fR: Compressed class space used (kB)\&.
514.sp
515\fBOC\fR: Current old space capacity (kB)\&.
516.sp
517\fBOU\fR: Old space utilization (kB)\&.
518.sp
519\fBYGC\fR: Number of young generation GC events\&.
520.sp
521\fBFGC\fR: Number of full GC events\&.
522.sp
523\fBFGCT\fR: Full garbage collection time\&.
524.sp
525\fBGCT\fR: Total garbage collection time\&.
526.RE
527.PP
528\-gcoldcapacity \fIoption\fR
529.RS 4
530Old generation size statistics\&.
531.sp
532\fBOGCMN\fR: Minimum old generation capacity (kB)\&.
533.sp
534\fBOGCMX\fR: Maximum old generation capacity (kB)\&.
535.sp
536\fBOGC\fR: Current old generation capacity (kB)\&.
537.sp
538\fBOC\fR: Current old space capacity (kB)\&.
539.sp
540\fBYGC\fR: Number of young generation GC events\&.
541.sp
542\fBFGC\fR: Number of full GC events\&.
543.sp
544\fBFGCT\fR: Full garbage collection time\&.
545.sp
546\fBGCT\fR: Total garbage collection time\&.
547.RE
548.PP
549\-gcmetacapacity \fIoption\fR
550.RS 4
551Metaspace size statistics\&.
552.sp
553\fBMCMN\fR: Minimum metaspace capacity (kB)\&.
554.sp
555\fBMCMX\fR: Maximum metaspace capacity (kB)\&.
556.sp
557\fBMC\fR: Metaspace capacity (kB)\&.
558.sp
559\fBCCSMN\fR: Compressed class space minimum capacity (kB)\&.
560.sp
561\fBCCSMX\fR: Compressed class space maximum capacity (kB)\&.
562.sp
563\fBYGC\fR: Number of young generation GC events\&.
564.sp
565\fBFGC\fR: Number of full GC events\&.
566.sp
567\fBFGCT\fR: Full garbage collection time\&.
568.sp
569\fBGCT\fR: Total garbage collection time\&.
570.RE
571.PP
572\-gcutil \fIoption\fR
573.RS 4
rgallardb6435452013-11-25 20:19:02 -0800574Summary of garbage collection statistics\&.
rgallardf71f2512015-02-02 10:12:21 -0800575.sp
576\fBS0\fR: Survivor space 0 utilization as a percentage of the space\*(Aqs current capacity\&.
577.sp
578\fBS1\fR: Survivor space 1 utilization as a percentage of the space\*(Aqs current capacity\&.
579.sp
580\fBE\fR: Eden space utilization as a percentage of the space\*(Aqs current capacity\&.
581.sp
582\fBO\fR: Old space utilization as a percentage of the space\*(Aqs current capacity\&.
583.sp
584\fBM\fR: Metaspace utilization as a percentage of the space\*(Aqs current capacity\&.
585.sp
586\fBCCS\fR: Compressed class space utilization as a percentage\&.
587.sp
588\fBYGC\fR: Number of young generation GC events\&.
589.sp
590\fBYGCT\fR: Young generation garbage collection time\&.
591.sp
592\fBFGC\fR: Number of full GC events\&.
593.sp
594\fBFGCT\fR: Full garbage collection time\&.
595.sp
596\fBGCT\fR: Total garbage collection time\&.
597.RE
598.PP
599\-printcompilation \fIoption\fR
600.RS 4
rgallardb6435452013-11-25 20:19:02 -0800601Java HotSpot VM compiler method statistics\&.
rgallardf71f2512015-02-02 10:12:21 -0800602.sp
603\fBCompiled\fR: Number of compilation tasks performed by the most recently compiled method\&.
604.sp
605\fBSize\fR: Number of bytes of byte code of the most recently compiled method\&.
606.sp
607\fBType\fR: Compilation type of the most recently compiled method\&.
608.sp
609\fBMethod\fR: Class name and method name identifying the most recently compiled method\&. Class name uses slash (/) instead of dot (\&.) as a name space separator\&. Method name is the method within the specified class\&. The format for these two fields is consistent with the HotSpot
610\fB\-XX:+PrintCompilation\fR
611option\&.
612.RE
613.SH "EXAMPLES"
614.PP
615This section presents some examples of monitoring a local JVM with an
616\fIlvmid\fR
617of 21891\&.
618.SS "The gcutil Option"
619.PP
620This example attaches to lvmid 21891 and takes 7 samples at 250 millisecond intervals and displays the output as specified by the \-\fBgcutil\fR
621option\&.
rgallardb6435452013-11-25 20:19:02 -0800622.PP
rgallard04b0ca42014-10-17 11:33:22 -0700623The output of this example shows that a young generation collection occurred between the third and fourth sample\&. The collection took 0\&.078 seconds and promoted objects from the eden space (E) to the old space (O), resulting in an increase of old space utilization from 66\&.80% to 68\&.19%\&. Before the collection, the survivor space was 97\&.02% utilized, but after this collection it is 91\&.03% utilized\&.
rgallardf71f2512015-02-02 10:12:21 -0800624.sp
625.if n \{\
626.RS 4
627.\}
628.nf
629\fBjstat \-gcutil 21891 250 7\fR
630\fB S0 S1 E O M CCS YGC YGCT FGC FGCT GCT \fR
631\fB 0\&.00 97\&.02 70\&.31 66\&.80 95\&.52 89\&.14 7 0\&.300 0 0\&.000 0\&.300\fR
632\fB 0\&.00 97\&.02 86\&.23 66\&.80 95\&.52 89\&.14 7 0\&.300 0 0\&.000 0\&.300\fR
633\fB 0\&.00 97\&.02 96\&.53 66\&.80 95\&.52 89\&.14 7 0\&.300 0 0\&.000 0\&.300\fR
634\fB 91\&.03 0\&.00 1\&.98 68\&.19 95\&.89 91\&.24 8 0\&.378 0 0\&.000 0\&.378\fR
635\fB 91\&.03 0\&.00 15\&.82 68\&.19 95\&.89 91\&.24 8 0\&.378 0 0\&.000 0\&.378\fR
636\fB 91\&.03 0\&.00 17\&.80 68\&.19 95\&.89 91\&.24 8 0\&.378 0 0\&.000 0\&.378\fR
637\fB 91\&.03 0\&.00 17\&.80 68\&.19 95\&.89 91\&.24 8 0\&.378 0 0\&.000 0\&.378\fR
638.fi
639.if n \{\
640.RE
641.\}
642.SS "Repeat the Column Header String"
643.PP
644This example attaches to lvmid 21891 and takes samples at 250 millisecond intervals and displays the output as specified by
645\fB\-gcnew\fR
646option\&. In addition, it uses the
647\fB\-h3\fR
648option to output the column header after every 3 lines of data\&.
rgallardb6435452013-11-25 20:19:02 -0800649.PP
650In addition to showing the repeating header string, this example shows that between the second and third samples, a young GC occurred\&. Its duration was 0\&.001 seconds\&. The collection found enough active data that the survivor space 0 utilization (S0U) would have exceeded the desired survivor Size (DSS)\&. As a result, objects were promoted to the old generation (not visible in this output), and the tenuring threshold (TT) was lowered from 31 to 2\&.
651.PP
652Another collection occurs between the fifth and sixth samples\&. This collection found very few survivors and returned the tenuring threshold to 31\&.
rgallardf71f2512015-02-02 10:12:21 -0800653.sp
654.if n \{\
655.RS 4
656.\}
657.nf
658\fBjstat \-gcnew \-h3 21891 250\fR
659\fB S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT\fR
660\fB 64\&.0 64\&.0 0\&.0 31\&.7 31 31 32\&.0 512\&.0 178\&.6 249 0\&.203\fR
661\fB 64\&.0 64\&.0 0\&.0 31\&.7 31 31 32\&.0 512\&.0 355\&.5 249 0\&.203\fR
662\fB 64\&.0 64\&.0 35\&.4 0\&.0 2 31 32\&.0 512\&.0 21\&.9 250 0\&.204\fR
663\fB S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT\fR
664\fB 64\&.0 64\&.0 35\&.4 0\&.0 2 31 32\&.0 512\&.0 245\&.9 250 0\&.204\fR
665\fB 64\&.0 64\&.0 35\&.4 0\&.0 2 31 32\&.0 512\&.0 421\&.1 250 0\&.204\fR
666\fB 64\&.0 64\&.0 0\&.0 19\&.0 31 31 32\&.0 512\&.0 84\&.4 251 0\&.204\fR
667\fB S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT\fR
668\fB 64\&.0 64\&.0 0\&.0 19\&.0 31 31 32\&.0 512\&.0 306\&.7 251 0\&.204\fR
669
670.fi
671.if n \{\
672.RE
673.\}
674.SS "Include a Time Stamp for Each Sample"
rgallardb6435452013-11-25 20:19:02 -0800675.PP
rgallardf71f2512015-02-02 10:12:21 -0800676This example attaches to lvmid 21891 and takes 3 samples at 250 millisecond intervals\&. The
677\fB\-t\fR
678option is used to generate a time stamp for each sample in the first column\&.
rgallardb6435452013-11-25 20:19:02 -0800679.PP
rgallardf71f2512015-02-02 10:12:21 -0800680The Timestamp column reports the elapsed time in seconds since the start of the target JVM\&. In addition, the
681\fB\-gcoldcapacity\fR
682output shows the old generation capacity (OGC) and the old space capacity (OC) increasing as the heap expands to meet allocation or promotion demands\&. The old generation capacity (OGC) has grown from 11,696 kB to 13,820 kB after the eighty\-first full garbage collection (FGC)\&. The maximum capacity of the generation (and space) is 60,544 kB (OGCMX), so it still has room to expand\&.
683.sp
684.if n \{\
685.RS 4
686.\}
687.nf
688\fBTimestamp OGCMN OGCMX OGC OC YGC FGC FGCT GCT\fR
689\fB 150\&.1 1408\&.0 60544\&.0 11696\&.0 11696\&.0 194 80 2\&.874 3\&.799\fR
690\fB 150\&.4 1408\&.0 60544\&.0 13820\&.0 13820\&.0 194 81 2\&.938 3\&.863\fR
691\fB 150\&.7 1408\&.0 60544\&.0 13820\&.0 13820\&.0 194 81 2\&.938 3\&.863\fR
692
693.fi
694.if n \{\
695.RE
696.\}
697.SS "Monitor Instrumentation for a Remote JVM"
698.PP
699This example attaches to lvmid 40496 on the system named remote\&.domain using the
700\fB\-gcutil\fR
701option, with samples taken every second indefinitely\&.
702.PP
703The lvmid is combined with the name of the remote host to construct a
704\fIvmid\fR
705of
706\fB40496@remote\&.domain\fR\&. This vmid results in the use of the
707\fBrmi\fR
708protocol to communicate to the default
709\fBjstatd\fR
710server on the remote host\&. The
711\fBjstatd\fR
712server is located using the
713\fBrmiregistry\fR
714command on
715\fBremote\&.domain\fR
716that is bound to the default port of the
717\fBrmiregistry\fR
718command (port 1099)\&.
719.sp
720.if n \{\
721.RS 4
722.\}
723.nf
724\fBjstat \-gcutil 40496@remote\&.domain 1000\fR
725\fB\fI\&.\&.\&. output omitted\fR\fR
726
727.fi
728.if n \{\
729.RE
730.\}
731.SH "SEE ALSO"
732.sp
733.RS 4
734.ie n \{\
735\h'-04'\(bu\h'+03'\c
736.\}
737.el \{\
738.sp -1
739.IP \(bu 2.3
740.\}
rgallardb6435452013-11-25 20:19:02 -0800741java(1)
rgallardf71f2512015-02-02 10:12:21 -0800742.RE
743.sp
744.RS 4
745.ie n \{\
746\h'-04'\(bu\h'+03'\c
747.\}
748.el \{\
749.sp -1
750.IP \(bu 2.3
751.\}
rgallardb6435452013-11-25 20:19:02 -0800752jps(1)
rgallardf71f2512015-02-02 10:12:21 -0800753.RE
754.sp
755.RS 4
756.ie n \{\
757\h'-04'\(bu\h'+03'\c
758.\}
759.el \{\
760.sp -1
761.IP \(bu 2.3
762.\}
rgallardb6435452013-11-25 20:19:02 -0800763jstatd(1)
rgallardf71f2512015-02-02 10:12:21 -0800764.RE
765.sp
766.RS 4
767.ie n \{\
768\h'-04'\(bu\h'+03'\c
769.\}
770.el \{\
771.sp -1
772.IP \(bu 2.3
773.\}
rgallardb6435452013-11-25 20:19:02 -0800774rmiregistry(1)
rgallardf71f2512015-02-02 10:12:21 -0800775.RE
776.br
777'pl 8.5i
778'bp