jstat用法

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

vmid 可用jps -ml查看

1.generalOption:

-help Display help message.
-version Display version information.
-options Display list of statistics options. See the Output Options section below.

2.outputOptions:

class      类加载器行为统计,Statistics on the behavior of the class loader.
compiler JIT编译器行为,Statistics of the behavior of the HotSpot Just-in-Time compiler.
gc heap   垃圾收集行为,Statistics of the behavior of the garbage collected heap.
gccapacity 各代区域容量统计,Statistics of the capacities of the generations and their corresponding spaces.
gccause 类似-gcutil,附上垃圾收集的原因。Summary of garbage collection statistics (same as -gcutil), with the cause of the last and current (if applicable) garbage collection events.
gcnew 新生代gc行为。Statistics of the behavior of the new generation.
gcnewcapacity 新生代容量统计。Statistics of the sizes of the new generations and its corresponding spaces.
gcold 老生代gc行为。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 当前JVM垃圾收集描述。Summary of garbage collection statistics.
printcompilation 方法编译统计。HotSpot compilation method statistics. 


jstat [ generalOption | outputOptions vmid [interval[s|ms] [count]] ]
jstat -op -t -h20 vmid ms/m

-t 第一列附加启动以来的timestamp
-h20 每打印20行时附加列头信息
vmid  jvm进程id
ms/m   打印时长间隔



各选项输出列说明
-gc Option

examples:

jstat -gc -h50 29617 3000
每隔3000ms输出一次gc统计信息,且每隔50行输出一次列头信息
S0C    S1C    S0U    S1U      EC       EU        OC         OU       PC     PU    YGC     YGCT    FGC    FGCT     GCT  
9536.0 9152.0 544.0   0.0   68672.0  66932.0   174784.0   88186.1   53120.0 51319.9     36    0.902   1      0.139    1.041
9536.0 9152.0 544.0   0.0   68672.0  66932.0   174784.0   88186.1   53120.0 51319.9     36    0.902   1      0.139    1.041

Garbage-collected heap statistics  Column Description

S0C  Current survivor space 0 capacity (KB). 当前Survivor 0容量
S1C  Current survivor space 1 capacity (KB). 当前Survivor 1容量
S0U  Survivor space 0 utilization (KB). 当前Survivor 0占用
S1U  Survivor space 1 utilization (KB). 当前Survivor 1占用
EC  Current eden space capacity (KB). 当前eden容量
EU  Eden space utilization (KB). 当前eden占用
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. 年轻代GC累计次数
YGCT  Young generation garbage collection time. 年轻代GC耗时
FGC  Number of full GC events. Full GC 累计次数
FGCT  Full garbage collection time. Full GC 累计耗时
GCT  Total garbage collection time.  总GC累计耗时

总堆:262144k
新生代:98304K
幸存0:12288k
幸存1:12288k
eden:73728k
老生代:163840k
永久代初始:51200K
永久代最大:65536K

 

你可能感兴趣的:(jvm)