标签:code back 类加载 alt man 显示 tis monit rem
命令格式
1 | jstat [options] VMID [interval] [count] |
jstat [options] VMID [interval] [count]
Option | Displays |
---|---|
class | 类加载的行为统计。Statistics on the behavior of the class loader. |
compiler | HotSpt JIT编译器行为统计。Statistics of the behavior of the HotSpot Just-in-Time compiler. |
gc | 垃圾回收堆的行为统计。Statistics of the behavior of the garbage collected heap. |
gccapacity | 各个垃圾回收代容量(young,old,perm)和他们相应的空间统计。Statistics of the capacities of the generations and their corresponding spaces. |
gcutil | 垃圾回收统计概述(百分比)。Summary of garbage collection statistics. |
gccause | 垃圾收集统计概述(同-gcutil),附加最近两次垃圾回收事件的原因。Summary of garbage collection statistics (same as -gcutil), with the cause of the last and |
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. |
printcompilation | HotSpot编译方法统计。HotSpot compilation method statistics. |
-class (监视类装载、卸载数量、总空间以及耗费的时间)
1 2 3 4 5 | [root@localhost bin] # jstat -class 4513 Loaded Bytes Unloaded Bytes Time 8455 17240.8 0 0.0 15.47 |
[root@localhost bin]# jstat -class 4513
Loaded Bytes Unloaded Bytes Time
8455 17240.8 0 0.0 15.47
-compiler(输出JIT编译过的方法数量耗时等)
1 2 3 | [root@localhost bin] # jstat -compiler 4513 Compiled Failed Invalid Time FailedType FailedMethod 1255 0 0 16.47 0 |
[root@localhost bin]# jstat -compiler 4513
Compiled Failed Invalid Time FailedType FailedMethod
1255 0 0 16.47 0
-gc(垃圾回收堆的行为统计,常用命令)
1 2 3 | [root@localhost bin] # jstat -gc 4513 S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT 52224.0 53248.0 19364.2 0.0 804864.0 74967.7 168448.0 80595.4 52736.0 52628.1 10 0.232 0 0.000 0.232 |
1 | [root@localhost bin] # jstat -gc 4513 2000 2 |
[root@localhost bin]# jstat -gc 4513 2000 2
-gccapacity(同-gc,还会输出Java堆各区域使用到的最大、最小空间)
1 2 3 | [root@localhost bin] # jstat -gccapacity 4513 NGCMN NGCMX NGC S0C S1C EC OGCMN OGCMX OGC OC PGCMN PGCMX PGC PC YGC FGC 84480.0 1349632.0 913408.0 54272.0 51200.0 502784.0 168448.0 2699264.0 168448.0 168448.0 21504.0 83968.0 51712.0 51712.0 9 0 |
[root@localhost bin]# jstat -gccapacity 4513
NGCMN NGCMX NGC S0C S1C EC OGCMN OGCMX OGC OC PGCMN PGCMX PGC PC YGC FGC
84480.0 1349632.0 913408.0 54272.0 51200.0 502784.0 168448.0 2699264.0 168448.0 168448.0 21504.0 83968.0 51712.0 51712.0 9 0
-gcutil(同-gc,输出的是已使用空间占总空间的百分比)
1 2 3 | [root@localhost bin] # jstat -gcutil 4513 S0 S1 E O P YGC YGCT FGC FGCT GCT 0.00 79.23 38.90 39.92 99.74 9 0.198 0 0.000 0.198 |
[root@localhost bin]# jstat -gcutil 4513
S0 S1 E O P YGC YGCT FGC FGCT GCT
0.00 79.23 38.90 39.92 99.74 9 0.198 0 0.000 0.198
-gccause(垃圾收集统计概述(同-gcutil),附加最近两次垃圾回收事件的原因)
1 2 3 | [root@localhost bin] # jstat -gccause 4513 S0 S1 E O P YGC YGCT FGC FGCT GCT LGCC GCC 0.00 79.23 39.37 39.92 99.74 9 0.198 0 0.000 0.198 Allocation Failure No GC |
[root@localhost bin]# jstat -gccause 4513
S0 S1 E O P YGC YGCT FGC FGCT GCT LGCC GCC
0.00 79.23 39.37 39.92 99.74 9 0.198 0 0.000 0.198 Allocation Failure No GC
-gcnew(统计新生代行为)
1 2 3 | [root@localhost bin] # jstat -gcnew 4513 S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT 54272.0 51200.0 0.0 40565.8 2 15 54272.0 502784.0 197950.5 9 0.198 |
[root@localhost bin]# jstat -gcnew 4513
S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT
54272.0 51200.0 0.0 40565.8 2 15 54272.0 502784.0 197950.5 9 0.198
-gcnewcapacity(新生代与其相应的内存空间的统计)
1 2 3 | [root@localhost bin] # jstat -gcnewcapacity 4513 NGCMN NGCMX NGC S0CMX S0C S1CMX S1C ECMX EC YGC FGC 84480.0 1349632.0 913408.0 449536.0 54272.0 449536.0 51200.0 1348608.0 502784.0 9 0 |
[root@localhost bin]# jstat -gcnewcapacity 4513
NGCMN NGCMX NGC S0CMX S0C S1CMX S1C ECMX EC YGC FGC
84480.0 1349632.0 913408.0 449536.0 54272.0 449536.0 51200.0 1348608.0 502784.0 9 0
-gcold(统计老年代行为)
1 2 3 | [root@localhost bin] # jstat -gcold 4513 PC PU OC OU YGC FGC FGCT GCT 51712.0 51575.1 168448.0 67239.6 9 0 0.000 0.198 |
-gcoldcapacity(老年代与其相应的内存空间的统计)
1 2 3 | [root@localhost bin] # jstat -gcoldcapacity 4513 OGCMN OGCMX OGC OC YGC FGC FGCT GCT 168448.0 2699264.0 168448.0 168448.0 9 0 0.000 0.198 |
[root@localhost bin]# jstat -gcoldcapacity 4513
OGCMN OGCMX OGC OC YGC FGC FGCT GCT
168448.0 2699264.0 168448.0 168448.0 9 0 0.000 0.198
-gcpermcapacity(永久代与其相应内存空间的统计)
1 2 3 | [root@localhost bin] # jstat -gcpermcapacity 4513 PGCMN PGCMX PGC PC YGC FGC FGCT GCT 21504.0 83968.0 51712.0 51712.0 9 0 0.000 0.19 |
[root@localhost bin]# jstat -gcpermcapacity 4513
PGCMN PGCMX PGC PC YGC FGC FGCT GCT
21504.0 83968.0 51712.0 51712.0 9 0 0.000 0.198
-printcompilation(hotspot编译方法统计)
1 2 3 | [root@localhost bin] # jstat -printcompilation 4513 Compiled Size Type Method 1261 1261 1 java /util/concurrent/ScheduledThreadPoolExecutor $DelayedWorkQueue take |
[root@localhost bin]# jstat -printcompilation 4513
Compiled Size Type Method
1261 1261 1 java/util/concurrent/ScheduledThreadPoolExecutor$DelayedWorkQueue take
标签:code back 类加载 alt man 显示 tis monit rem
原文地址:http://www.cnblogs.com/myna/p/7567769.html