< prev index next >

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

Print this page


   1 .\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.

   2 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   3 .\"
   4 .\" This code is free software; you can redistribute it and/or modify it
   5 .\" under the terms of the GNU General Public License version 2 only, as
   6 .\" published by the Free Software Foundation.
   7 .\"
   8 .\" This code is distributed in the hope that it will be useful, but WITHOUT
   9 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10 .\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  11 .\" version 2 for more details (a copy is included in the LICENSE file that
  12 .\" accompanied this code).
  13 .\"
  14 .\" You should have received a copy of the GNU General Public License version
  15 .\" 2 along with this work; if not, write to the Free Software Foundation,
  16 .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  17 .\"
  18 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  19 .\" or visit www.oracle.com if you need additional information or have any
  20 .\" questions.
  21 .\"
  22 .\" Automatically generated by Pandoc 2.3.1







  23 .\"
  24 .TH "JSTAT" "1" "2018" "JDK 13" "JDK Commands"
  25 .hy
  26 .SH NAME
  27 .PP
  28 jstat \- monitor JVM statistics
  29 .SH SYNOPSIS
  30 .PP
  31 \f[B]Note:\f[R] This command is experimental\ and unsupported.
  32 .PP
  33 \f[CB]jstat\f[R] \f[I]generalOptions\f[R]
  34 .PP
  35 \f[CB]jstat\f[R] \f[I]outputOptions\f[R] [\f[CB]\-t\f[R]] [\f[CB]\-h\f[R]
  36 \f[I]lines\f[R]] \f[I]vmid\f[R] [\f[I]interval\f[R] [\f[I]count\f[R]]]
  37 .TP
  38 .B \f[I]generalOptions\f[R]
  39 A single general command\-line option.
  40 See \f[B]General Options\f[R].
  41 .RS
  42 .RE
  43 .TP
  44 .B \f[I]outputOptions\f[R]
  45 An option reported by the \f[CB]\-options\f[R] option.
  46 One or more output options that consist of a single \f[CB]statOption\f[R],
  47 plus any of the \f[CB]\-t\f[R], \f[CB]\-h\f[R], and \f[CB]\-J\f[R] options.
  48 See \f[B]Output Options for the jstat Command\f[R].
  49 .RS
  50 .RE
  51 .TP
  52 .B \f[CB]\-t\f[R]
  53 Displays a time\-stamp column as the first column of output.
  54 The time stamp is the time since the start time of the target JVM.
  55 .RS
  56 .RE
  57 .TP
  58 .B \f[CB]\-h\f[R] \f[I]n\f[R]
  59 Displays a column header every \f[I]n\f[R] samples (output rows), where
  60 \f[I]n\f[R] is a positive integer.
  61 The default value is \f[CB]0\f[R], which displays the column header of the
  62 first row of data.
  63 .RS
  64 .RE
  65 .TP
  66 .B \f[I]vmid\f[R]
  67 A virtual machine identifier, which is a string that indicates the
  68 target JVM.
  69 See \f[B]Virtual Machine Identifier\f[R].
  70 .RS
  71 .RE
  72 .TP
  73 .B \f[I]interval\f[R]
  74 The sampling interval in the specified units, seconds (s) or
  75 milliseconds (ms).
  76 Default units are milliseconds.
  77 This must be a positive integer.
  78 When specified, the \f[CB]jstat\f[R] command produces its output at each
  79 interval.
  80 .RS
  81 .RE
  82 .TP
  83 .B \f[I]count\f[R]
  84 The number of samples to display.
  85 The default value is infinity, which causes the \f[CB]jstat\f[R] command
  86 to display statistics until the target JVM terminates or the
  87 \f[CB]jstat\f[R] command is terminated.
  88 This value must be a positive integer.
  89 .RS
  90 .RE
  91 .SH DESCRIPTION
  92 .PP
  93 The \f[CB]jstat\f[R] command displays performance statistics for an
  94 instrumented Java HotSpot VM.
  95 The target JVM is identified by its virtual machine identifier, or
  96 \f[CB]vmid\f[R] option.
  97 .PP
  98 The \f[CB]jstat\f[R] command supports two types of options, general
  99 options and output options.
 100 General options cause the \f[CB]jstat\f[R] command to display simple usage
 101 and version information.
 102 Output options determine the content and format of the statistical
 103 output.
 104 .PP
 105 All options and their functionality are subject to change or removal in
 106 future releases.
 107 .SH GENERAL OPTIONS
 108 .PP
 109 If you specify one of the general options, then you can\[aq]t specify
 110 any other option or parameter.
 111 .TP
 112 .B \f[CB]\-help\f[R]
 113 Displays a help message.
 114 .RS
 115 .RE
 116 .TP
 117 .B \f[CB]\-options\f[R]
 118 Displays a list of static options.
 119 See \f[B]Output Options for the jstat Command\f[R].
 120 .RS
 121 .RE
 122 .SH OUTPUT OPTIONS FOR THE JSTAT COMMAND
 123 .PP
 124 If you don\[aq]t specify a general option, then you can specify output
 125 options.
 126 Output options determine the content and format of the \f[CB]jstat\f[R]
 127 command\[aq]s output, and consist of a single \f[CB]statOption\f[R], plus
 128 any of the other output options (\f[CB]\-h\f[R], \f[CB]\-t\f[R], and
 129 \f[CB]\-J\f[R]).
 130 The \f[CB]statOption\f[R] must come first.
 131 .PP
 132 Output is formatted as a table, with columns that are separated by
 133 spaces.
 134 A header row with titles describes the columns.
 135 Use the \f[CB]\-h\f[R] option to set the frequency at which the header is
 136 displayed.
 137 Column header names are consistent among the different options.
 138 In general, if two options provide a column with the same name, then the
 139 data source for the two columns is the same.
 140 .PP
 141 Use the \f[CB]\-t\f[R] option to display a time\-stamp column, labeled
 142 Timestamp as the first column of output.
 143 The Timestamp column contains the elapsed time, in seconds, since the
 144 target JVM started.
 145 The resolution of the time stamp is dependent on various factors and is
 146 subject to variation due to delayed thread scheduling on heavily loaded
 147 systems.
 148 .PP
 149 Use the interval and count parameters to determine how frequently and
 150 how many times, respectively, the \f[CB]jstat\f[R] command displays its
 151 output.
 152 .PP
 153 \f[B]Note:\f[R]
 154 .PP
 155 Don\[aq]t write scripts to parse the \f[CB]jstat\f[R] command\[aq]s output
 156 because the format might change in future releases.
 157 If you write scripts that parse the \f[CB]jstat\f[R] command output, then
 158 expect to modify them for future releases of this tool.
 159 .TP
 160 .B \f[CB]\-statOption\f[R]
 161 Determines the statistics information that the \f[CB]jstat\f[R] command
 162 displays.
 163 The following lists the available options.
 164 Use the \f[CB]\-options\f[R] general option to display the list of options
 165 for a particular platform installation.
 166 See \f[B]Stat Options and Output\f[R].
 167 .RS
 168 .PP
 169 \f[CB]class\f[R]: Displays statistics about the behavior of the class
 170 loader.
 171 .PP
 172 \f[CB]compiler\f[R]: Displays statistics about the behavior of the Java
 173 HotSpot VM Just\-in\-Time compiler.
 174 .PP
 175 \f[CB]gc\f[R]: Displays statistics about the behavior of the garbage
 176 collected heap.
 177 .PP
 178 \f[CB]gccapacity\f[R]: Displays statistics about the capacities of the
 179 generations and their corresponding spaces.
 180 .PP
 181 \f[CB]gccause\f[R]: Displays a summary about garbage collection statistics
 182 (same as \f[CB]\-gcutil\f[R]), with the cause of the last and current
 183 (when applicable) garbage collection events.
 184 .PP
 185 \f[CB]gcnew\f[R]: Displays statistics about the behavior of the new
 186 generation.
 187 .PP
 188 \f[CB]gcnewcapacity\f[R]: Displays statistics about the sizes of the new
 189 generations and their corresponding spaces.
 190 .PP
 191 \f[CB]gcold\f[R]: Displays statistics about the behavior of the old
 192 generation and metaspace statistics.
 193 .PP
 194 \f[CB]gcoldcapacity\f[R]: Displays statistics about the sizes of the old
 195 generation.
 196 .PP
 197 \f[CB]gcmetacapacity\f[R]: Displays statistics about the sizes of the
 198 metaspace.
 199 .PP
 200 \f[CB]gcutil\f[R]: Displays a summary about garbage collection statistics.
 201 .PP
 202 \f[CB]printcompilation\f[R]: Displays Java HotSpot VM compilation method
 203 statistics.
 204 .RE
 205 .TP
 206 .B \f[CB]\-J\f[R]\f[I]javaOption\f[R]
 207 Passes \f[I]javaOption\f[R] to the Java application launcher.
 208 For example, \f[CB]\-J\-Xms48m\f[R] sets the startup memory to 48 MB.
 209 For a complete list of options, see \f[B]java\f[R].
 210 .RS
 211 .RE
 212 .SH STAT OPTIONS AND OUTPUT
 213 .PP
 214 The following information summarizes the columns that the \f[CB]jstat\f[R]
 215 command outputs for each \f[I]statOption\f[R].
 216 .TP
 217 .B \f[CB]\-class\f[R] \f[I]option\f[R]
 218 Class loader statistics.
 219 .RS
 220 .PP
 221 \f[CB]Loaded\f[R]: Number of classes loaded.
 222 .PP
 223 \f[CB]Bytes\f[R]: Number of KB loaded.
 224 .PP
 225 \f[CB]Unloaded\f[R]: Number of classes unloaded.
 226 .PP
 227 \f[CB]Bytes\f[R]: Number of KB loaded.
 228 .PP
 229 \f[CB]Time\f[R]: Time spent performing class loading and unloading
 230 operations.
 231 .RE
 232 .TP
 233 .B \f[CB]\-compiler\f[R] \f[I]option\f[R]
 234 Java HotSpot VM Just\-in\-Time compiler statistics.
 235 .RS
 236 .PP
 237 \f[CB]Compiled\f[R]: Number of compilation tasks performed.
 238 .PP
 239 \f[CB]Failed\f[R]: Number of compilations tasks failed.
 240 .PP
 241 \f[CB]Invalid\f[R]: Number of compilation tasks that were invalidated.
 242 .PP
 243 \f[CB]Time\f[R]: Time spent performing compilation tasks.
 244 .PP
 245 \f[CB]FailedType\f[R]: Compile type of the last failed compilation.
 246 .PP
 247 \f[CB]FailedMethod\f[R]: Class name and method of the last failed
 248 compilation.
 249 .RE
 250 .TP
 251 .B \f[CB]\-gc\f[R] \f[I]option\f[R]
 252 Garbage collected heap statistics.
 253 .RS
 254 .PP
 255 \f[CB]S0C\f[R]: Current survivor space 0 capacity (KB).
 256 .PP
 257 \f[CB]S1C\f[R]: Current survivor space 1 capacity (KB).
 258 .PP
 259 \f[CB]S0U\f[R]: Survivor space 0 utilization (KB).
 260 .PP
 261 \f[CB]S1U\f[R]: Survivor space 1 utilization (KB).
 262 .PP
 263 \f[CB]EC\f[R]: Current eden space capacity (KB).
 264 .PP
 265 \f[CB]EU\f[R]: Eden space utilization (KB).
 266 .PP
 267 \f[CB]OC\f[R]: Current old space capacity (KB).
 268 .PP
 269 \f[CB]OU\f[R]: Old space utilization (KB).
 270 .PP
 271 \f[CB]MC\f[R]: Metaspace Committed Size (KB).
 272 .PP
 273 \f[CB]MU\f[R]: Metaspace utilization (KB).
 274 .PP
 275 \f[CB]CCSC\f[R]: Compressed class committed size (KB).
 276 .PP
 277 \f[CB]CCSU\f[R]: Compressed class space used (KB).
 278 .PP
 279 \f[CB]YGC\f[R]: Number of young generation garbage collection (GC) events.
 280 .PP
 281 \f[CB]YGCT\f[R]: Young generation garbage collection time.
 282 .PP
 283 \f[CB]FGC\f[R]: Number of full GC events.
 284 .PP
 285 \f[CB]FGCT\f[R]: Full garbage collection time.
 286 .PP
 287 \f[CB]GCT\f[R]: Total garbage collection time.
 288 .RE
 289 .TP
 290 .B \f[CB]\-gccapacity\f[R] \f[I]option\f[R]
 291 Memory pool generation and space capacities.
 292 .RS
 293 .PP
 294 \f[CB]NGCMN\f[R]: Minimum new generation capacity (KB).
 295 .PP
 296 \f[CB]NGCMX\f[R]: Maximum new generation capacity (KB).
 297 .PP
 298 \f[CB]NGC\f[R]: Current new generation capacity (KB).
 299 .PP
 300 \f[CB]S0C\f[R]: Current survivor space 0 capacity (KB).
 301 .PP
 302 \f[CB]S1C\f[R]: Current survivor space 1 capacity (KB).
 303 .PP
 304 \f[CB]EC\f[R]: Current eden space capacity (KB).
 305 .PP
 306 \f[CB]OGCMN\f[R]: Minimum old generation capacity (KB).
 307 .PP
 308 \f[CB]OGCMX\f[R]: Maximum old generation capacity (KB).
 309 .PP
 310 \f[CB]OGC\f[R]: Current old generation capacity (KB).
 311 .PP
 312 \f[CB]OC\f[R]: Current old space capacity (KB).
 313 .PP
 314 \f[CB]MCMN\f[R]: Minimum metaspace capacity (KB).
 315 .PP
 316 \f[CB]MCMX\f[R]: Maximum metaspace capacity (KB).
 317 .PP
 318 \f[CB]MC\f[R]: Metaspace Committed Size (KB).
 319 .PP
 320 \f[CB]CCSMN\f[R]: Compressed class space minimum capacity (KB).
 321 .PP
 322 \f[CB]CCSMX\f[R]: Compressed class space maximum capacity (KB).
 323 .PP
 324 \f[CB]CCSC\f[R]: Compressed class committed size (KB).
 325 .PP
 326 \f[CB]YGC\f[R]: Number of young generation GC events.
 327 .PP
 328 \f[CB]FGC\f[R]: Number of full GC events.
 329 .RE
 330 .TP
 331 .B \f[CB]\-gccause\f[R] \f[I]option\f[R]
 332 This option displays the same summary of garbage collection statistics
 333 as the \f[CB]\-gcutil\f[R] option, but includes the causes of the last
 334 garbage collection event and (when applicable), the current garbage
 335 collection event.
 336 In addition to the columns listed for \f[CB]\-gcutil\f[R], this option
 337 adds the following columns:
 338 .RS
 339 .PP
 340 \f[CB]LGCC\f[R]: Cause of last garbage collection
 341 .PP
 342 \f[CB]GCC\f[R]: Cause of current garbage collection
 343 .RE
 344 .TP
 345 .B \f[CB]\-gcnew\f[R] \f[I]option\f[R]
 346 New generation statistics.
 347 .RS
 348 .PP
 349 \f[CB]S0C\f[R]: Current survivor space 0 capacity (KB).
 350 .PP
 351 \f[CB]S1C\f[R]: Current survivor space 1 capacity (KB).
 352 .PP
 353 \f[CB]S0U\f[R]: Survivor space 0 utilization (KB).
 354 .PP
 355 \f[CB]S1U\f[R]: Survivor space 1 utilization (KB).
 356 .PP
 357 \f[CB]TT\f[R]: Tenuring threshold.
 358 .PP
 359 \f[CB]MTT\f[R]: Maximum tenuring threshold.
 360 .PP
 361 \f[CB]DSS\f[R]: Desired survivor size (KB).
 362 .PP
 363 \f[CB]EC\f[R]: Current eden space capacity (KB).
 364 .PP
 365 \f[CB]EU\f[R]: Eden space utilization (KB).
 366 .PP
 367 \f[CB]YGC\f[R]: Number of young generation GC events.
 368 .PP
 369 \f[CB]YGCT\f[R]: Young generation garbage collection time.
 370 .RE
 371 .TP
 372 .B \f[CB]\-gcnewcapacity\f[R] \f[I]option\f[R]
 373 New generation space size statistics.
 374 .RS
 375 .PP
 376 \f[CB]NGCMN\f[R]: Minimum new generation capacity (KB).
 377 .PP
 378 \f[CB]NGCMX\f[R]: Maximum new generation capacity (KB).
 379 .PP
 380 \f[CB]NGC\f[R]: Current new generation capacity (KB).
 381 .PP
 382 \f[CB]S0CMX\f[R]: Maximum survivor space 0 capacity (KB).
 383 .PP
 384 \f[CB]S0C\f[R]: Current survivor space 0 capacity (KB).
 385 .PP
 386 \f[CB]S1CMX\f[R]: Maximum survivor space 1 capacity (KB).
 387 .PP
 388 \f[CB]S1C\f[R]: Current survivor space 1 capacity (KB).
 389 .PP
 390 \f[CB]ECMX\f[R]: Maximum eden space capacity (KB).
 391 .PP
 392 \f[CB]EC\f[R]: Current eden space capacity (KB).
 393 .PP
 394 \f[CB]YGC\f[R]: Number of young generation GC events.
 395 .PP
 396 \f[CB]FGC\f[R]: Number of full GC events.
 397 .RE
 398 .TP
 399 .B \f[CB]\-gcold\f[R] \f[I]option\f[R]
 400 Old generation size statistics.
 401 .RS
 402 .PP
 403 \f[CB]MC\f[R]: Metaspace Committed Size (KB).
 404 .PP
 405 \f[CB]MU\f[R]: Metaspace utilization (KB).
 406 .PP
 407 \f[CB]CCSC\f[R]: Compressed class committed size (KB).
 408 .PP
 409 \f[CB]CCSU\f[R]: Compressed class space used (KB).
 410 .PP
 411 \f[CB]OC\f[R]: Current old space capacity (KB).
 412 .PP
 413 \f[CB]OU\f[R]: Old space utilization (KB).
 414 .PP
 415 \f[CB]YGC\f[R]: Number of young generation GC events.
 416 .PP
 417 \f[CB]FGC\f[R]: Number of full GC events.
 418 .PP
 419 \f[CB]FGCT\f[R]: Full garbage collection time.
 420 .PP
 421 \f[CB]GCT\f[R]: Total garbage collection time.
 422 .RE
 423 .TP
 424 .B \f[CB]\-gcoldcapacity\f[R] \f[I]option\f[R]
 425 Old generation statistics.
 426 .RS
 427 .PP
 428 \f[CB]OGCMN\f[R]: Minimum old generation capacity (KB).
 429 .PP
 430 \f[CB]OGCMX\f[R]: Maximum old generation capacity (KB).
 431 .PP
 432 \f[CB]OGC\f[R]: Current old generation capacity (KB).
 433 .PP
 434 \f[CB]OC\f[R]: Current old space capacity (KB).
 435 .PP
 436 \f[CB]YGC\f[R]: Number of young generation GC events.
 437 .PP
 438 \f[CB]FGC\f[R]: Number of full GC events.
 439 .PP
 440 \f[CB]FGCT\f[R]: Full garbage collection time.
 441 .PP
 442 \f[CB]GCT\f[R]: Total garbage collection time.
 443 .RE
 444 .TP
 445 .B \f[CB]\-gcmetacapacity\f[R] \f[I]option\f[R]
 446 Metaspace size statistics.
 447 .RS
 448 .PP
 449 \f[CB]MCMN\f[R]: Minimum metaspace capacity (KB).
 450 .PP
 451 \f[CB]MCMX\f[R]: Maximum metaspace capacity (KB).
 452 .PP
 453 \f[CB]MC\f[R]: Metaspace Committed Size (KB).
 454 .PP
 455 \f[CB]CCSMN\f[R]: Compressed class space minimum capacity (KB).
 456 .PP
 457 \f[CB]CCSMX\f[R]: Compressed class space maximum capacity (KB).
 458 .PP
 459 \f[CB]YGC\f[R]: Number of young generation GC events.
 460 .PP
 461 \f[CB]FGC\f[R]: Number of full GC events.
 462 .PP
 463 \f[CB]FGCT\f[R]: Full garbage collection time.
 464 .PP
 465 \f[CB]GCT\f[R]: Total garbage collection time.
 466 .RE
 467 .TP
 468 .B \f[CB]\-gcutil\f[R] \f[I]option\f[R]
 469 Summary of garbage collection statistics.
 470 .RS
 471 .PP
 472 \f[CB]S0\f[R]: Survivor space 0 utilization as a percentage of the
 473 space\[aq]s current capacity.
 474 .PP
 475 \f[CB]S1\f[R]: Survivor space 1 utilization as a percentage of the
 476 space\[aq]s current capacity.
 477 .PP
 478 \f[CB]E\f[R]: Eden space utilization as a percentage of the space\[aq]s
 479 current capacity.
 480 .PP
 481 \f[CB]O\f[R]: Old space utilization as a percentage of the space\[aq]s
 482 current capacity.
 483 .PP
 484 \f[CB]M\f[R]: Metaspace utilization as a percentage of the space\[aq]s
 485 current capacity.
 486 .PP
 487 \f[CB]CCS\f[R]: Compressed class space utilization as a percentage.
 488 .PP
 489 \f[CB]YGC\f[R]: Number of young generation GC events.
 490 .PP
 491 \f[CB]YGCT\f[R]: Young generation garbage collection time.
 492 .PP
 493 \f[CB]FGC\f[R]: Number of full GC events.
 494 .PP
 495 \f[CB]FGCT\f[R]: Full garbage collection time.
 496 .PP
 497 \f[CB]GCT\f[R]: Total garbage collection time.
 498 .RE
 499 .TP
 500 .B \f[CB]\-printcompilation\f[R] \f[I]option\f[R]
 501 Java HotSpot VM compiler method statistics.
 502 .RS
 503 .PP
 504 \f[CB]Compiled\f[R]: Number of compilation tasks performed by the most
 505 recently compiled method.
 506 .PP
 507 \f[CB]Size\f[R]: Number of bytes of byte code of the most recently
 508 compiled method.
 509 .PP
 510 \f[CB]Type\f[R]: Compilation type of the most recently compiled method.
 511 .PP
 512 \f[CB]Method\f[R]: Class name and method name identifying the most
 513 recently compiled method.
 514 Class name uses a slash (/) instead of a dot (.) as a name space
 515 separator.
 516 The method name is the method within the specified class.
 517 The format for these two fields is consistent with the HotSpot
 518 \f[CB]\-XX:+PrintCompilation\f[R] option.
 519 .RE
 520 .SH VIRTUAL MACHINE IDENTIFIER
 521 .PP
 522 The syntax of the \f[CB]vmid\f[R] string corresponds to the syntax of a
 523 URI:
 524 .RS
 525 .PP
 526 [\f[I]protocol\f[R]\f[CB]:\f[R]][\f[CB]//\f[R]]\f[I]lvmid\f[R][\f[CB]\@\f[R]\f[I]hostname\f[R][\f[CB]:\f[R]\f[I]port\f[R]][\f[CB]/\f[R]\f[I]servername\f[R]]





























 527 .RE
 528 .PP
 529 The syntax of the \f[CB]vmid\f[R] string corresponds to the syntax of a
 530 URI.
 531 The \f[CB]vmid\f[R] string can vary from a simple integer that represents
 532 a local JVM to a more complex construction that specifies a
 533 communications protocol, port number, and other implementation\-specific
 534 values.
 535 .TP
 536 .B \f[I]protocol\f[R]
 537 The communications protocol.
 538 If the \f[I]protocol\f[R] value is omitted and a host name isn\[aq]t
 539 specified, then the default protocol is a platform\-specific optimized
 540 local protocol.
 541 If the \f[I]protocol\f[R] value is omitted and a host name is specified,
 542 then the default protocol is \f[CB]rmi\f[R].
 543 .RS




























 544 .RE
 545 .TP
 546 .B \f[I]lvmid\f[R]
 547 The local virtual machine identifier for the target JVM.
 548 The \f[I]lvmid\f[R] is a platform\-specific value that uniquely
 549 identifies a JVM on a system.
 550 The \f[I]lvmid\f[R] is the only required component of a virtual machine
 551 identifier.
 552 The \f[I]lvmid\f[R] is typically, but not necessarily, the operating
 553 system\[aq]s process identifier for the target JVM process.
 554 You can use the \f[CB]jps\f[R] command to determine the \f[I]lvmid\f[R]
 555 provided the JVM processes is not running in a separate docker instance.
 556 You can also determine the \f[I]lvmid\f[R] on Oracle Solaris, Linux, and
 557 OS X platforms with the \f[CB]ps\f[R] command, and on Windows with the
 558 Windows Task Manager.
 559 .RS
 560 .PP
 561 \f[B]Note:\f[R] JDK 10 has added support for using the Attach API when
 562 attaching to Java processes running in a separate docker process.
 563 However, the \f[CB]jps\f[R] command will not list the JVM processes that
 564 are running in a separate docker instance.
 565 If you are trying to connect a Linux host with a Virtual Machine that is
 566 in a docker container, you must use tools such as \f[CB]ps\f[R] to look up
 567 the PID of the JVM.
 568 .RE
 569 .TP
 570 .B \f[I]hostname\f[R]
 571 A host name or IP address that indicates the target host.
 572 If the \f[I]hostname\f[R] value is omitted, then the target host is the
 573 local host.
 574 .RS
 575 .RE
 576 .TP
 577 .B \f[I]port\f[R]
 578 The default port for communicating with the remote server.
 579 If the \f[I]hostname\f[R] value is omitted or the \f[I]protocol\f[R] value
 580 specifies an optimized, local protocol, then the \f[I]port\f[R] value is
 581 ignored.
 582 Otherwise, treatment of the \f[I]port\f[R] parameter is
 583 implementation\-specific.
 584 For the default \f[CB]rmi\f[R] protocol, the port value indicates the port
 585 number for the \f[CB]rmiregistry\f[R] on the remote host.
 586 If the \f[I]port\f[R] value is omitted and the \f[I]protocol\f[R] value
 587 indicates \f[CB]rmi\f[R], then the default rmiregistry port (1099) is
 588 used.
 589 .RS
 590 .RE
 591 .TP
 592 .B \f[I]servername\f[R]
 593 The treatment of the \f[I]servername\f[R] parameter depends on
 594 implementation.
 595 For the optimized local protocol, this field is ignored.
 596 For the \f[CB]rmi\f[R] protocol, it represents the name of the RMI remote
 597 object on the remote host.
 598 .RS












































































































































































































































































































































































































































 599 .RE
 600 .SH EXAMPLES
 601 .PP
 602 This section presents some examples of monitoring a local JVM with an
 603 \f[I]lvmid\f[R] of 21891.
 604 .SH THE GCUTIL OPTION
 605 .PP
 606 This example attaches to lvmid 21891 and takes 7 samples at 250
 607 millisecond intervals and displays the output as specified by the
 608 \f[CB]\-gcutil\f[R] option.
 609 .PP
 610 The output of this example shows that a young generation collection
 611 occurred between the third and fourth sample.
 612 The collection took 0.078 seconds and promoted objects from the eden
 613 space (E) to the old space (O), resulting in an increase of old space
 614 utilization from 66.80% to 68.19%.
 615 Before the collection, the survivor space was 97.02% utilized, but after
 616 this collection it\[aq]s 91.03% utilized.
 617 .IP
 618 .nf
 619 \f[CB]
 620 jstat\ \-gcutil\ 21891\ 250\ 7
 621 \ \ S0\ \ \ \ \ S1\ \ \ \ \ E\ \ \ \ \ \ O\ \ \ \ \ \ M\ \ \ \ \ CCS\ \ \ \ YGC\ \ \ \ \ YGCT\ \ \ \ FGC\ \ \ \ FGCT\ \ \ \ \ GCT
 622 \ \ 0.00\ \ 97.02\ \ 70.31\ \ 66.80\ \ 95.52\ \ 89.14\ \ \ \ \ \ 7\ \ \ \ 0.300\ \ \ \ \ 0\ \ \ \ 0.000\ \ \ \ 0.300
 623 \ \ 0.00\ \ 97.02\ \ 86.23\ \ 66.80\ \ 95.52\ \ 89.14\ \ \ \ \ \ 7\ \ \ \ 0.300\ \ \ \ \ 0\ \ \ \ 0.000\ \ \ \ 0.300
 624 \ \ 0.00\ \ 97.02\ \ 96.53\ \ 66.80\ \ 95.52\ \ 89.14\ \ \ \ \ \ 7\ \ \ \ 0.300\ \ \ \ \ 0\ \ \ \ 0.000\ \ \ \ 0.300
 625 \ 91.03\ \ \ 0.00\ \ \ 1.98\ \ 68.19\ \ 95.89\ \ 91.24\ \ \ \ \ \ 8\ \ \ \ 0.378\ \ \ \ \ 0\ \ \ \ 0.000\ \ \ \ 0.378
 626 \ 91.03\ \ \ 0.00\ \ 15.82\ \ 68.19\ \ 95.89\ \ 91.24\ \ \ \ \ \ 8\ \ \ \ 0.378\ \ \ \ \ 0\ \ \ \ 0.000\ \ \ \ 0.378
 627 \ 91.03\ \ \ 0.00\ \ 17.80\ \ 68.19\ \ 95.89\ \ 91.24\ \ \ \ \ \ 8\ \ \ \ 0.378\ \ \ \ \ 0\ \ \ \ 0.000\ \ \ \ 0.378
 628 \ 91.03\ \ \ 0.00\ \ 17.80\ \ 68.19\ \ 95.89\ \ 91.24\ \ \ \ \ \ 8\ \ \ \ 0.378\ \ \ \ \ 0\ \ \ \ 0.000\ \ \ \ 0.378
 629 \f[R]
 630 .fi
 631 .SH REPEAT THE COLUMN HEADER STRING



 632 .PP
 633 This example attaches to lvmid 21891 and takes samples at 250
 634 millisecond intervals and displays the output as specified by
 635 \f[CB]\-gcnew\f[R] option.
 636 In addition, it uses the \f[CB]\-h3\f[R] option to output the column
 637 header after every 3 lines of data.
 638 .PP
 639 In addition to showing the repeating header string, this example shows
 640 that between the second and third samples, a young GC occurred.
 641 Its duration was 0.001 seconds.
 642 The collection found enough active data that the survivor space 0
 643 utilization (S0U) would have exceeded the desired survivor size (DSS).
 644 As a result, objects were promoted to the old generation (not visible in
 645 this output), and the tenuring threshold (TT) was lowered from 31 to 2.
 646 .PP
 647 Another collection occurs between the fifth and sixth samples.
 648 This collection found very few survivors and returned the tenuring
 649 threshold to 31.
 650 .IP
 651 .nf
 652 \f[CB]
 653 jstat\ \-gcnew\ \-h3\ 21891\ 250
 654 \ S0C\ \ \ \ S1C\ \ \ \ S0U\ \ \ \ S1U\ \ \ TT\ MTT\ \ DSS\ \ \ \ \ \ EC\ \ \ \ \ \ \ EU\ \ \ \ \ YGC\ \ \ \ \ YGCT
 655 \ \ 64.0\ \ \ 64.0\ \ \ \ 0.0\ \ \ 31.7\ 31\ \ 31\ \ \ 32.0\ \ \ \ 512.0\ \ \ \ 178.6\ \ \ \ 249\ \ \ \ 0.203
 656 \ \ 64.0\ \ \ 64.0\ \ \ \ 0.0\ \ \ 31.7\ 31\ \ 31\ \ \ 32.0\ \ \ \ 512.0\ \ \ \ 355.5\ \ \ \ 249\ \ \ \ 0.203
 657 \ \ 64.0\ \ \ 64.0\ \ \ 35.4\ \ \ \ 0.0\ \ 2\ \ 31\ \ \ 32.0\ \ \ \ 512.0\ \ \ \ \ 21.9\ \ \ \ 250\ \ \ \ 0.204
 658 \ S0C\ \ \ \ S1C\ \ \ \ S0U\ \ \ \ S1U\ \ \ TT\ MTT\ \ DSS\ \ \ \ \ \ EC\ \ \ \ \ \ \ EU\ \ \ \ \ YGC\ \ \ \ \ YGCT
 659 \ \ 64.0\ \ \ 64.0\ \ \ 35.4\ \ \ \ 0.0\ \ 2\ \ 31\ \ \ 32.0\ \ \ \ 512.0\ \ \ \ 245.9\ \ \ \ 250\ \ \ \ 0.204
 660 \ \ 64.0\ \ \ 64.0\ \ \ 35.4\ \ \ \ 0.0\ \ 2\ \ 31\ \ \ 32.0\ \ \ \ 512.0\ \ \ \ 421.1\ \ \ \ 250\ \ \ \ 0.204
 661 \ \ 64.0\ \ \ 64.0\ \ \ \ 0.0\ \ \ 19.0\ 31\ \ 31\ \ \ 32.0\ \ \ \ 512.0\ \ \ \ \ 84.4\ \ \ \ 251\ \ \ \ 0.204
 662 \ S0C\ \ \ \ S1C\ \ \ \ S0U\ \ \ \ S1U\ \ \ TT\ MTT\ \ DSS\ \ \ \ \ \ EC\ \ \ \ \ \ \ EU\ \ \ \ \ YGC\ \ \ \ \ YGCT
 663 \ \ 64.0\ \ \ 64.0\ \ \ \ 0.0\ \ \ 19.0\ 31\ \ 31\ \ \ 32.0\ \ \ \ 512.0\ \ \ \ 306.7\ \ \ \ 251\ \ \ \ 0.204
 664 \f[R]
 665 .fi
 666 .SH INCLUDE A TIME STAMP FOR EACH SAMPLE



 667 .PP
 668 This example attaches to lvmid 21891 and takes 3 samples at 250
 669 millisecond intervals.
 670 The \f[CB]\-t\f[R] option is used to generate a time stamp for each sample
 671 in the first column.
 672 .PP
 673 The Timestamp column reports the elapsed time in seconds since the start
 674 of the target JVM.
 675 In addition, the \f[CB]\-gcoldcapacity\f[R] output shows the old
 676 generation capacity (OGC) and the old space capacity (OC) increasing as
 677 the heap expands to meet allocation or promotion demands.
 678 The old generation capacity (OGC) has grown from 11,696 KB to 13,820 KB
 679 after the eighty\-first full garbage collection (FGC).
 680 The maximum capacity of the generation (and space) is 60,544 KB (OGCMX),
 681 so it still has room to expand.
 682 .IP
 683 .nf
 684 \f[CB]
 685 Timestamp\ \ \ \ \ \ OGCMN\ \ \ \ OGCMX\ \ \ \ \ OGC\ \ \ \ \ \ \ OC\ \ \ \ \ \ \ YGC\ \ \ FGC\ \ \ \ FGCT\ \ \ \ GCT
 686 \ \ \ \ \ \ \ \ \ \ 150.1\ \ \ 1408.0\ \ 60544.0\ \ 11696.0\ \ 11696.0\ \ \ 194\ \ \ \ 80\ \ \ \ 2.874\ \ \ 3.799
 687 \ \ \ \ \ \ \ \ \ \ 150.4\ \ \ 1408.0\ \ 60544.0\ \ 13820.0\ \ 13820.0\ \ \ 194\ \ \ \ 81\ \ \ \ 2.938\ \ \ 3.863
 688 \ \ \ \ \ \ \ \ \ \ 150.7\ \ \ 1408.0\ \ 60544.0\ \ 13820.0\ \ 13820.0\ \ \ 194\ \ \ \ 81\ \ \ \ 2.938\ \ \ 3.863
 689 \f[R]
 690 .fi
 691 .SH MONITOR INSTRUMENTATION FOR A REMOTE JVM



 692 .PP
 693 This example attaches to lvmid 40496 on the system named
 694 \f[CB]remote.domain\f[R] using the \f[CB]\-gcutil\f[R] option, with samples
 695 taken every second indefinitely.
 696 .PP
 697 The lvmid is combined with the name of the remote host to construct a
 698 vmid of \f[CB]40496\@remote.domain\f[R].
 699 This vmid results in the use of the \f[CB]rmi\f[R] protocol to communicate
 700 to the default \f[CB]jstatd\f[R] server on the remote host.
 701 The \f[CB]jstatd\f[R] server is located using the \f[CB]rmiregistry\f[R]
 702 command on \f[CB]remote.domain\f[R] that\[aq]s bound to the default port
 703 of the \f[CB]rmiregistry\f[R] command (port 1099).
 704 .IP












 705 .nf
 706 \f[CB]
 707 jstat\ \-gcutil\ 40496\@remote.domain\ 1000
 708 \&...\ output\ omitted
 709 \f[R]
 710 .fi



















































   1 '\" t
   2 .\" Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
   3 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 .\"
   5 .\" This code is free software; you can redistribute it and/or modify it
   6 .\" under the terms of the GNU General Public License version 2 only, as
   7 .\" published by the Free Software Foundation.
   8 .\"
   9 .\" This code is distributed in the hope that it will be useful, but WITHOUT
  10 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 .\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 .\" version 2 for more details (a copy is included in the LICENSE file that
  13 .\" accompanied this code).
  14 .\"
  15 .\" You should have received a copy of the GNU General Public License version
  16 .\" 2 along with this work; if not, write to the Free Software Foundation,
  17 .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 .\"
  19 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 .\" or visit www.oracle.com if you need additional information or have any
  21 .\" questions.
  22 .\"
  23 .\" Title: jstat
  24 .\" Language: English
  25 .\" Date: 03 March 2015
  26 .\" SectDesc: Monitoring Tools
  27 .\" Software: JDK 8
  28 .\" Arch: generic
  29 .\" Part Number: E38207-04
  30 .\" Doc ID: JSSON
  31 .\"
  32 .if n .pl 99999
  33 .TH "jstat" "1" "03 March 2015" "JDK 8" "Monitoring Tools"
  34 .\" -----------------------------------------------------------------
  35 .\" * Define some portability stuff
  36 .\" -----------------------------------------------------------------
  37 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  38 .\" http://bugs.debian.org/507673
  39 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  40 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  41 .ie \n(.g .ds Aq \(aq
  42 .el       .ds Aq '
  43 .\" -----------------------------------------------------------------
  44 .\" * set default formatting
  45 .\" -----------------------------------------------------------------
  46 .\" disable hyphenation
  47 .nh
  48 .\" disable justification (adjust text to left margin only)
  49 .ad l
  50 .\" -----------------------------------------------------------------
  51 .\" * MAIN CONTENT STARTS HERE *
  52 .\" -----------------------------------------------------------------
  53 .SH "NAME"
  54 jstat \- Monitors Java Virtual Machine (JVM) statistics\&. This command is experimental and unsupported\&.
  55 .SH "SYNOPSIS"
  56 .sp
  57 .if n \{\
  58 .RS 4
  59 .\}
  60 .nf
  61 \fBjstat\fR [ \fIgeneralOption\fR | \fIoutputOptions vmid\fR [ \fIinterval\fR[s|ms] [ \fIcount \fR] ]
  62 .fi
  63 .if n \{\















































































































































































































































































































































































































































































  64 .RE
  65 .\}




  66 .PP
  67 \fIgeneralOption\fR
  68 .RS 4
  69 A single general command\-line option
  70 \fB\-help\fR
  71 or
  72 \fB\-options\fR\&. See General Options\&.
  73 .RE
  74 .PP
  75 \fIoutputOptions\fR
  76 .RS 4
  77 One or more output options that consist of a single
  78 \fBstatOption\fR, plus any of the
  79 \fB\-t\fR,
  80 \fB\-h\fR, and
  81 \fB\-J\fR
  82 options\&. See Output Options\&.
  83 .RE
  84 .PP
  85 \fIvmid\fR
  86 .RS 4
  87 Virtual machine identifier, which is a string that indicates the target JVM\&. The general syntax is the following:
  88 .sp
  89 .if n \{\
  90 .RS 4
  91 .\}
  92 .nf
  93 \fB[protocol:][//]lvmid[@hostname[:port]/servername]\fR
  94  
  95 .fi
  96 .if n \{\
  97 .RE
  98 .\}
  99 The syntax of the
 100 \fBvmid\fR
 101 string corresponds to the syntax of a URI\&. The
 102 \fBvmid\fR
 103 string 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\&.
 104 .RE
 105 .PP
 106 \fIinterval\fR [s|ms]
 107 .RS 4
 108 Sampling interval in the specified units, seconds (s) or milliseconds (ms)\&. Default units are milliseconds\&. Must be a positive integer\&. When specified, the
 109 \fBjstat\fR
 110 command produces its output at each interval\&.
 111 .RE
 112 .PP
 113 \fIcount\fR
 114 .RS 4
 115 Number of samples to display\&. The default value is infinity which causes the
 116 \fBjstat\fR
 117 command to display statistics until the target JVM terminates or the
 118 \fBjstat\fR
 119 command is terminated\&. This value must be a positive integer\&.
 120 .RE
 121 .SH "DESCRIPTION"
 122 .PP
 123 The
 124 \fBjstat\fR
 125 command displays performance statistics for an instrumented Java HotSpot VM\&. The target JVM is identified by its virtual machine identifier, or
 126 \fBvmid\fR
 127 option\&.
 128 .SH "VIRTUAL MACHINE IDENTIFIER"
 129 .PP
 130 The syntax of the
 131 \fBvmid\fR
 132 string corresponds to the syntax of a URI:
 133 .sp
 134 .if n \{\
 135 .RS 4
 136 .\}
 137 .nf
 138 \fB[protocol:][//]lvmid[@hostname[:port]/servername]\fR
 139  
 140 .fi
 141 .if n \{\
 142 .RE
 143 .\}














 144 .PP
 145 \fIprotocol\fR
 146 .RS 4
 147 The communications protocol\&. If the
 148 \fIprotocol\fR
 149 value is omitted and a host name is not specified, then the default protocol is a platform\-specific optimized local protocol\&. If the
 150 \fIprotocol\fR
 151 value is omitted and a host name is specified, then the default protocol is
 152 \fBrmi\fR\&.
 153 .RE
 154 .PP
 155 \fIlvmid\fR
 156 .RS 4
 157 The local virtual machine identifier for the target JVM\&. The
 158 \fBlvmid\fR
 159 is a platform\-specific value that uniquely identifies a JVM on a system\&. The
 160 \fBlvmid\fR
 161 is the only required component of a virtual machine identifier\&. The
 162 \fBlvmid\fR
 163 is typically, but not necessarily, the operating system\*(Aqs process identifier for the target JVM process\&. You can use the
 164 \fBjps\fR
 165 command to determine the
 166 \fBlvmid\fR\&. Also, you can determine the
 167 \fBlvmid\fR
 168 on Solaris, Linux, and OS X platforms with the
 169 \fBps\fR
 170 command, and on Windows with the Windows Task Manager\&.
 171 .RE
 172 .PP
 173 \fIhostname\fR
 174 .RS 4
 175 A hostname or IP address that indicates the target host\&. If the
 176 \fIhostname\fR
 177 value is omitted, then the target host is the local host\&.
 178 .RE
 179 .PP
 180 \fIport\fR
 181 .RS 4
 182 The default port for communicating with the remote server\&. If the
 183 \fIhostname\fR
 184 value is omitted or the
 185 \fIprotocol\fR
 186 value specifies an optimized, local protocol, then the
 187 \fIport\fR
 188 value is ignored\&. Otherwise, treatment of the
 189 \fBport\fR
 190 parameter is implementation\-specific\&. For the default
 191 \fBrmi\fR
 192 protocol, the port value indicates the port number for the rmiregistry on the remote host\&. If the
 193 \fIport\fR
 194 value is omitted and the
 195 \fIprotocol\fR
 196 value indicates
 197 \fBrmi\fR, then the default rmiregistry port (1099) is used\&.
 198 .RE
 199 .PP
 200 \fIservername\fR
 201 .RS 4
 202 The treatment of the
 203 \fBservername\fR
 204 parameter depends on implementation\&. For the optimized local protocol, this field is ignored\&. For the
 205 \fBrmi\fR
 206 protocol, it represents the name of the RMI remote object on the remote host\&.
 207 .RE
 208 .SH "OPTIONS"
 209 .PP
 210 The
 211 \fBjstat\fR
 212 command supports two types of options, general options and output options\&. General options cause the
 213 \fBjstat\fR
 214 command to display simple usage and version information\&. Output options determine the content and format of the statistical output\&.
 215 .PP
 216 All options and their functionality are subject to change or removal in future releases\&.
 217 .SS "General Options"
 218 .PP
 219 If you specify one of the general options, then you cannot specify any other option or parameter\&.
 220 .PP
 221 \-help
 222 .RS 4
 223 Displays a help message\&.
 224 .RE
 225 .PP
 226 \-options
 227 .RS 4
 228 Displays a list of static options\&. See Output Options\&.
 229 .RE
 230 .SS "Output Options"
 231 .PP
 232 If you do not specify a general option, then you can specify output options\&. Output options determine the content and format of the
 233 \fBjstat\fR
 234 command\*(Aqs output, and consist of a single
 235 \fBstatOption\fR, plus any of the other output options (\fB\-h\fR,
 236 \fB\-t\fR, and
 237 \fB\-J\fR)\&. The
 238 \fBstatOption\fR
 239 must come first\&.
 240 .PP
 241 Output is formatted as a table, with columns that are separated by spaces\&. A header row with titles describes the columns\&. Use the
 242 \fB\-h\fR
 243 option 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\&.
 244 .PP
 245 Use the
 246 \fB\-t\fR
 247 option 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\&.
 248 .PP
 249 Use the interval and count parameters to determine how frequently and how many times, respectively, the
 250 \fBjstat\fR
 251 command displays its output\&.
 252 .PP
 253 \fBNote:\fR
 254 Do not to write scripts to parse the
 255 \fBjstat\fR
 256 command\*(Aqs output because the format might change in future releases\&. If you write scripts that parse
 257 \fBjstat\fR
 258 command output, then expect to modify them for future releases of this tool\&.
 259 .PP
 260 \-\fIstatOption\fR
 261 .RS 4
 262 Determines the statistics information the
 263 \fBjstat\fR
 264 command displays\&. The following lists the available options\&. Use the
 265 \fB\-options\fR
 266 general option to display the list of options for a particular platform installation\&. See Stat Options and Output\&.
 267 .sp
 268 \fBclass\fR: Displays statistics about the behavior of the class loader\&.
 269 .sp
 270 \fBcompiler\fR: Displays statistics about the behavior of the Java HotSpot VM Just\-in\-Time compiler\&.
 271 .sp
 272 \fBgc\fR: Displays statistics about the behavior of the garbage collected heap\&.
 273 .sp
 274 \fBgccapacity\fR: Displays statistics about the capacities of the generations and their corresponding spaces\&.
 275 .sp
 276 \fBgccause\fR: Displays a summary about garbage collection statistics (same as
 277 \fB\-gcutil\fR), with the cause of the last and current (when applicable) garbage collection events\&.
 278 .sp
 279 \fBgcnew\fR: Displays statistics of the behavior of the new generation\&.
 280 .sp
 281 \fBgcnewcapacity\fR: Displays statistics about the sizes of the new generations and its corresponding spaces\&.
 282 .sp
 283 \fBgcold\fR: Displays statistics about the behavior of the old generation and metaspace statistics\&.
 284 .sp
 285 \fBgcoldcapacity\fR: Displays statistics about the sizes of the old generation\&.
 286 .sp
 287 \fBgcmetacapacity\fR: Displays statistics about the sizes of the metaspace\&.
 288 .sp
 289 \fBgcutil\fR: Displays a summary about garbage collection statistics\&.
 290 .sp
 291 \fBprintcompilation\fR: Displays Java HotSpot VM compilation method statistics\&.
 292 .RE
 293 .PP
 294 \-h \fIn\fR
 295 .RS 4
 296 Displays a column header every
 297 \fIn\fR
 298 samples (output rows), where
 299 \fIn\fR
 300 is a positive integer\&. Default value is 0, which displays the column header the first row of data\&.
 301 .RE
 302 .PP
 303 \-t
 304 .RS 4
 305 Displays a timestamp column as the first column of output\&. The time stamp is the time since the start time of the target JVM\&.
 306 .RE
 307 .PP
 308 \-J\fIjavaOption\fR
 309 .RS 4
 310 Passes
 311 \fBjavaOption\fR
 312 to the Java application launcher\&. For example,
 313 \fB\-J\-Xms48m\fR
 314 sets the startup memory to 48 MB\&. For a complete list of options, see
 315 java(1)\&.
 316 .RE
 317 .SS "Stat Options and Output"
 318 .PP
 319 The following information summarizes the columns that the
 320 \fBjstat\fR
 321 command outputs for each
 322 \fIstatOption\fR\&.
 323 .PP
 324 \-class \fIoption\fR
 325 .RS 4
 326 Class loader statistics\&.
 327 .sp
 328 \fBLoaded\fR: Number of classes loaded\&.
 329 .sp
 330 \fBBytes\fR: Number of kBs loaded\&.
 331 .sp
 332 \fBUnloaded\fR: Number of classes unloaded\&.
 333 .sp
 334 \fBBytes\fR: Number of Kbytes unloaded\&.
 335 .sp
 336 \fBTime\fR: Time spent performing class loading and unloading operations\&.
 337 .RE
 338 .PP
 339 \-compiler \fIoption\fR
 340 .RS 4
 341 Java HotSpot VM Just\-in\-Time compiler statistics\&.
 342 .sp
 343 \fBCompiled\fR: Number of compilation tasks performed\&.
 344 .sp
 345 \fBFailed\fR: Number of compilations tasks failed\&.
 346 .sp
 347 \fBInvalid\fR: Number of compilation tasks that were invalidated\&.
 348 .sp
 349 \fBTime\fR: Time spent performing compilation tasks\&.
 350 .sp
 351 \fBFailedType\fR: Compile type of the last failed compilation\&.
 352 .sp
 353 \fBFailedMethod\fR: Class name and method of the last failed compilation\&.
 354 .RE
 355 .PP
 356 \-gc \fIoption\fR
 357 .RS 4
 358 Garbage\-collected heap statistics\&.
 359 .sp
 360 \fBS0C\fR: Current survivor space 0 capacity (kB)\&.
 361 .sp
 362 \fBS1C\fR: Current survivor space 1 capacity (kB)\&.
 363 .sp
 364 \fBS0U\fR: Survivor space 0 utilization (kB)\&.
 365 .sp
 366 \fBS1U\fR: Survivor space 1 utilization (kB)\&.
 367 .sp
 368 \fBEC\fR: Current eden space capacity (kB)\&.
 369 .sp
 370 \fBEU\fR: Eden space utilization (kB)\&.
 371 .sp
 372 \fBOC\fR: Current old space capacity (kB)\&.
 373 .sp
 374 \fBOU\fR: Old space utilization (kB)\&.
 375 .sp
 376 \fBMC\fR: Metaspace capacity (kB)\&.
 377 .sp
 378 \fBMU\fR: Metacspace utilization (kB)\&.
 379 .sp
 380 \fBCCSC\fR: Compressed class space capacity (kB)\&.
 381 .sp
 382 \fBCCSU\fR: Compressed class space used (kB)\&.
 383 .sp
 384 \fBYGC\fR: Number of young generation garbage collection events\&.
 385 .sp
 386 \fBYGCT\fR: Young generation garbage collection time\&.
 387 .sp
 388 \fBFGC\fR: Number of full GC events\&.
 389 .sp
 390 \fBFGCT\fR: Full garbage collection time\&.
 391 .sp
 392 \fBGCT\fR: Total garbage collection time\&.
 393 .RE
 394 .PP
 395 \-gccapacity \fIoption\fR
 396 .RS 4
 397 Memory pool generation and space capacities\&.
 398 .sp
 399 \fBNGCMN\fR: Minimum new generation capacity (kB)\&.
 400 .sp
 401 \fBNGCMX\fR: Maximum new generation capacity (kB)\&.
 402 .sp
 403 \fBNGC\fR: Current new generation capacity (kB)\&.
 404 .sp
 405 \fBS0C\fR: Current survivor space 0 capacity (kB)\&.
 406 .sp
 407 \fBS1C\fR: Current survivor space 1 capacity (kB)\&.
 408 .sp
 409 \fBEC\fR: Current eden space capacity (kB)\&.
 410 .sp
 411 \fBOGCMN\fR: Minimum old generation capacity (kB)\&.
 412 .sp
 413 \fBOGCMX\fR: Maximum old generation capacity (kB)\&.
 414 .sp
 415 \fBOGC\fR: Current old generation capacity (kB)\&.
 416 .sp
 417 \fBOC\fR: Current old space capacity (kB)\&.
 418 .sp
 419 \fBMCMN\fR: Minimum metaspace capacity (kB)\&.
 420 .sp
 421 \fBMCMX\fR: Maximum metaspace capacity (kB)\&.
 422 .sp
 423 \fBMC\fR: Metaspace capacity (kB)\&.
 424 .sp
 425 \fBCCSMN\fR: Compressed class space minimum capacity (kB)\&.
 426 .sp
 427 \fBCCSMX\fR: Compressed class space maximum capacity (kB)\&.
 428 .sp
 429 \fBCCSC\fR: Compressed class space capacity (kB)\&.
 430 .sp
 431 \fBYGC\fR: Number of young generation GC events\&.
 432 .sp
 433 \fBFGC\fR: Number of full GC events\&.
 434 .RE
 435 .PP
 436 \-gccause \fIoption\fR
 437 .RS 4
 438 This option displays the same summary of garbage collection statistics as the
 439 \fB\-gcutil\fR
 440 option, 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
 441 \fB\-gcutil\fR, this option adds the following columns\&.
 442 .sp
 443 \fBLGCC\fR: Cause of last garbage collection
 444 .sp
 445 \fBGCC\fR: Cause of current garbage collection
 446 .RE
 447 .PP
 448 \-gcnew \fIoption\fR
 449 .RS 4
 450 New generation statistics\&.
 451 .sp
 452 \fBS0C\fR: Current survivor space 0 capacity (kB)\&.
 453 .sp
 454 \fBS1C\fR: Current survivor space 1 capacity (kB)\&.
 455 .sp
 456 \fBS0U\fR: Survivor space 0 utilization (kB)\&.
 457 .sp
 458 \fBS1U\fR: Survivor space 1 utilization (kB)\&.
 459 .sp
 460 \fBTT\fR: Tenuring threshold\&.
 461 .sp
 462 \fBMTT\fR: Maximum tenuring threshold\&.
 463 .sp
 464 \fBDSS\fR: Desired survivor size (kB)\&.
 465 .sp
 466 \fBEC\fR: Current eden space capacity (kB)\&.
 467 .sp
 468 \fBEU\fR: Eden space utilization (kB)\&.
 469 .sp
 470 \fBYGC\fR: Number of young generation GC events\&.
 471 .sp
 472 \fBYGCT\fR: Young generation garbage collection time\&.
 473 .RE
 474 .PP
 475 \-gcnewcapacity \fIoption\fR
 476 .RS 4
 477 New generation space size statistics\&.
 478 .sp
 479 \fBNGCMN\fR: Minimum new generation capacity (kB)\&.
 480 .sp
 481 \fBNGCMX\fR: Maximum new generation capacity (kB)\&.
 482 .sp
 483 \fBNGC\fR: Current new generation capacity (kB)\&.
 484 .sp
 485 \fBS0CMX\fR: Maximum survivor space 0 capacity (kB)\&.
 486 .sp
 487 \fBS0C\fR: Current survivor space 0 capacity (kB)\&.
 488 .sp
 489 \fBS1CMX\fR: Maximum survivor space 1 capacity (kB)\&.
 490 .sp
 491 \fBS1C\fR: Current survivor space 1 capacity (kB)\&.
 492 .sp
 493 \fBECMX\fR: Maximum eden space capacity (kB)\&.
 494 .sp
 495 \fBEC\fR: Current eden space capacity (kB)\&.
 496 .sp
 497 \fBYGC\fR: Number of young generation GC events\&.
 498 .sp
 499 \fBFGC\fR: Number of full GC events\&.
 500 .RE
 501 .PP
 502 \-gcold \fIoption\fR
 503 .RS 4
 504 Old generation and metaspace behavior statistics\&.
 505 .sp
 506 \fBMC\fR: Metaspace capacity (kB)\&.
 507 .sp
 508 \fBMU\fR: Metaspace utilization (kB)\&.
 509 .sp
 510 \fBCCSC\fR: Compressed class space capacity (kB)\&.
 511 .sp
 512 \fBCCSU\fR: Compressed class space used (kB)\&.
 513 .sp
 514 \fBOC\fR: Current old space capacity (kB)\&.
 515 .sp
 516 \fBOU\fR: Old space utilization (kB)\&.
 517 .sp
 518 \fBYGC\fR: Number of young generation GC events\&.
 519 .sp
 520 \fBFGC\fR: Number of full GC events\&.
 521 .sp
 522 \fBFGCT\fR: Full garbage collection time\&.
 523 .sp
 524 \fBGCT\fR: Total garbage collection time\&.
 525 .RE
 526 .PP
 527 \-gcoldcapacity \fIoption\fR
 528 .RS 4
 529 Old generation size statistics\&.
 530 .sp
 531 \fBOGCMN\fR: Minimum old generation capacity (kB)\&.
 532 .sp
 533 \fBOGCMX\fR: Maximum old generation capacity (kB)\&.
 534 .sp
 535 \fBOGC\fR: Current old generation capacity (kB)\&.
 536 .sp
 537 \fBOC\fR: Current old space capacity (kB)\&.
 538 .sp
 539 \fBYGC\fR: Number of young generation GC events\&.
 540 .sp
 541 \fBFGC\fR: Number of full GC events\&.
 542 .sp
 543 \fBFGCT\fR: Full garbage collection time\&.
 544 .sp
 545 \fBGCT\fR: Total garbage collection time\&.
 546 .RE
 547 .PP
 548 \-gcmetacapacity \fIoption\fR
 549 .RS 4
 550 Metaspace size statistics\&.
 551 .sp
 552 \fBMCMN\fR: Minimum metaspace capacity (kB)\&.
 553 .sp
 554 \fBMCMX\fR: Maximum metaspace capacity (kB)\&.
 555 .sp
 556 \fBMC\fR: Metaspace capacity (kB)\&.
 557 .sp
 558 \fBCCSMN\fR: Compressed class space minimum capacity (kB)\&.
 559 .sp
 560 \fBCCSMX\fR: Compressed class space maximum capacity (kB)\&.
 561 .sp
 562 \fBYGC\fR: Number of young generation GC events\&.
 563 .sp
 564 \fBFGC\fR: Number of full GC events\&.
 565 .sp
 566 \fBFGCT\fR: Full garbage collection time\&.
 567 .sp
 568 \fBGCT\fR: Total garbage collection time\&.
 569 .RE
 570 .PP
 571 \-gcutil \fIoption\fR
 572 .RS 4
 573 Summary of garbage collection statistics\&.
 574 .sp
 575 \fBS0\fR: Survivor space 0 utilization as a percentage of the space\*(Aqs current capacity\&.
 576 .sp
 577 \fBS1\fR: Survivor space 1 utilization as a percentage of the space\*(Aqs current capacity\&.
 578 .sp
 579 \fBE\fR: Eden space utilization as a percentage of the space\*(Aqs current capacity\&.
 580 .sp
 581 \fBO\fR: Old space utilization as a percentage of the space\*(Aqs current capacity\&.
 582 .sp
 583 \fBM\fR: Metaspace utilization as a percentage of the space\*(Aqs current capacity\&.
 584 .sp
 585 \fBCCS\fR: Compressed class space utilization as a percentage\&.
 586 .sp
 587 \fBYGC\fR: Number of young generation GC events\&.
 588 .sp
 589 \fBYGCT\fR: Young generation garbage collection time\&.
 590 .sp
 591 \fBFGC\fR: Number of full GC events\&.
 592 .sp
 593 \fBFGCT\fR: Full garbage collection time\&.
 594 .sp
 595 \fBGCT\fR: Total garbage collection time\&.
 596 .RE
 597 .PP
 598 \-printcompilation \fIoption\fR
 599 .RS 4
 600 Java HotSpot VM compiler method statistics\&.
 601 .sp
 602 \fBCompiled\fR: Number of compilation tasks performed by the most recently compiled method\&.
 603 .sp
 604 \fBSize\fR: Number of bytes of byte code of the most recently compiled method\&.
 605 .sp
 606 \fBType\fR: Compilation type of the most recently compiled method\&.
 607 .sp
 608 \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
 609 \fB\-XX:+PrintCompilation\fR
 610 option\&.
 611 .RE
 612 .SH "EXAMPLES"
 613 .PP
 614 This section presents some examples of monitoring a local JVM with an
 615 \fIlvmid\fR
 616 of 21891\&.
 617 .SS "The gcutil Option"
 618 .PP
 619 This example attaches to lvmid 21891 and takes 7 samples at 250 millisecond intervals and displays the output as specified by the \-\fBgcutil\fR
 620 option\&.
 621 .PP
 622 The 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\&.
 623 .sp
 624 .if n \{\
 625 .RS 4
 626 .\}



 627 .nf
 628 \fBjstat \-gcutil 21891 250 7\fR
 629 \fB  S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT   \fR
 630 \fB  0\&.00  97\&.02  70\&.31  66\&.80  95\&.52  89\&.14      7    0\&.300     0    0\&.000    0\&.300\fR
 631 \fB  0\&.00  97\&.02  86\&.23  66\&.80  95\&.52  89\&.14      7    0\&.300     0    0\&.000    0\&.300\fR
 632 \fB  0\&.00  97\&.02  96\&.53  66\&.80  95\&.52  89\&.14      7    0\&.300     0    0\&.000    0\&.300\fR
 633 \fB 91\&.03   0\&.00   1\&.98  68\&.19  95\&.89  91\&.24      8    0\&.378     0    0\&.000    0\&.378\fR
 634 \fB 91\&.03   0\&.00  15\&.82  68\&.19  95\&.89  91\&.24      8    0\&.378     0    0\&.000    0\&.378\fR
 635 \fB 91\&.03   0\&.00  17\&.80  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 .fi
 638 .if n \{\
 639 .RE
 640 .\}
 641 .SS "Repeat the Column Header String"
 642 .PP
 643 This example attaches to lvmid 21891 and takes samples at 250 millisecond intervals and displays the output as specified by
 644 \fB\-gcnew\fR
 645 option\&. In addition, it uses the
 646 \fB\-h3\fR
 647 option to output the column header after every 3 lines of data\&.
 648 .PP
 649 In 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\&.
 650 .PP
 651 Another collection occurs between the fifth and sixth samples\&. This collection found very few survivors and returned the tenuring threshold to 31\&.
 652 .sp
 653 .if n \{\
 654 .RS 4
 655 .\}





 656 .nf
 657 \fBjstat \-gcnew \-h3 21891 250\fR
 658 \fB S0C    S1C    S0U    S1U   TT MTT  DSS      EC       EU     YGC     YGCT\fR
 659 \fB  64\&.0   64\&.0    0\&.0   31\&.7 31  31   32\&.0    512\&.0    178\&.6    249    0\&.203\fR
 660 \fB  64\&.0   64\&.0    0\&.0   31\&.7 31  31   32\&.0    512\&.0    355\&.5    249    0\&.203\fR
 661 \fB  64\&.0   64\&.0   35\&.4    0\&.0  2  31   32\&.0    512\&.0     21\&.9    250    0\&.204\fR
 662 \fB S0C    S1C    S0U    S1U   TT MTT  DSS      EC       EU     YGC     YGCT\fR
 663 \fB  64\&.0   64\&.0   35\&.4    0\&.0  2  31   32\&.0    512\&.0    245\&.9    250    0\&.204\fR
 664 \fB  64\&.0   64\&.0   35\&.4    0\&.0  2  31   32\&.0    512\&.0    421\&.1    250    0\&.204\fR
 665 \fB  64\&.0   64\&.0    0\&.0   19\&.0 31  31   32\&.0    512\&.0     84\&.4    251    0\&.204\fR
 666 \fB S0C    S1C    S0U    S1U   TT MTT  DSS      EC       EU     YGC     YGCT\fR
 667 \fB  64\&.0   64\&.0    0\&.0   19\&.0 31  31   32\&.0    512\&.0    306\&.7    251    0\&.204\fR
 668  

 669 .fi
 670 .if n \{\
 671 .RE
 672 .\}
 673 .SS "Include a Time Stamp for Each Sample"
 674 .PP
 675 This example attaches to lvmid 21891 and takes 3 samples at 250 millisecond intervals\&. The
 676 \fB\-t\fR
 677 option is used to generate a time stamp for each sample in the first column\&.
 678 .PP
 679 The Timestamp column reports the elapsed time in seconds since the start of the target JVM\&. In addition, the
 680 \fB\-gcoldcapacity\fR
 681 output 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\&.
 682 .sp
 683 .if n \{\
 684 .RS 4
 685 .\}




 686 .nf
 687 \fBTimestamp      OGCMN    OGCMX     OGC       OC       YGC   FGC    FGCT    GCT\fR
 688 \fB          150\&.1   1408\&.0  60544\&.0  11696\&.0  11696\&.0   194    80    2\&.874   3\&.799\fR
 689 \fB          150\&.4   1408\&.0  60544\&.0  13820\&.0  13820\&.0   194    81    2\&.938   3\&.863\fR
 690 \fB          150\&.7   1408\&.0  60544\&.0  13820\&.0  13820\&.0   194    81    2\&.938   3\&.863\fR
 691  

 692 .fi
 693 .if n \{\
 694 .RE
 695 .\}
 696 .SS "Monitor Instrumentation for a Remote JVM"
 697 .PP
 698 This example attaches to lvmid 40496 on the system named remote\&.domain using the
 699 \fB\-gcutil\fR
 700 option, with samples taken every second indefinitely\&.
 701 .PP
 702 The lvmid is combined with the name of the remote host to construct a
 703 \fIvmid\fR
 704 of
 705 \fB40496@remote\&.domain\fR\&. This vmid results in the use of the
 706 \fBrmi\fR
 707 protocol to communicate to the default
 708 \fBjstatd\fR
 709 server on the remote host\&. The
 710 \fBjstatd\fR
 711 server is located using the
 712 \fBrmiregistry\fR
 713 command on
 714 \fBremote\&.domain\fR
 715 that is bound to the default port of the
 716 \fBrmiregistry\fR
 717 command (port 1099)\&.
 718 .sp
 719 .if n \{\
 720 .RS 4
 721 .\}
 722 .nf
 723 \fBjstat \-gcutil 40496@remote\&.domain 1000\fR
 724 \fB\fI\&.\&.\&. output omitted\fR\fR
 725  

 726 .fi
 727 .if n \{\
 728 .RE
 729 .\}
 730 .SH "SEE ALSO"
 731 .sp
 732 .RS 4
 733 .ie n \{\
 734 \h'-04'\(bu\h'+03'\c
 735 .\}
 736 .el \{\
 737 .sp -1
 738 .IP \(bu 2.3
 739 .\}
 740 java(1)
 741 .RE
 742 .sp
 743 .RS 4
 744 .ie n \{\
 745 \h'-04'\(bu\h'+03'\c
 746 .\}
 747 .el \{\
 748 .sp -1
 749 .IP \(bu 2.3
 750 .\}
 751 jps(1)
 752 .RE
 753 .sp
 754 .RS 4
 755 .ie n \{\
 756 \h'-04'\(bu\h'+03'\c
 757 .\}
 758 .el \{\
 759 .sp -1
 760 .IP \(bu 2.3
 761 .\}
 762 jstatd(1)
 763 .RE
 764 .sp
 765 .RS 4
 766 .ie n \{\
 767 \h'-04'\(bu\h'+03'\c
 768 .\}
 769 .el \{\
 770 .sp -1
 771 .IP \(bu 2.3
 772 .\}
 773 rmiregistry(1)
 774 .RE
 775 .br
 776 'pl 8.5i
 777 'bp
< prev index next >