jstat.1 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758
  1. '\" t
  2. .\" Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
  3. .\"
  4. .\" Title: jstat
  5. .\" Language: English
  6. .\" Date: 03 March 2015
  7. .\" SectDesc: Monitoring Tools
  8. .\" Software: JDK 8
  9. .\" Arch: generic
  10. .\" Part Number: E38209-04
  11. .\" Doc ID: JSSOR
  12. .\"
  13. .if n .pl 99999
  14. .TH "jstat" "1" "03 March 2015" "JDK 8" "Monitoring Tools"
  15. .\" -----------------------------------------------------------------
  16. .\" * Define some portability stuff
  17. .\" -----------------------------------------------------------------
  18. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  19. .\" http://bugs.debian.org/507673
  20. .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  21. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  22. .ie \n(.g .ds Aq \(aq
  23. .el .ds Aq '
  24. .\" -----------------------------------------------------------------
  25. .\" * set default formatting
  26. .\" -----------------------------------------------------------------
  27. .\" disable hyphenation
  28. .nh
  29. .\" disable justification (adjust text to left margin only)
  30. .ad l
  31. .\" -----------------------------------------------------------------
  32. .\" * MAIN CONTENT STARTS HERE *
  33. .\" -----------------------------------------------------------------
  34. .SH "NAME"
  35. jstat \- Monitors Java Virtual Machine (JVM) statistics\&. This command is experimental and unsupported\&.
  36. .SH "SYNOPSIS"
  37. .sp
  38. .if n \{\
  39. .RS 4
  40. .\}
  41. .nf
  42. \fBjstat\fR [ \fIgeneralOption\fR | \fIoutputOptions vmid\fR [ \fIinterval\fR[s|ms] [ \fIcount \fR] ]
  43. .fi
  44. .if n \{\
  45. .RE
  46. .\}
  47. .PP
  48. \fIgeneralOption\fR
  49. .RS 4
  50. A single general command\-line option
  51. \fB\-help\fR
  52. or
  53. \fB\-options\fR\&. See General Options\&.
  54. .RE
  55. .PP
  56. \fIoutputOptions\fR
  57. .RS 4
  58. One or more output options that consist of a single
  59. \fBstatOption\fR, plus any of the
  60. \fB\-t\fR,
  61. \fB\-h\fR, and
  62. \fB\-J\fR
  63. options\&. See Output Options\&.
  64. .RE
  65. .PP
  66. \fIvmid\fR
  67. .RS 4
  68. Virtual machine identifier, which is a string that indicates the target JVM\&. The general syntax is the following:
  69. .sp
  70. .if n \{\
  71. .RS 4
  72. .\}
  73. .nf
  74. \fB[protocol:][//]lvmid[@hostname[:port]/servername]\fR
  75. .fi
  76. .if n \{\
  77. .RE
  78. .\}
  79. The syntax of the
  80. \fBvmid\fR
  81. string corresponds to the syntax of a URI\&. The
  82. \fBvmid\fR
  83. 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\&.
  84. .RE
  85. .PP
  86. \fIinterval\fR [s|ms]
  87. .RS 4
  88. Sampling interval in the specified units, seconds (s) or milliseconds (ms)\&. Default units are milliseconds\&. Must be a positive integer\&. When specified, the
  89. \fBjstat\fR
  90. command produces its output at each interval\&.
  91. .RE
  92. .PP
  93. \fIcount\fR
  94. .RS 4
  95. Number of samples to display\&. The default value is infinity which causes the
  96. \fBjstat\fR
  97. command to display statistics until the target JVM terminates or the
  98. \fBjstat\fR
  99. command is terminated\&. This value must be a positive integer\&.
  100. .RE
  101. .SH "DESCRIPTION"
  102. .PP
  103. The
  104. \fBjstat\fR
  105. command displays performance statistics for an instrumented Java HotSpot VM\&. The target JVM is identified by its virtual machine identifier, or
  106. \fBvmid\fR
  107. option\&.
  108. .SH "VIRTUAL MACHINE IDENTIFIER"
  109. .PP
  110. The syntax of the
  111. \fBvmid\fR
  112. string corresponds to the syntax of a URI:
  113. .sp
  114. .if n \{\
  115. .RS 4
  116. .\}
  117. .nf
  118. \fB[protocol:][//]lvmid[@hostname[:port]/servername]\fR
  119. .fi
  120. .if n \{\
  121. .RE
  122. .\}
  123. .PP
  124. \fIprotocol\fR
  125. .RS 4
  126. The communications protocol\&. If the
  127. \fIprotocol\fR
  128. value is omitted and a host name is not specified, then the default protocol is a platform\-specific optimized local protocol\&. If the
  129. \fIprotocol\fR
  130. value is omitted and a host name is specified, then the default protocol is
  131. \fBrmi\fR\&.
  132. .RE
  133. .PP
  134. \fIlvmid\fR
  135. .RS 4
  136. The local virtual machine identifier for the target JVM\&. The
  137. \fBlvmid\fR
  138. is a platform\-specific value that uniquely identifies a JVM on a system\&. The
  139. \fBlvmid\fR
  140. is the only required component of a virtual machine identifier\&. The
  141. \fBlvmid\fR
  142. is typically, but not necessarily, the operating system\*(Aqs process identifier for the target JVM process\&. You can use the
  143. \fBjps\fR
  144. command to determine the
  145. \fBlvmid\fR\&. Also, you can determine the
  146. \fBlvmid\fR
  147. on Solaris, Linux, and OS X platforms with the
  148. \fBps\fR
  149. command, and on Windows with the Windows Task Manager\&.
  150. .RE
  151. .PP
  152. \fIhostname\fR
  153. .RS 4
  154. A hostname or IP address that indicates the target host\&. If the
  155. \fIhostname\fR
  156. value is omitted, then the target host is the local host\&.
  157. .RE
  158. .PP
  159. \fIport\fR
  160. .RS 4
  161. The default port for communicating with the remote server\&. If the
  162. \fIhostname\fR
  163. value is omitted or the
  164. \fIprotocol\fR
  165. value specifies an optimized, local protocol, then the
  166. \fIport\fR
  167. value is ignored\&. Otherwise, treatment of the
  168. \fBport\fR
  169. parameter is implementation\-specific\&. For the default
  170. \fBrmi\fR
  171. protocol, the port value indicates the port number for the rmiregistry on the remote host\&. If the
  172. \fIport\fR
  173. value is omitted and the
  174. \fIprotocol\fR
  175. value indicates
  176. \fBrmi\fR, then the default rmiregistry port (1099) is used\&.
  177. .RE
  178. .PP
  179. \fIservername\fR
  180. .RS 4
  181. The treatment of the
  182. \fBservername\fR
  183. parameter depends on implementation\&. For the optimized local protocol, this field is ignored\&. For the
  184. \fBrmi\fR
  185. protocol, it represents the name of the RMI remote object on the remote host\&.
  186. .RE
  187. .SH "OPTIONS"
  188. .PP
  189. The
  190. \fBjstat\fR
  191. command supports two types of options, general options and output options\&. General options cause the
  192. \fBjstat\fR
  193. command to display simple usage and version information\&. Output options determine the content and format of the statistical output\&.
  194. .PP
  195. All options and their functionality are subject to change or removal in future releases\&.
  196. .SS "General Options"
  197. .PP
  198. If you specify one of the general options, then you cannot specify any other option or parameter\&.
  199. .PP
  200. \-help
  201. .RS 4
  202. Displays a help message\&.
  203. .RE
  204. .PP
  205. \-options
  206. .RS 4
  207. Displays a list of static options\&. See Output Options\&.
  208. .RE
  209. .SS "Output Options"
  210. .PP
  211. If you do not specify a general option, then you can specify output options\&. Output options determine the content and format of the
  212. \fBjstat\fR
  213. command\*(Aqs output, and consist of a single
  214. \fBstatOption\fR, plus any of the other output options (\fB\-h\fR,
  215. \fB\-t\fR, and
  216. \fB\-J\fR)\&. The
  217. \fBstatOption\fR
  218. must come first\&.
  219. .PP
  220. Output is formatted as a table, with columns that are separated by spaces\&. A header row with titles describes the columns\&. Use the
  221. \fB\-h\fR
  222. 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\&.
  223. .PP
  224. Use the
  225. \fB\-t\fR
  226. 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\&.
  227. .PP
  228. Use the interval and count parameters to determine how frequently and how many times, respectively, the
  229. \fBjstat\fR
  230. command displays its output\&.
  231. .PP
  232. \fBNote:\fR
  233. Do not to write scripts to parse the
  234. \fBjstat\fR
  235. command\*(Aqs output because the format might change in future releases\&. If you write scripts that parse
  236. \fBjstat\fR
  237. command output, then expect to modify them for future releases of this tool\&.
  238. .PP
  239. \-\fIstatOption\fR
  240. .RS 4
  241. Determines the statistics information the
  242. \fBjstat\fR
  243. command displays\&. The following lists the available options\&. Use the
  244. \fB\-options\fR
  245. general option to display the list of options for a particular platform installation\&. See Stat Options and Output\&.
  246. .sp
  247. \fBclass\fR: Displays statistics about the behavior of the class loader\&.
  248. .sp
  249. \fBcompiler\fR: Displays statistics about the behavior of the Java HotSpot VM Just\-in\-Time compiler\&.
  250. .sp
  251. \fBgc\fR: Displays statistics about the behavior of the garbage collected heap\&.
  252. .sp
  253. \fBgccapacity\fR: Displays statistics about the capacities of the generations and their corresponding spaces\&.
  254. .sp
  255. \fBgccause\fR: Displays a summary about garbage collection statistics (same as
  256. \fB\-gcutil\fR), with the cause of the last and current (when applicable) garbage collection events\&.
  257. .sp
  258. \fBgcnew\fR: Displays statistics of the behavior of the new generation\&.
  259. .sp
  260. \fBgcnewcapacity\fR: Displays statistics about the sizes of the new generations and its corresponding spaces\&.
  261. .sp
  262. \fBgcold\fR: Displays statistics about the behavior of the old generation and metaspace statistics\&.
  263. .sp
  264. \fBgcoldcapacity\fR: Displays statistics about the sizes of the old generation\&.
  265. .sp
  266. \fBgcmetacapacity\fR: Displays statistics about the sizes of the metaspace\&.
  267. .sp
  268. \fBgcutil\fR: Displays a summary about garbage collection statistics\&.
  269. .sp
  270. \fBprintcompilation\fR: Displays Java HotSpot VM compilation method statistics\&.
  271. .RE
  272. .PP
  273. \-h \fIn\fR
  274. .RS 4
  275. Displays a column header every
  276. \fIn\fR
  277. samples (output rows), where
  278. \fIn\fR
  279. is a positive integer\&. Default value is 0, which displays the column header the first row of data\&.
  280. .RE
  281. .PP
  282. \-t
  283. .RS 4
  284. Displays a timestamp column as the first column of output\&. The time stamp is the time since the start time of the target JVM\&.
  285. .RE
  286. .PP
  287. \-J\fIjavaOption\fR
  288. .RS 4
  289. Passes
  290. \fBjavaOption\fR
  291. to the Java application launcher\&. For example,
  292. \fB\-J\-Xms48m\fR
  293. sets the startup memory to 48 MB\&. For a complete list of options, see
  294. java(1)\&.
  295. .RE
  296. .SS "Stat Options and Output"
  297. .PP
  298. The following information summarizes the columns that the
  299. \fBjstat\fR
  300. command outputs for each
  301. \fIstatOption\fR\&.
  302. .PP
  303. \-class \fIoption\fR
  304. .RS 4
  305. Class loader statistics\&.
  306. .sp
  307. \fBLoaded\fR: Number of classes loaded\&.
  308. .sp
  309. \fBBytes\fR: Number of kBs loaded\&.
  310. .sp
  311. \fBUnloaded\fR: Number of classes unloaded\&.
  312. .sp
  313. \fBBytes\fR: Number of Kbytes unloaded\&.
  314. .sp
  315. \fBTime\fR: Time spent performing class loading and unloading operations\&.
  316. .RE
  317. .PP
  318. \-compiler \fIoption\fR
  319. .RS 4
  320. Java HotSpot VM Just\-in\-Time compiler statistics\&.
  321. .sp
  322. \fBCompiled\fR: Number of compilation tasks performed\&.
  323. .sp
  324. \fBFailed\fR: Number of compilations tasks failed\&.
  325. .sp
  326. \fBInvalid\fR: Number of compilation tasks that were invalidated\&.
  327. .sp
  328. \fBTime\fR: Time spent performing compilation tasks\&.
  329. .sp
  330. \fBFailedType\fR: Compile type of the last failed compilation\&.
  331. .sp
  332. \fBFailedMethod\fR: Class name and method of the last failed compilation\&.
  333. .RE
  334. .PP
  335. \-gc \fIoption\fR
  336. .RS 4
  337. Garbage\-collected heap statistics\&.
  338. .sp
  339. \fBS0C\fR: Current survivor space 0 capacity (kB)\&.
  340. .sp
  341. \fBS1C\fR: Current survivor space 1 capacity (kB)\&.
  342. .sp
  343. \fBS0U\fR: Survivor space 0 utilization (kB)\&.
  344. .sp
  345. \fBS1U\fR: Survivor space 1 utilization (kB)\&.
  346. .sp
  347. \fBEC\fR: Current eden space capacity (kB)\&.
  348. .sp
  349. \fBEU\fR: Eden space utilization (kB)\&.
  350. .sp
  351. \fBOC\fR: Current old space capacity (kB)\&.
  352. .sp
  353. \fBOU\fR: Old space utilization (kB)\&.
  354. .sp
  355. \fBMC\fR: Metaspace capacity (kB)\&.
  356. .sp
  357. \fBMU\fR: Metacspace utilization (kB)\&.
  358. .sp
  359. \fBCCSC\fR: Compressed class space capacity (kB)\&.
  360. .sp
  361. \fBCCSU\fR: Compressed class space used (kB)\&.
  362. .sp
  363. \fBYGC\fR: Number of young generation garbage collection events\&.
  364. .sp
  365. \fBYGCT\fR: Young generation garbage collection time\&.
  366. .sp
  367. \fBFGC\fR: Number of full GC events\&.
  368. .sp
  369. \fBFGCT\fR: Full garbage collection time\&.
  370. .sp
  371. \fBGCT\fR: Total garbage collection time\&.
  372. .RE
  373. .PP
  374. \-gccapacity \fIoption\fR
  375. .RS 4
  376. Memory pool generation and space capacities\&.
  377. .sp
  378. \fBNGCMN\fR: Minimum new generation capacity (kB)\&.
  379. .sp
  380. \fBNGCMX\fR: Maximum new generation capacity (kB)\&.
  381. .sp
  382. \fBNGC\fR: Current new generation capacity (kB)\&.
  383. .sp
  384. \fBS0C\fR: Current survivor space 0 capacity (kB)\&.
  385. .sp
  386. \fBS1C\fR: Current survivor space 1 capacity (kB)\&.
  387. .sp
  388. \fBEC\fR: Current eden space capacity (kB)\&.
  389. .sp
  390. \fBOGCMN\fR: Minimum old generation capacity (kB)\&.
  391. .sp
  392. \fBOGCMX\fR: Maximum old generation capacity (kB)\&.
  393. .sp
  394. \fBOGC\fR: Current old generation capacity (kB)\&.
  395. .sp
  396. \fBOC\fR: Current old space capacity (kB)\&.
  397. .sp
  398. \fBMCMN\fR: Minimum metaspace capacity (kB)\&.
  399. .sp
  400. \fBMCMX\fR: Maximum metaspace capacity (kB)\&.
  401. .sp
  402. \fBMC\fR: Metaspace capacity (kB)\&.
  403. .sp
  404. \fBCCSMN\fR: Compressed class space minimum capacity (kB)\&.
  405. .sp
  406. \fBCCSMX\fR: Compressed class space maximum capacity (kB)\&.
  407. .sp
  408. \fBCCSC\fR: Compressed class space capacity (kB)\&.
  409. .sp
  410. \fBYGC\fR: Number of young generation GC events\&.
  411. .sp
  412. \fBFGC\fR: Number of full GC events\&.
  413. .RE
  414. .PP
  415. \-gccause \fIoption\fR
  416. .RS 4
  417. This option displays the same summary of garbage collection statistics as the
  418. \fB\-gcutil\fR
  419. 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
  420. \fB\-gcutil\fR, this option adds the following columns\&.
  421. .sp
  422. \fBLGCC\fR: Cause of last garbage collection
  423. .sp
  424. \fBGCC\fR: Cause of current garbage collection
  425. .RE
  426. .PP
  427. \-gcnew \fIoption\fR
  428. .RS 4
  429. New generation statistics\&.
  430. .sp
  431. \fBS0C\fR: Current survivor space 0 capacity (kB)\&.
  432. .sp
  433. \fBS1C\fR: Current survivor space 1 capacity (kB)\&.
  434. .sp
  435. \fBS0U\fR: Survivor space 0 utilization (kB)\&.
  436. .sp
  437. \fBS1U\fR: Survivor space 1 utilization (kB)\&.
  438. .sp
  439. \fBTT\fR: Tenuring threshold\&.
  440. .sp
  441. \fBMTT\fR: Maximum tenuring threshold\&.
  442. .sp
  443. \fBDSS\fR: Desired survivor size (kB)\&.
  444. .sp
  445. \fBEC\fR: Current eden space capacity (kB)\&.
  446. .sp
  447. \fBEU\fR: Eden space utilization (kB)\&.
  448. .sp
  449. \fBYGC\fR: Number of young generation GC events\&.
  450. .sp
  451. \fBYGCT\fR: Young generation garbage collection time\&.
  452. .RE
  453. .PP
  454. \-gcnewcapacity \fIoption\fR
  455. .RS 4
  456. New generation space size statistics\&.
  457. .sp
  458. \fBNGCMN\fR: Minimum new generation capacity (kB)\&.
  459. .sp
  460. \fBNGCMX\fR: Maximum new generation capacity (kB)\&.
  461. .sp
  462. \fBNGC\fR: Current new generation capacity (kB)\&.
  463. .sp
  464. \fBS0CMX\fR: Maximum survivor space 0 capacity (kB)\&.
  465. .sp
  466. \fBS0C\fR: Current survivor space 0 capacity (kB)\&.
  467. .sp
  468. \fBS1CMX\fR: Maximum survivor space 1 capacity (kB)\&.
  469. .sp
  470. \fBS1C\fR: Current survivor space 1 capacity (kB)\&.
  471. .sp
  472. \fBECMX\fR: Maximum eden space capacity (kB)\&.
  473. .sp
  474. \fBEC\fR: Current eden space capacity (kB)\&.
  475. .sp
  476. \fBYGC\fR: Number of young generation GC events\&.
  477. .sp
  478. \fBFGC\fR: Number of full GC events\&.
  479. .RE
  480. .PP
  481. \-gcold \fIoption\fR
  482. .RS 4
  483. Old generation and metaspace behavior statistics\&.
  484. .sp
  485. \fBMC\fR: Metaspace capacity (kB)\&.
  486. .sp
  487. \fBMU\fR: Metaspace utilization (kB)\&.
  488. .sp
  489. \fBCCSC\fR: Compressed class space capacity (kB)\&.
  490. .sp
  491. \fBCCSU\fR: Compressed class space used (kB)\&.
  492. .sp
  493. \fBOC\fR: Current old space capacity (kB)\&.
  494. .sp
  495. \fBOU\fR: Old space utilization (kB)\&.
  496. .sp
  497. \fBYGC\fR: Number of young generation GC events\&.
  498. .sp
  499. \fBFGC\fR: Number of full GC events\&.
  500. .sp
  501. \fBFGCT\fR: Full garbage collection time\&.
  502. .sp
  503. \fBGCT\fR: Total garbage collection time\&.
  504. .RE
  505. .PP
  506. \-gcoldcapacity \fIoption\fR
  507. .RS 4
  508. Old generation size statistics\&.
  509. .sp
  510. \fBOGCMN\fR: Minimum old generation capacity (kB)\&.
  511. .sp
  512. \fBOGCMX\fR: Maximum old generation capacity (kB)\&.
  513. .sp
  514. \fBOGC\fR: Current old generation capacity (kB)\&.
  515. .sp
  516. \fBOC\fR: Current old space capacity (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. \-gcmetacapacity \fIoption\fR
  528. .RS 4
  529. Metaspace size statistics\&.
  530. .sp
  531. \fBMCMN\fR: Minimum metaspace capacity (kB)\&.
  532. .sp
  533. \fBMCMX\fR: Maximum metaspace capacity (kB)\&.
  534. .sp
  535. \fBMC\fR: Metaspace capacity (kB)\&.
  536. .sp
  537. \fBCCSMN\fR: Compressed class space minimum capacity (kB)\&.
  538. .sp
  539. \fBCCSMX\fR: Compressed class space maximum capacity (kB)\&.
  540. .sp
  541. \fBYGC\fR: Number of young generation GC events\&.
  542. .sp
  543. \fBFGC\fR: Number of full GC events\&.
  544. .sp
  545. \fBFGCT\fR: Full garbage collection time\&.
  546. .sp
  547. \fBGCT\fR: Total garbage collection time\&.
  548. .RE
  549. .PP
  550. \-gcutil \fIoption\fR
  551. .RS 4
  552. Summary of garbage collection statistics\&.
  553. .sp
  554. \fBS0\fR: Survivor space 0 utilization as a percentage of the space\*(Aqs current capacity\&.
  555. .sp
  556. \fBS1\fR: Survivor space 1 utilization as a percentage of the space\*(Aqs current capacity\&.
  557. .sp
  558. \fBE\fR: Eden space utilization as a percentage of the space\*(Aqs current capacity\&.
  559. .sp
  560. \fBO\fR: Old space utilization as a percentage of the space\*(Aqs current capacity\&.
  561. .sp
  562. \fBM\fR: Metaspace utilization as a percentage of the space\*(Aqs current capacity\&.
  563. .sp
  564. \fBCCS\fR: Compressed class space utilization as a percentage\&.
  565. .sp
  566. \fBYGC\fR: Number of young generation GC events\&.
  567. .sp
  568. \fBYGCT\fR: Young generation garbage collection time\&.
  569. .sp
  570. \fBFGC\fR: Number of full GC events\&.
  571. .sp
  572. \fBFGCT\fR: Full garbage collection time\&.
  573. .sp
  574. \fBGCT\fR: Total garbage collection time\&.
  575. .RE
  576. .PP
  577. \-printcompilation \fIoption\fR
  578. .RS 4
  579. Java HotSpot VM compiler method statistics\&.
  580. .sp
  581. \fBCompiled\fR: Number of compilation tasks performed by the most recently compiled method\&.
  582. .sp
  583. \fBSize\fR: Number of bytes of byte code of the most recently compiled method\&.
  584. .sp
  585. \fBType\fR: Compilation type of the most recently compiled method\&.
  586. .sp
  587. \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
  588. \fB\-XX:+PrintCompilation\fR
  589. option\&.
  590. .RE
  591. .SH "EXAMPLES"
  592. .PP
  593. This section presents some examples of monitoring a local JVM with an
  594. \fIlvmid\fR
  595. of 21891\&.
  596. .SS "The gcutil Option"
  597. .PP
  598. This example attaches to lvmid 21891 and takes 7 samples at 250 millisecond intervals and displays the output as specified by the \-\fBgcutil\fR
  599. option\&.
  600. .PP
  601. 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\&.
  602. .sp
  603. .if n \{\
  604. .RS 4
  605. .\}
  606. .nf
  607. \fBjstat \-gcutil 21891 250 7\fR
  608. \fB S0 S1 E O M CCS YGC YGCT FGC FGCT GCT \fR
  609. \fB 0\&.00 97\&.02 70\&.31 66\&.80 95\&.52 89\&.14 7 0\&.300 0 0\&.000 0\&.300\fR
  610. \fB 0\&.00 97\&.02 86\&.23 66\&.80 95\&.52 89\&.14 7 0\&.300 0 0\&.000 0\&.300\fR
  611. \fB 0\&.00 97\&.02 96\&.53 66\&.80 95\&.52 89\&.14 7 0\&.300 0 0\&.000 0\&.300\fR
  612. \fB 91\&.03 0\&.00 1\&.98 68\&.19 95\&.89 91\&.24 8 0\&.378 0 0\&.000 0\&.378\fR
  613. \fB 91\&.03 0\&.00 15\&.82 68\&.19 95\&.89 91\&.24 8 0\&.378 0 0\&.000 0\&.378\fR
  614. \fB 91\&.03 0\&.00 17\&.80 68\&.19 95\&.89 91\&.24 8 0\&.378 0 0\&.000 0\&.378\fR
  615. \fB 91\&.03 0\&.00 17\&.80 68\&.19 95\&.89 91\&.24 8 0\&.378 0 0\&.000 0\&.378\fR
  616. .fi
  617. .if n \{\
  618. .RE
  619. .\}
  620. .SS "Repeat the Column Header String"
  621. .PP
  622. This example attaches to lvmid 21891 and takes samples at 250 millisecond intervals and displays the output as specified by
  623. \fB\-gcnew\fR
  624. option\&. In addition, it uses the
  625. \fB\-h3\fR
  626. option to output the column header after every 3 lines of data\&.
  627. .PP
  628. 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\&.
  629. .PP
  630. Another collection occurs between the fifth and sixth samples\&. This collection found very few survivors and returned the tenuring threshold to 31\&.
  631. .sp
  632. .if n \{\
  633. .RS 4
  634. .\}
  635. .nf
  636. \fBjstat \-gcnew \-h3 21891 250\fR
  637. \fB S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT\fR
  638. \fB 64\&.0 64\&.0 0\&.0 31\&.7 31 31 32\&.0 512\&.0 178\&.6 249 0\&.203\fR
  639. \fB 64\&.0 64\&.0 0\&.0 31\&.7 31 31 32\&.0 512\&.0 355\&.5 249 0\&.203\fR
  640. \fB 64\&.0 64\&.0 35\&.4 0\&.0 2 31 32\&.0 512\&.0 21\&.9 250 0\&.204\fR
  641. \fB S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT\fR
  642. \fB 64\&.0 64\&.0 35\&.4 0\&.0 2 31 32\&.0 512\&.0 245\&.9 250 0\&.204\fR
  643. \fB 64\&.0 64\&.0 35\&.4 0\&.0 2 31 32\&.0 512\&.0 421\&.1 250 0\&.204\fR
  644. \fB 64\&.0 64\&.0 0\&.0 19\&.0 31 31 32\&.0 512\&.0 84\&.4 251 0\&.204\fR
  645. \fB S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT\fR
  646. \fB 64\&.0 64\&.0 0\&.0 19\&.0 31 31 32\&.0 512\&.0 306\&.7 251 0\&.204\fR
  647. .fi
  648. .if n \{\
  649. .RE
  650. .\}
  651. .SS "Include a Time Stamp for Each Sample"
  652. .PP
  653. This example attaches to lvmid 21891 and takes 3 samples at 250 millisecond intervals\&. The
  654. \fB\-t\fR
  655. option is used to generate a time stamp for each sample in the first column\&.
  656. .PP
  657. The Timestamp column reports the elapsed time in seconds since the start of the target JVM\&. In addition, the
  658. \fB\-gcoldcapacity\fR
  659. 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\&.
  660. .sp
  661. .if n \{\
  662. .RS 4
  663. .\}
  664. .nf
  665. \fBTimestamp OGCMN OGCMX OGC OC YGC FGC FGCT GCT\fR
  666. \fB 150\&.1 1408\&.0 60544\&.0 11696\&.0 11696\&.0 194 80 2\&.874 3\&.799\fR
  667. \fB 150\&.4 1408\&.0 60544\&.0 13820\&.0 13820\&.0 194 81 2\&.938 3\&.863\fR
  668. \fB 150\&.7 1408\&.0 60544\&.0 13820\&.0 13820\&.0 194 81 2\&.938 3\&.863\fR
  669. .fi
  670. .if n \{\
  671. .RE
  672. .\}
  673. .SS "Monitor Instrumentation for a Remote JVM"
  674. .PP
  675. This example attaches to lvmid 40496 on the system named remote\&.domain using the
  676. \fB\-gcutil\fR
  677. option, with samples taken every second indefinitely\&.
  678. .PP
  679. The lvmid is combined with the name of the remote host to construct a
  680. \fIvmid\fR
  681. of
  682. \fB40496@remote\&.domain\fR\&. This vmid results in the use of the
  683. \fBrmi\fR
  684. protocol to communicate to the default
  685. \fBjstatd\fR
  686. server on the remote host\&. The
  687. \fBjstatd\fR
  688. server is located using the
  689. \fBrmiregistry\fR
  690. command on
  691. \fBremote\&.domain\fR
  692. that is bound to the default port of the
  693. \fBrmiregistry\fR
  694. command (port 1099)\&.
  695. .sp
  696. .if n \{\
  697. .RS 4
  698. .\}
  699. .nf
  700. \fBjstat \-gcutil 40496@remote\&.domain 1000\fR
  701. \fB\fI\&.\&.\&. output omitted\fR\fR
  702. .fi
  703. .if n \{\
  704. .RE
  705. .\}
  706. .SH "SEE ALSO"
  707. .sp
  708. .RS 4
  709. .ie n \{\
  710. \h'-04'\(bu\h'+03'\c
  711. .\}
  712. .el \{\
  713. .sp -1
  714. .IP \(bu 2.3
  715. .\}
  716. java(1)
  717. .RE
  718. .sp
  719. .RS 4
  720. .ie n \{\
  721. \h'-04'\(bu\h'+03'\c
  722. .\}
  723. .el \{\
  724. .sp -1
  725. .IP \(bu 2.3
  726. .\}
  727. jps(1)
  728. .RE
  729. .sp
  730. .RS 4
  731. .ie n \{\
  732. \h'-04'\(bu\h'+03'\c
  733. .\}
  734. .el \{\
  735. .sp -1
  736. .IP \(bu 2.3
  737. .\}
  738. jstatd(1)
  739. .RE
  740. .sp
  741. .RS 4
  742. .ie n \{\
  743. \h'-04'\(bu\h'+03'\c
  744. .\}
  745. .el \{\
  746. .sp -1
  747. .IP \(bu 2.3
  748. .\}
  749. rmiregistry(1)
  750. .RE
  751. .br
  752. 'pl 8.5i
  753. 'bp