jstat 详解(转)

来自:http://blog.163.com/yangshuo_qq/blog/static/2554680201272871350110/

jstat

       1. jstat -gc pid

            可以显示gc的信息,查看gc的次数,及时间。

            其中最后五项,分别是young gc的次数,young gc的时间,full gc的次数,full gc的时间,gc的总时间。

      2.jstat -gccapacity pid

            可以显示,VM内存中三代(young,old,perm)对象的使用和占用大小,

            如:PGCMN显示的是最小perm的内存使用量,PGCMX显示的是perm的内存最大使用量,

            PGC是当前新生成的perm内存占用量,PC是但前perm内存占用量。

            其他的可以根据这个类推, OC是old内纯的占用量。

     3.jstat -gcutil pid

            统计gc信息统计。

     4.jstat -gcnew pid

           年轻代对象的信息。

     5.jstat -gcnewcapacity pid

           年轻代对象的信息及其占用量。

     6.jstat -gcold pid

          old代对象的信息。

     7.stat -gcoldcapacity pid

          old代对象的信息及其占用量。

     8.jstat -gcpermcapacity pid

          perm对象的信息及其占用量。

     9.jstat -class pid

          显示加载class的数量,及所占空间等信息。
     10.jstat -compiler pid

          显示VM实时编译的数量等信息。

     11.stat -printcompilation pid

          当前VM执行的信息。

        一些术语的中文解释:

         S0C:年轻代中第一个survivor(幸存区)的容量 (字节)
         S1C:年轻代中第二个survivor(幸存区)的容量 (字节)
         S0U:年轻代中第一个survivor(幸存区)目前已使用空间 (字节)
         S1U:年轻代中第二个survivor(幸存区)目前已使用空间 (字节)
           EC:年轻代中Eden(伊甸园)的容量 (字节)
           EU:年轻代中Eden(伊甸园)目前已使用空间 (字节)
           OC:Old代的容量 (字节)
           OU:Old代目前已使用空间 (字节)
           PC:Perm(持久代)的容量 (字节)
           PU:Perm(持久代)目前已使用空间 (字节)
         YGC:从应用程序启动到采样时年轻代中gc次数
       YGCT:从应用程序启动到采样时年轻代中gc所用时间(s)
         FGC:从应用程序启动到采样时old代(全gc)gc次数
       FGCT:从应用程序启动到采样时old代(全gc)gc所用时间(s)
         GCT:从应用程序启动到采样时gc用的总时间(s)

    NGCMN:年轻代(young)中初始化(最小)的大小 (字节)

    NGCMX:年轻代(young)的最大容量 (字节)

        NGC:年轻代(young)中当前的容量 (字节)

   OGCMN:old代中初始化(最小)的大小 (字节) 

   OGCMX:old代的最大容量 (字节)

       OGC:old代当前新生成的容量 (字节)

   PGCMN:perm代中初始化(最小)的大小 (字节) 

   PGCMX:perm代的最大容量 (字节)   

       PGC:perm代当前新生成的容量 (字节)

          S0:年轻代中第一个survivor(幸存区)已使用的占当前容量百分比

         S1:年轻代中第二个survivor(幸存区)已使用的占当前容量百分比

           E:年轻代中Eden(伊甸园)已使用的占当前容量百分比

           O:old代已使用的占当前容量百分比

           P:perm代已使用的占当前容量百分比

  S0CMX:年轻代中第一个survivor(幸存区)的最大容量 (字节)

 S1CMX :年轻代中第二个survivor(幸存区)的最大容量 (字节)

    ECMX:年轻代中Eden(伊甸园)的最大容量 (字节)

       DSS:当前需要survivor(幸存区)的容量 (字节)(Eden区已满)

          TT: 持有次数限制

       MTT : 最大持有次数限制

      sun 官方文档  http://download.oracle.com/javase/1.5.0/docs/tooldocs/share/jstat.html

Using jstat with BEA JRockit

来自:http://blog.csdn.net/chenyi8888/article/details/8484626

Statistics Options and Output

The following table lists all available statistical options, statOption, when using BEA JRockit. The tables that follow, summarize the columns that jstat outputs for each statOption.

statOption

Displays

-class

Statistics on the behavior of the class loader.

-compiler

Statistics of the behavior of the JRockit compiler.

-gc

Statistics of the behavior of the garbage collected heap.

-gcpause

Statistics of garbage collection pauses.

-printjit

Statistic on the latest JIT compiler operations.

-printopt

Statistic on the latest optimizing compiler operations.

 

-class statOption

Column

Description

Loaded

Number of classes loaded.

Bytes

Number of Kbytes loaded.

Unloaded

Number of classes unloaded.

Bytes

Number of Kbytes unloaded.

-compiler statOption

Column

Description

Compiled

Number of compilation tasks performed.

Jitted

Number of JIT compilation tasks performed.

Optimized

Number of optimization compilation tasks performed.

Time

Time spent performing compilation tasks.

TotalTimeJit

Time spent performing JIT compilation tasks.

TotalTimeOpt

Time spent performing optimizing compilation tasks.

-printjit statOption

Column

Description

Jitted

Number of JIT compilation tasks performed.

TotalTimeJit

Time spent performing JIT compilation tasks.

LastJitMethod

The last method compiled by the JIT.

-printopt statOption

Column

Description

Optimized

Number of optimization compilation tasks performed.

TotalTimeOpt

Time spent performing optimizing compilation tasks.

LastOptMethod

The last method compiled by the optimizing compiler.

-gc statOption

Column

Description

HeapSize

Heap size (KB).

NurserySize

Nursery size (KB).

UsedHeapSize

Used heap size (KB).

YC

Number of young generation collections.

OC

Number of old generation collections.

YCTime

Young generation garbage collection time (s).

OCTime

Old generation garbage collection time (s).

GCTime

Total garbage collection time (s).

YCPauseTime

Young generation pause time (s).

OCPauseTime

Old generation pause time (s).

PauseTime

Total pause time (s).

Finalizers

Number of pending finalizers.

-gcpause statOption

Column

Description

YC

Number of young generation collections.

OC

Number of old generation collections.

YCPauseTime

Young generation pause time (s).

OCPauseTime

Old generation pause time (s).

PauseTime

Total pause time (s).

posted @ 2015-05-25 17:20  悟寰轩-叶秋  阅读(627)  评论(0)    收藏  举报