jstat命令

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

namedesc
S0SURVIVOR0 space使用百分比
S1SURVIVOR1 space使用百分比
EEden space使用百分比
OOld space使用百分比
PPermanent space使用百分比
YGCTNumber of young generation GC events
FGCYoung generation garbage collection time
FGCTNumber of full GC events
FGCTFull garbage collection time
GCTTotal 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

namedesc
S0CCurrent survivor space 0 capacity (KB).
S1CCurrent survivor space 1 capacity (KB)
S0USurvivor space 0 utilization (KB)
S1USurvivor space 1 utilization (KB)
ECCurrent eden space capacity (KB)
EUCurrent eden space capacity (KB)
OCCurrent old space capacity (KB)
OUOld space utilization (KB)
PCCurrent permanent space capacity (KB)
PUPermanent space utilization (KB)
YGCNumber of young generation GC Events
YGCTYoung generation garbage collection time
FGCNumber of full GC events
FGCTFull garbage collection time
GCTTotal 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

namedesc
NGCMNMinimum new generation capacity (KB)
NGCMXMaximum new generation capacity (KB)
NGCCurrent new generation capacity (KB)
S0CCurrent survivor space 0 capacity (KB)
S1CCurrent survivor space 1 capacity (KB)
ECCurrent eden space capacity (KB)
OGCMNMinimum old generation capacity (KB)
OGCMXMaximum old generation capacity (KB)
OGCCurrent old generation capacity (KB)
OGCurrent old space capacity (KB)
PGCMNMinimum permanent generation capacity (KB)
PGCMXMaximum Permanent generation capacity (KB)
PGCCurrent Permanent generation capacity (KB)
PGCurrent Permanent space capacity (KB)
YGCNumber of Young generation GC Events
FGCNumber 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相比,多展示了两列

namedesc
LGCCCause of last Garbage Collection
GCCCause 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

namedesc
TTTenuring threshold
MTTMaximum tenuring threshold
DSSDesired survivor size (KB)

6.jstat -gcnewcapacity

7.jstat -gcold

8.jstat -gcoldcapacity

9.jstat -gcpermcapacity

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值