Documentation Contents

jstat - Java ?????????????????????????????????????????????

??????

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

???????????????

generalOption
????????????????????????????????????????????????????????????????????? (-help???-options???????????? -version)???
outputOptions
????????? statOption ??????-t???-h???????????? -J ??????????????????????????????????????????????????????1 ???????????????????????????????????????????????????
vmid
?????????????????? Java ??????????????? (JVM) ???????????????????????????????????????????????????????????????????????????????????????????????????????????????
[protocol:][//]lvmid[@hostname[:port]/servername]
vmid ????????????????????????????????????URI ????????????????????????????????????vmid ?????????????????? JVM ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
interval[s|ms]
??? (s) ?????????????????? (ms) ???????????????????????????????????????????????????????????????????????????????????????????????????????????????  ?????????????????????????????????????????????  ?????????????????????????????????jstat ??? interval ????????????????????????????????????
count
???????????????????????????????????????????????????????????????????????? ????????????jstat ????????????????????? JVM ????????????????????????????????? jstat ???????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????

??????

jstat ???????????????????????????????????? HotSpot Java ??????????????? (JVM) ??????????????????????????????????????????????????????????????????????????? JVM ??????????????????????????????????????????????????? vmid ????????????????????????????????????????????????

???: ??????????????????????????????????????????????????????????????????????????? JDK ????????????????????????????????????????????????????????????????????????????????????Windows 98 ????????? Windows Me ??????????????????????????????????????????????????????

????????????????????????

vmid ????????????????????????????????????URI ????????????????????????????????????

[protocol:][//]lvmid[@hostname][:port][/servername]
protocol
??????????????????????????????protocol ??????????????????hostname ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????protocol ??????????????????hostname ????????????????????????????????????????????????????????????????????? rmi ??????????????????
lvmid
??????????????? JVM ????????????????????????????????????????????????lvmid ???????????????????????? JVM ?????????????????????????????????????????????????????????????????????lvmid ???????????????????????????????????????????????????????????????lvmid ???????????????????????????????????????????????????????????????????????????????????? JVM ?????????????????????????????????????????????????????????????????????????????????????????????jps ??????????????????????????????lvmid ?????????????????????????????????Unix ??????????????????????????????ps ??????????????????????????????Windows ?????? Windows ?????????????????????????????????????????????lvmid ????????????????????????
hostname
?????????????????????????????????????????????????????? IP ?????????????????????hostname ??????????????????????????????????????????????????????????????????????????????????????????????????????
port
?????????????????????????????????????????????????????????????????????????????????hostname ??????????????????????????????protocol ?????????????????????????????????????????????????????????????????????????????????port ????????????????????????????????????????????????port ???????????????????????????????????????????????????????????????????????????????????? rmi ???????????????????????????port ????????????????????????????????? rmiregistry ????????????????????????????????????port ??????????????????protocol ??? rmi ??????????????????????????????????????????????????? rmiregistry ????????? (1099) ????????????????????????
servername
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????rmi ???????????????????????????????????????????????????????????????????????????????????? RMI ?????????????????????????????????????????????????????????

???????????????

jstat ???????????????????????????????????????????????????????????????????????? 2 ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????jstat ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

???: ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

???????????????????????????

????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

-help
?????????????????????????????????????????????
-version
??????????????????????????????????????????
-options
?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

?????????????????????

?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????jstat ????????????????????????????????????????????????????????? statOption ???????????????????????????????????????????????? (-h???-t???????????? -J) ???????????????????????????  statOption ????????????????????????????????????????????????

??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? -h ???????????????????????????????????????????????????????????????????????????????????????  ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????2 ????????????????????????????????????????????????????????????????????????2 ?????????????????????????????????????????????????????????

-t ????????????????????????????????????Timestamp ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????Timestamp ??????????????????????????? JVM ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

interval ????????? count ?????????????????????????????????jstat ??????????????????????????????????????????????????????????????????????????????

???: ?????????????????????????????????????????????????????????????????????????????????jstat ???????????????????????????????????????????????????????????????????????????????????????jstat ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

-statOption
jstat ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? -options ?????????????????????

??????????????? ????????????
class ?????????????????????????????????????????????????????????
compiler HotSpot Just-in-Time ???????????????????????????????????????????????????
gc ??????????????????????????????????????????????????????????????????????????????
gccapacity ?????????????????????????????????????????????????????????????????????
gccause ?????????????????????????????????????????????????????? (-gcutil ?????????) ??????????????????????????? (?????????????????????) ??????????????????????????????????????????????????????
gcnew New ??????????????????????????????????????????
gcnewcapacity New ??????????????????????????????????????????????????????????????????
gcold Old ??????????????? Permanent ??????????????????????????????????????????
gcoldcapacity Old ?????????????????????????????????????????????
gcpermcapacity Permanent ?????????????????????????????????????????????
gcutil ??????????????????????????????????????????????????????
printcompilation HotSpot ???????????????????????????????????????
-h n
n ???????????? (?????????) ???????????????????????????????????? ????????????n ?????????????????????????????????????????? 0??? ?????????????????????????????????????????????????????????????????????????????????
-t n
???????????????????????????????????????????????????????????????????????????????????????????????????????????? JVM ?????????????????????????????????
-J javaOption
javaOption ??? java ??????????????????????????????????????????????????????????????????-J-Xms48m ????????????????????????????????????????????????????????? 48M ??????????????????????????????????????????????????????????????????????????????????????????java - Java ?????????????????????????????????????????????????????????????????????????????????????????????

statOption ?????????

?????????????????????jstat ??? statOption ????????????????????????????????????????????????????????????

-class ???????????????

???????????????????????????????????????
??? ??????
Loaded ?????????????????????????????????
Bytes ?????????????????? K ????????????
Unloaded ???????????????????????????????????????
Bytes ???????????????????????? K ????????????
Time ???????????????????????????????????????????????????????????????

-compiler ???????????????

HotSpot Just-In-Time ?????????????????????????????????
??? ??????
Compiled ?????????????????????????????????????????????
Failed ??????????????????????????????????????????
Invalid ????????????????????????????????????????????????
Time ???????????????????????????????????????????????????
FailedType ???????????????????????????????????????????????????????????????
FailedMethod ??????????????????????????????????????????????????????????????????

-gc ???????????????

????????????????????????????????????????????????????????????
??? ??????
S0C Survivor ?????? 0 ?????????????????? (KB)
S1C Survivor ?????? 1 ?????????????????? (KB)
S0U Survivor ?????? 0 ???????????? (KB)
S1U Survivor ?????? 1 ???????????? (KB)
EC Eden ???????????????????????? (KB)
EU Eden ?????????????????? (KB)
OC Old ???????????????????????? (KB)
OU Old ?????????????????? (KB)
PC Permanent ???????????????????????? (KB)
PU Permanent ?????????????????? (KB)
YGC ??????????????? GC ???????????????
YGCT ???????????????????????????????????????????????????
FGC ?????? GC ???????????????
FGCT ??????????????????????????????????????????
GCT ???????????????????????????????????????

-gccapacity ???????????????

????????????????????????????????????????????????
??? ??????
NGCMN New ????????????????????? (KB)
NGCMX New ????????????????????? (KB)
NGC New ???????????????????????? (KB)
S0C Survivor ?????? 0 ?????????????????? (KB)
S1C Survivor ?????? 1 ?????????????????? (KB)
EC Eden ???????????????????????? (KB)
OGCMN Old ????????????????????? (KB)
OGCMX Old ????????????????????? (KB)
OGC Old ???????????????????????? (KB)
OC Old ???????????????????????? (KB)
PGCMN Permanent ????????????????????? (KB)
PGCMX Permanent ????????????????????? (KB)
PGC Permanent ???????????????????????? (KB)
PC Permanent ???????????????????????? (KB)
YGC ??????????????? GC ???????????????
FGC ?????? GC ???????????????

-gccause ???????????????

???????????????????????????-gcutil ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? (????????????????????????) ?????????????????????????????????????????????????????????????????????????????????-gcutil ???????????????????????????????????????????????????????????????????????????????????????????????????

GC ??????????????????????????????????????????????????????????????????
??? ??????
LGCC ????????????????????????????????????????????????
GCC ????????????????????????????????????????????????

-gcnew ???????????????

New ????????????????????????
??? ??????
S0C Survivor ?????? 0 ?????????????????? (KB)
S1C Survivor ?????? 1 ?????????????????? (KB)
S0U Survivor ?????? 0 ???????????? (KB)
S1U Survivor ?????? 1 ???????????? (KB)
TT ????????????????????????
MTT ??????????????????????????????
DSS ????????? Survivor ????????? (KB)
EC Eden ???????????????????????? (KB)
EU Eden ?????????????????? (KB)
YGC ??????????????? GC ???????????????
YGCT ???????????????????????????????????????????????????

-gcnewcapacity ???????????????

New ???????????????????????????????????????
??? ??????
NGCMN          
New ????????????????????? (KB)
NGCMX     New ????????????????????? (KB)
NGC     New ???????????????????????? (KB)
S0CMX Survivor ?????? 0 ??????????????? (KB)
S0C Survivor ?????? 0 ?????????????????? (KB)
S1CMX Survivor ?????? 1 ??????????????? (KB)
S1C Survivor ?????? 1 ?????????????????? (KB)
ECMX Eden ????????????????????? (KB)
EC Eden ???????????????????????? (KB)
YGC ??????????????? GC ???????????????
FGC ?????? GC ???????????????

-gcold ???????????????

Old ????????? Permanent ????????????????????????
??? ??????
PC Permanent ???????????????????????? (KB)
PU Permanent ?????????????????? (KB)
OC Old ???????????????????????? (KB)
OU Old ?????????????????? (KB)
YGC ??????????????? GC ???????????????
FGC ?????? GC ???????????????
FGCT ??????????????????????????????????????????
GCT ???????????????????????????????????????

-gcoldcapacity ???????????????

Old ????????????????????????
??? ??????
OGCMN Old ????????????????????? (KB)
OGCMX Old ????????????????????? (KB)
OGC Old ???????????????????????? (KB)
OC Old ???????????????????????? (KB)
YGC ??????????????? GC ???????????????
FGC ?????? GC ???????????????
FGCT ??????????????????????????????????????????
GCT ???????????????????????????????????????

-gcpermcapacity ???????????????

Permanent ????????????????????????
??? ??????
PGCMN Permanent ????????????????????? (KB)
PGCMX Permanent ????????????????????? (KB)
PGC Permanent ???????????????????????? (KB)
PC Permanent ???????????????????????? (KB)
YGC ??????????????? GC ???????????????
FGC ?????? GC ???????????????
FGCT ??????????????????????????????????????????
GCT ???????????????????????????????????????

-gcutil ???????????????

??????????????????????????????????????????????????????
??? ??????
S0 Survivor ?????? 0 ???????????? (????????????????????????????????????????????????)
S1 Survivor ?????? 1 ???????????? (????????????????????????????????????????????????)
E Eden ?????????????????? (????????????????????????????????????????????????)
O Old ?????????????????? (????????????????????????????????????????????????)
P Permanent ?????????????????? (????????????????????????????????????????????????)
YGC ??????????????? GC ???????????????
YGCT ???????????????????????????????????????????????????
FGC ?????? GC ???????????????
FGCT ??????????????????????????????????????????
GCT ???????????????????????????????????????

-printcompilation ???????????????

HotSpot ???????????????????????????????????????
??? ??????
Compiled ?????????????????????????????????????????????
????????? ????????????????????????????????????????????????
??? ????????????????????????
???????????? ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????.??????????????????/??????????????????????????????????????????????????????????????????????????????????????????????????????????????? 2 ????????????????????????????????????HotSpot - XX:+PrintComplation ????????????????????????????????????

??????????????????21891 ??? lvmid ????????????????????? JVM ????????????????????????????????????

gcutil ????????????????????????

???????????????lvmid 21891 ??????????????????250 ?????????????????? 7 ?????????????????????????????????-gcutil ??????????????????????????????????????????????????????????????????

jstat -gcutil 21891 250 7
S0 S1 E O P YGC YGCT FGC FGCT GCT
12.44 0.00 27.20 9.49 96.70 78 0.176 5 0.495 0.672
12.44 0.00 62.16 9.49 96.70 78 0.176 5 0.495 0.672
12.44 0.00 83.97 9.49 96.70 78 0.176 5 0.495 0.672
0.00 7.74 0.00 9.51 96.70 79 0.177 5 0.495 0.673
0.00 7.74 23.37 9.51 96.70 79 0.177 5 0.495 0.673
0.00 7.74 43.82 9.51 96.70 79 0.177 5 0.495 0.673
0.00 7.74 58.11 9.51 96.71 79 0.177 5 0.495 0.673

???????????????????????????????????????????????????????????? 3 ????????? 4 ????????????????????????????????????????????????????????????????????????????????????????????? 0.001 ????????????????????????????????????????????? Eden ?????? (E) ?????? Old ?????? (O) ????????????????????????Old ????????????????????? 9.49% ?????? 9.51% ???????????????????????????Survivor ???????????????????????????????????? 12.44% ???????????????????????????????????????????????????????????? 7.74% ????????????????????????????????????

???????????????????????????????????????

???????????????lvmid 21891 ??????????????????250 ?????????????????????????????????????????????-gcutil ??????????????????????????????????????????????????????????????????????????????-h3 ????????????????????????????????????????????? 3 ???????????????????????????????????????????????????????????????

jstat -gcnew -h3 21891 250
S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT
64.0 64.0 0.0 31.7 31 31 32.0 512.0 178.6 249 0.203
64.0 64.0 0.0 31.7 31 31 32.0 512.0 355.5 249 0.203
64.0 64.0 35.4 0.0 2 31 32.0 512.0 21.9 250 0.204
S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT
64.0 64.0 35.4 0.0 2 31 32.0 512.0 245.9 250 0.204
64.0 64.0 35.4 0.0 2 31 32.0 512.0 421.1 250 0.204
64.0 64.0 0.0 19.0 31 31 32.0 512.0 84.4 251 0.204
S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT
64.0 64.0 0.0 19.0 31 31 32.0 512.0 306.7 251 0.204

????????????????????????????????????????????????????????????????????????????????????2 ????????? 3 ??????????????????????????? Young GC ??????????????????????????????????????????????????????????????? 0.001 ????????????????????????????????????????????????Survivor ?????? 0 ???????????? (S0U) ???????????? Survivor ????????? (DSS) ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????Old ?????? (???????????????????????????) ?????????????????????????????????????????? (TT) ??????31 ?????? 2 ???????????????????????????

??????????????????????????????5 ????????? 6 ????????????????????????????????????????????????????????????????????????????????????Survivor ????????????????????????????????????????????????????????? 31 ?????????????????????

???????????????????????????????????????????????????

???????????????lvmid 21891 ???????????????250 ?????????????????? 3 ?????????????????????????????????????????????-t ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

jstat -gcoldcapacity -t 21891 250 3
Timestamp OGCMN OGCMX OGC OC YGC FGC FGCT GCT
150.1 1408.0 60544.0 11696.0 11696.0 194 80 2.874 3.799
150.4 1408.0 60544.0 13820.0 13820.0 194 81 2.938 3.863
150.7 1408.0 60544.0 13820.0 13820.0 194 81 2.938 3.863

Timestamp ??????????????????????????? JVM ????????????????????????????????????????????????????????????????????????????????????????????????-gcoldcapacity ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????Old ??????????????? (OGC) ??? Old ??????????????? (OC) ???????????????????????????????????????????????????Old ??????????????? (OGC) ??????81 ??????????????? GC (FGC) ?????????11696 KB ?????? 13820 KB ???????????????????????????Old ?????? (???????????????) ?????????????????????60544 KB (OGCMX) ??????????????????????????????????????????????????????????????????

???????????? JVM ???????????????????????????????????????????????????

???????????????-gcutil ?????????????????????????????????remote.domain ??????????????????????????? lvmid 40496 ??????????????????????????????????????????????????????????????????????????????

jstat -gcutil 40496@remote.domain 1000
... output omitted

lvmid ?????????????????????????????????????????????????????????40496@remote.domain ??? vmid ??????????????????????????????????????????????????? vmid ??????rmi ?????????????????????????????????????????????????????????????????????????????? jstatd ?????????????????????????????????jstatd ??????????????????rmiregistry ???????????????????????????????????? rmiregistry ????????? (????????? 1099) ???????????????????????? remote.domain ???????????????????????????

????????????


Copyright © 1995-2010 Sun Microsystems, Inc. All Rights Reserved.

Please send comments using this Feedback page.
Sun Microsystems, Inc.
Java Technology