Manual Pages for UNIX Darwin command on man jstat
MyWebUniversity

Manual Pages for UNIX Darwin command on man jstat

jstat(1) jstat(1)

NAME

jstat - Java Virtual Machine statistics monitoring tool

SYNOPSIS

jjssttaatt [ generalOption | outputOptions vmid [ interval [ s|ms ] [ count ] ] ]

DESCRIPTION

The jjssttaatt tool displays performance statistics for an instrumented HotSpot Java virtual machine (JVM). The target JVM is identified by its virtual machine identifier, or vmid option described below.

NNOOTTEE - This utility is unsupported and may or may not be available in

future versions of the J2SE SDK. It is currently not available on Win-

dows 98 and Windows ME platforms. VVIIRRTTUUAALL MMAACCHHIINNEE IIDDEENNTTIIFFIIEERR The syntax of the vmid string largely corresponds to the syntax of a URI: [[pprroottooccooll::]][[////]]llvvmmiidd[[@@hhoossttnnaammee]][[::ppoorrtt]][[//sseerrvveerrnnaammee]] pprroottooccooll The communications protocol. If the protocol is omitted and a hostname is not specified, the default protocol is a platform specific optimized local protocol. If the protocol is omitted and a hostname is specified, then the default protocol is rmi. llvvmmiidd The local virtual machine identifier for the target JVM.

The lvmid is a platform-specific value that uniquely

identifies a JVM on a system. The lvmid is the only required component of a virtual machine identifier. The lvmid is typically, but not necessarily, the operating system's process identifier for the target JVM process. You can use the jps command to determine the lvmid. Also, you can determine lvmid on Unix platforms with the

ps command, and on Windows with the Windows Task Man-

ager. hhoossttnnaammee A hostname or IP address indicating the target host. If hostname is omitted, then the target host is the local host. ppoorrtt The default port for communicating with the remote

server. If the hostname is omitted or the protocol spec-

ifies an optimized, local protocol, then port is ignored. Otherwise, treatment of the port parameter is implementation specific. For the default rmi protocol, the port indicates the port number for the rmiregistry on the remote host. If port is omitted, and protocol indicates rmi, then the default rmiregistry port (1099) is used.

sseerrvveerrnnaammee The treatment of this parameter depends on implementa-

tion. For the optimized local protocol, this field is ignored. For the rmi protocol, it represents the name of the RMI remote object on the remote host. PPAARRAAMMEETTEERRSS

generalOption snl gnrl omn-ie pin -help -options

or -vveerrssiioonn)

outputOptions n o mr otu otos cnitn o a ige

statOption, plus any of the -tt, -hh, and -JJ options.

vvmmiidd Virtual machine identifier, a string indicating the tar-

get Java virtual machine (JVM). The general syntax is [[pprroottooccooll::]][[////]]llvvmmiidd[[@@hhoossttnnaammee[[::ppoorrtt]]//sseerrvveerrnnaammee The syntax of the vmid string largely corresponds to the syntax of a URI. The vmid can vary from a simple integer representing a local JVM to a more complex construction specifying a communications protocol,

port number, and other implementation-specific values. See Virtual

Machine Identifier below for details. iinntteerrvvaall[[ss||mmss]] Sampling interval in the specified units, seconds (s) or milliseconds (ms). Default units are milliseconds. Must

be a positive integer. If specified, jstat will produce

its output at each interval. ccoouunntt Number of samples to display. Default value is infinity;

that is, jstat displays statistics until the target JVM

terminates or the jstat command is terminated. Must be

a positive integer. OOPPTTIIOONNSS The jjssttaatt command supports two types of options, general options and

output options. General options cause jstat to display simple usage

and version information. Output options determine the content and for-

mat of the statistical output.

NNOOTTEE- All options, and their functionality are subject to change or

removal in future releases. GGEENNEERRAALL OOPPTTIIOONNSS If you specify one of the general options, you cannot specify any other option or parameter.

-hheellpp Display help message.

-vveerrssiioonn Display version information.

-ooppttiioonnss Display list of statistics options. See the Output

Options section below. OOUUTTPPUUTT OOPPTTIIOONNSS If you do not specify a general option, then you can specify output

options. Output options determine the content and format of jstat's

output, and consist of a single statOption, plus any of the other out-

put options (-hh, -tt, and -JJ). The statOption must come first.

Output is formatted as a table, with columns are separated by spaces.

A header row with titles describes the columns. Use the -hh option to

set the frequency at which the header is displayed. Column header

names are generally consistent between the different options. In gen-

eral, if two options provide a column with the same name, then the data source for the two columns are the same.

Use the -tt 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 startup of the target JVM. The resolution of

the time stamp is dependent on various factors and is subject to varia-

tion due to delayed thread scheduling on heavily loaded systems. Use the interval and count parameters to determine how frequently and how many times, respectively, jjssttaatt displays its output.

NNOOTTEE- You are advised not to write scripts to parse jstat's output

since the format may change in future releases. If you choose to write

scripts that parse jstat output, expect to modify them for future

releases of this tool.

statOption Dtrie te ttsis nomto ta jtt i-

plays. The following table lists the available options.

Use the -ooppttiioonnss general option to display the list of

options for a particular platform installation.

+---------+---------------------------+

Option | Displays...

+---------+---------------------------+

|class | Statistics on the behavior of the class loader |

|compiler | Statistics on the behavior of the HotSpot Just-In- |

| | Time compiler | |gc | Statistics on the behavior of the garbage collected | | | heap | |gccapacity | Statistics of the capacities of the generations and | | | their corresponding spaces. | |gccause | Summary of garbage collection statistics (same as |

| | -gcutil), with the cause of the last and current (if |

| | applicable) garbage collection events. | |gcnew | Statistics of the behavior of the new generation. | |gcnewcapacity | Statistics of the sizes of the new generations and | | | its corresponding spaces. | |gcold | Statistics of the behavior of the old and permanent | | | generations. | |gcoldcapacity | Statistics of the sizes of the old generation. | |gcpermcapacity | Statistics of the sizes of the permanent generation. | |gcutil | Summary of garbage collection statistics. | |printcompilation | Summary of garbage collection statistics. |

+---------+---------------------------+

-hh n Display a column header every n samples (output rows),

where n is a positive integer. Default value is 0, which displays the column header above the first row of data.

-tt n Display a timestamp column as the first column of out-

put. The timestamp is the the time since the start time of the target JVM.

-JJjavaOption Pass javaOption to the java application launcher. For

example, -JJ-Xms48m sets the startup memory to 48

megabytes. For a complete list of options, see jjaavvaa(1). SSTTAATTOOPPTTIIOONNSS AANNDD OOUUTTPPUUTT

The following tables summarize the columns that jstat outputs for each

statOption. ccllaassss Class Loader Statistics

+-----+----------------------------+

| CCoolluummnn | DDeessccrriippttiioonn |

+-----+----------------------------+

|Loaded | Number of classes loaded | |Bytes | Number of Kbytes loaded | |Unloaded | Number of classes unloaded | |Bytes | Number of Kbytes unloaded | |Time | Time spent performing class load and unload operations |

+-----+----------------------------+

ccoommppiilleerr

HotSpot Just-In-Time Compiler Statistics

+-------+----------------------------+

| CCoolluummnn | DDeessccrriippttiioonn |

+-------+----------------------------+

|Compiled | Humber of compilation tasks performed | |Failed | Number of compilation tasks that failed | |Invalid | Number of compilation tasks that were invalidated | |Time | Time spent performing compilation tasks | |FailedType | Compile type of the last failed compilation | |FailedMethod | Class name and method for the last failed compilation |

+-------+----------------------------+

ggcc Garbage-collected heap statistics

+----+----------------------+

|CCoolluummnn | DDeessccrriippttiioonn |

+----+----------------------+

|SOC | Current survivor space 0 capacity (KB). | |S1C | Current survivor space 1 capacity (KB). | |S0U | Survivor space 0 utilization (KB). | |S1U | Survivor space 1 utilization (KB). | |EC | Current eden space capacity (KB). | |EU | Eden space utilization (KB). | |OC | Current old space capacity (KB). | |OU | Old space utilization (KB). | |PC | Current permanent space capacity (KB). | |PU | Permanent space utilization (KB). | |YGC | Number of young generation GC Events. | |YGCT | Young generation garbage collection time. | |FGC | Number of full GC events. | |FGCT | Full garbage collection time. | |GCT | Total garbage collection time. |

+----+----------------------+

ggccccaappaacciittyy Memory Pool Generation and Space Capacities

+----+-----------------------+

|CCoolluummnn | DDeessccrriippttiioonn |

+----+-----------------------+

|NGCMN | Minimum new generation capacity (KB). | |NGCMX | Maximum new generation capacity (KB). | |NGC | Current new generation capacity (KB). | |S0C | Current survivor space 0 capacity (KB). | |S1C | Current survivor space 1 capacity (KB). | |EC | Current eden space capacity (KB). | |OGCMN | Minimum old generation capacity (KB). | |OGCMX | Maximum old generation capacity (KB). | |OGC | Current old generation capacity (KB). | |OC | Current old space capacity (KB). | |PGCMN | Minimum permanent generation capacity (KB). | |PGCMX | Maximum Permanent generation capacity (KB). | |PGC | Current Permanent generation capacity (KB). | |PC | Current Permanent space capacity (KB). | |VGC | Number of Young generation GC Events. | |FGC | Number of Full GC Events. |

+----+-----------------------+

ggccccaauussee

This option displays the same summary of garbage collection sta-

tistics as the -gcutil option, but includes the causes of the

last garbage collection event and (if applicable) the current garbage collection event. In addition to the columns listed for

-gcutil, this option adds the following columns:

+----+-------------------+

|CCoolluummnn | DDeessccrriippttiioonn |

+----+-------------------+

|LGCC | Cause of last Garbage Collection. | |GCC | Cause of current Garbage Collection. |

+----+-------------------+

ggccnneeww New Generation Statistics

+----+----------------------+

|CCoolluummnn | DDeessccrriippttiioonn |

+----+----------------------+

|SOC | Current survivor space 0 capacity (KB). | |S1C | Current survivor space 1 capacity (KB). | |S0U | Survivor space 0 utilization (KB). | |S1U | Survivor space 1 utilization (KB). | |TT | Tenuring threshold. | |MTT | Maximum tenuring threshold. | |DSS | Desired survivor size (KB). | |EC | Current eden space capacity (KB). | |EU | Eden space utilization (KB). | |VGC | Number of young generation GC events. | |VGCT | Young generation garbage collection time. |

+----+----------------------+

ggccnneewwccaappaacciittyy New Generation Space Size Statistics

+----+---------------------+

|CCoolluummnn | DDeessccrriippttiioonn |

+----+---------------------+

|NGCMN | Minimum new generation capacity (KB). | |NGCMX | Maximum new generation capacity (KB). | |NGC | Current new generation capacity (KB). | |S0CMX | Maximum survivor space 0 capacity (KB). | |S0C | Current survivor space 0 capacity (KB). | |S1CMX | Maximum survivor space 1 capacity (KB). | |S1C | Current survivor space 1 capacity (KB). | |ECMX | Maximum eden space capacity (KB). | |EC | Current eden space capacity (KB). | |YGC | Number of young generation GC events. | |FGC | Number of Full GC Events. |

+----+---------------------+

ggccoolldd Old and Permanent Generation Statistics

+----+--------------------+

|CCoolluummnn | DDeessccrriippttiioonn |

+----+--------------------+

|PC | Current permanent space capacity (KB). | |PU | Permanent space utilization (KB). | |OC | Current old space capacity (KB). | |OU | Old space utilization (KB). | |YGC | Number of young generation GC events. | |FGC | Number of Full GC events. | |FGCT | Full garbage collection time. | |GCT | Total garbage collection time. |

+----+--------------------+

ggccoollddccaappaacciittyy Old Generation Statistics

+----+--------------------+

|CCoolluummnn | DDeessccrriippttiioonn |

+----+--------------------+

|OGCMN | Minimum old generation capacity (KB). | |OGCMV | Maximum old generation capacity (KB). | |OGC | Current old generation capacity (KB). | |OC | Current old space capacity (KB). | |YGC | Number of young generation GC events. | |FGC | Number of Full GC events. | |FGCT | Full garbage collection time. | |GCT | Total garbage collection time. |

+----+--------------------+

ggccppeerrmmccaappaacciittyy Permanent Generation Statistics

+----+-----------------------+

|CCoolluummnn | DDeessccrriippttiioonn |

+----+-----------------------+

|PGCMN | Minimum permanent generation capacity (KB). | |PGCMX | Maximum permanent generation capacity (KB). | |PGC | Current permanent generation capacity (KB). | |PC | Current permanent space capacity (KB). | |YGC | Number of young generation GC events. | |FGC | Number of Full GC events. | |FGCT | Full garbage collection time. | |GCT | Total garbage collection time. |

+----+-----------------------+

ggccuuttiill Summary of Garbage Collection Statistics

+----+----------------------+

|CCoolluummnn | DDeessccrriippttiioonn |

+----+----------------------+

|S0 | Survivor space 0 utilization as a per- |

| | centage of the space's current capacity. |

|S1 | Survivor space 1 utilization as a per- |

| | centage of the space's current capacity. | |E | Eden space utilization as a percentage of | | | the space's current capacity. | |O | Old space utilization as a percentage of | | | the space's current capacity. |

|P | Permanent space utilization as a percent- |

| | age of the space's current capacity. | |YGC | Number of young generation GC events. | |YGCT | Young generation garbage collection time. | |FGC | Number of Full GC events. | |FGCT | Full garbage collection time. | |GCT | Total garbage collection time. |

+----+----------------------+

pprriinnttccoommppiillaattiioonn HotSpot Compiler Method Statistics

+-----+-----------------------+

| CCoolluummnn | DDeessccrriippttiioonn |

+-----+-----------------------+

|Compiled | Number of compilation tasks performed. | |Size | Number of bytes of bytecode for the method. | |Type | Compilation type. | |Method | Class name and method name identifying the | | | compiled method. Class name uses "/" | | | instead of "." as namespace separator. | | | Method name is the method within the given | | | class. The format for these two fields is |

| | consistent with the HotSpot - XX:+PrintCom- |

| | plation option. |

+-----+-----------------------+

EEXXAAMMPPLLEESS This section presents some examples of monitoring a local JVM with a lvmid of 21891. UUssiinngg tthhee ggccuuttiill ooppttiioonn

This example attaches to lvmid 21891 and takes 7 samples at 250 mil-

lisecond intervals and displays the output as specified by the -gcutil

option.

jjssttaatt -ggccuuttiill 2211889911 225500 77

SS00 SS11 EE OO PP YYGGCC YYGGCCTT FFGGCC FFGGCCTT GGCCTT 1122..4444 00..0000 2277..2200 99..4499 9966..7700 7788 00..117766 55 00..449955 00..667722 1122..4444 00..0000 6622..1166 99..4499 9966..7700 7788 00..117766 55 00..449955 00..667722 1122..4444 00..0000 8833..9977 99..4499 9966..7700 7788 00..117766 55 00..449955 00..667722 00..0000 77..7744 00..0000 99..5511 9966..7700 7799 00..117777 55 00..449955 00..667733 00..0000 77..7744 2233..3377 99..5511 9966..7700 7799 00..117777 55 00..449955 00..667733 00..0000 77..7744 4433..8822 99..5511 9966..7700 7799 00..117777 55 00..449955 00..667733 00..0000 77..7744 5588..1111 99..5511 9966..7711 7799 00..117777 55 00..449955 00..667733 The output of this example shows that a young generation collection

occurred between the 3rd and 4th sample. The collection took 0.001 sec-

onds and promoted objects from the eden space (E) to the old space (O),

resulting in an increase of old space utilization from 9.49% to 9.51%.

Before the collection, the survivor space was 12.44% utilized, but

after this collection it is only 7.74% utilized.

RReeppeeaattiinngg tthhee ccoolluummnn hheeaaddeerr ssttrriinngg

This example attaches to lvmid 21891 and takes samples at 250 millisec-

ond intervals and displays the output as specified by -gcutil option.

In addition, it uses the -hh33 option to output the column header after

every 3 lines of data.

jjssttaatt -ggccnneeww -hh33 2211889911 225500

SS00CC SS11CC SS00UU SS11UU TTTT MMTTTT DDSSSS EECC EEUU YYGGCC YYGGCCTT 6644..00 6644..00 00..00 3311..77 3311 3311 3322..00 551122..00 117788..66 224499 00..220033 6644..00 6644..00 00..00 3311..77 3311 3311 3322..00 551122..00 335555..55 224499 00..220033 6644..00 6644..00 3355..44 00..00 22 3311 3322..00 551122..00 2211..99 225500 00..220044 SS00CC SS11CC SS00UU SS11UU TTTT MMTTTT DDSSSS EECC EEUU YYGGCC YYGGCCTT 6644..00 6644..00 3355..44 00..00 22 3311 3322..00 551122..00 224455..99 225500 00..220044 6644..00 6644..00 3355..44 00..00 22 3311 3322..00 551122..00 442211..11 225500 00..220044 6644..00 6644..00 00..00 1199..00 3311 3311 3322..00 551122..00 8844..44 225511 00..220044 SS00CC SS11CC SS00UU SS11UU TTTT MMTTTT DDSSSS EECC EEUU YYGGCC YYGGCCTT 6644..00 6644..00 00..00 1199..00 3311 3311 3322..00 551122..00 330066..77 225511 00..220044 In addition to showing the repeating header string, this example shows that between the 2nd and 3rd samples, a young GC occurred. Its duration

was 0.001 seconds. The collection found enough live data that the sur-

vivor space 0 utilization (S0U) would would have exceeded the desired

survivor Size (DSS). As a result, objects were promoted to the old gen-

eration (not visible in this output), and the tenuring threshold (TT) was lowered from 31 to 2.

Another collection occurs between the 5th and 6th samples. This collec-

tion found very few survivors and returned the tenuring threshold to 31. IInncclluuddiinngg aa ttiimmee ssttaammpp ffoorr eeaacchh ssaammppllee

This example attaches to lvmid 21891 and takes 3 samples at 250 mil-

lisecond intervals. The -tt option is used to generate a time stamp for

each sample in the first column.

jjssttaatt -ggccoollddccaappaacciittyy -tt 2211889911 225500 33

TTiimmeessttaammpp OOGGCCMMNN OOGGCCMMXX OOGGCC OOCC YYGGCC FFGGCC FFGGCCTT GGCCTT 115500..11 11440088..00 6600554444..00 1111669966..00 1111669966..00 119944 8800 22..887744 33..779999 115500..44 11440088..00 6600554444..00 1133882200..00 1133882200..00 119944 8811 22..993388 33..886633 115500..77 11440088..00 6600554444..00 1133882200..00 1133882200..00 119944 8811 22..993388 33..886633 MMoonniittoorr iinnssttrruummeennttaattiioonn ffoorr aa rreemmoottee JJVVMM This example attaches to lvmid 40496 on the system named remote.domain

using the -ggccuuttiill option, with samples taken every second indefinitely.

jjssttaatt -ggccuuttiill 4400449966@@rreemmoottee..ddoommaaiinn 11000000

...... oouuttppuutt oommiitttteedd The lvmid is combined with the name of the remote host to construct a vmid of 40496@remote.domain. This vmid results in the use of the rmi

protocol to communicate to the default jstatd server on the remote

host. The jstatd server is located using the rmiregistry on

remote.domain that is bound to the default rmiregistry port (port 1099).

SEE ALSO

jjaavvaa(1) jjppss(1) jjssttaattdd(1) rrmmiirreeggiissttrryy(1)

13 June 2004 jstat(1)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™