jstat命令

来源:互联网 发布:数据分析面试题及答案 编辑:程序博客网 时间:2024/06/03 18:40

jstat命令的格式如下:

jstat [-options] [vmid] [间隔时间/毫秒] [查询次数]

常见的options有:

l class (类加载器)
l compiler (JIT)
l gc (GC堆状态)
l gccapacity (各区大小)
l gccause (最近一次GC统计和原因)
l gcnew (新区统计)
l gcnewcapacity (新区大小)
l gcold (老区统计)
l gcoldcapacity (老区大小)
l gcpermcapacity (永久区大小)
l gcutil (GC统计汇总)
l printcompilation (HotSpot编译统计)

1.jstat -gcutil

[sre@CDM1E03-209010065 ~]$ jstat -gcutil 9956
S0 S1 E O P YGC YGCT FGC FGCT GCT
22.61 0.00 84.75 12.57 99.62 282 5.876 0 0.000 5.876

name desc S0 SURVIVOR0 space使用百分比 S1 SURVIVOR1 space使用百分比 E Eden space使用百分比 O Old space使用百分比 P Permanent space使用百分比 YGCT Number of young generation GC events FGC Young generation garbage collection time FGCT Number of full GC events FGCT Full garbage collection time GCT Total garbage collection time

2.jstat -gc

[sre@CDM1E03-209010065 ~]$ jstat -gc 9956
S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT
27136.0 27648.0 0.0 6352.0 992768.0 185532.0 2097152.0 264019.0 63488.0 63246.4 283 5.892 0 0.000 5.892

name desc S0C 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 Current eden space capacity (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

3.jstat -gccapacity

[sre@CDM1E03-209010065 ~]$ jstat -gccapacity 9956
NGCMN NGCMX NGC S0C S1C EC OGCMN OGCMX OGC OC PGCMN PGCMX PGC PC YGC FGC
1048576.0 1048576.0 1048576.0 27136.0 27648.0 992768.0 2097152.0 2097152.0 2097152.0 2097152.0 21504.0 83968.0 63488.0 63488.0 283 0

name desc 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) OG Current old space capacity (KB) PGCMN Minimum permanent generation capacity (KB) PGCMX Maximum Permanent generation capacity (KB) PGC Current Permanent generation capacity (KB) PG Current Permanent space capacity (KB) YGC Number of Young generation GC Events FGC Number of Full GC Events

4.jstat -gccause

[sre@CDM1E03-209010065 ~]$ jstat -gccause 9956
S0 S1 E O P YGC YGCT FGC FGCT GCT LGCC GCC
0.00 22.97 91.12 12.59 99.62 283 5.892 0 0.000 5.892 Allocation Failure No GC

-gccause与-gcutil相比,多展示了两列

name desc LGCC Cause of last Garbage Collection GCC Cause of current Garbage Collection

5.jstat -gcnew

[sre@CDM1E03-209010065 ~]$ jstat -gcnew 9956
S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT
27136.0 26624.0 6827.0 0.0 1 15 26624.0 994816.0 44565.8 284 5.910

name desc TT Tenuring threshold MTT Maximum tenuring threshold DSS Desired survivor size (KB)

6.jstat -gcnewcapacity

7.jstat -gcold

8.jstat -gcoldcapacity

9.jstat -gcpermcapacity

0 0
原创粉丝点击