[Turn] jstat to view the GC situation of jvm

jps (Java Virtual Machine Process Status Tool) is a command provided by JDK 1.5 to display the pid of all current java processes. It is simple and practical, and is very suitable for simply viewing some simple situations of the current java process on the linux/unix platform.

jps is stored in JAVA_HOME/bin/jps, please add JAVA_HOME/bin/ to Path.

 

 

jstat 
       1. jstat -gc pid 
            can display gc information, check the number and time of gc. 
            The last five items are the number of young gc, the time of young gc, the number of full gc, the time of full gc, and the total time of gc. 
      2. jstat -gccapacity pid 
            can display the usage and size of three generations (young, old, perm) objects in VM memory, for 
            example: PGCMN displays the minimum perm memory usage, PGCMX displays the perm maximum memory usage , 
            PGC is the current newly generated perm memory footprint, PC is the previous perm memory footprint. 
            Others can be analogized according to this, OC is the pure occupancy in old. 
     3.jstat -gcutil pid 
            statistics gc information statistics. 
     4.jstat -gcnew pid 
           young generation object information. 
     5.jstat -gcnewcapacity pid 
           young generation object information and its occupancy. 
     6.jstat -gcold pid 
          old generation object information. 
     7. jstat -gcoldcapacity pid 
          Information about old generation objects and their occupancy. 
     8.jstat -gcpermcapacity pid 
          perm object information and its occupancy. 
     9.jstat -class pid 
          displays information such as the number of loaded classes and the space they occupy. 
     10.jstat -compiler pid 
          displays information such as the number of VM real-time compilations. 
     11.jstat -printcompilation pid 
          current VM execution information. 
        Chinese explanation of some terms: 
         S0C: The capacity of the first survivor (survivor area) in the young generation (bytes) 
         S1C: The capacity of the second survivor (survivor area) in the young generation (bytes) 
         S0U: The first survivor in the young generation A survivor (survivor area) currently used space (bytes) 
         S1U: the second survivor (survivor area) in the young generation currently used space (bytes) 
         EC: the capacity of Eden (Eden) in the young generation (bytes )
         EU: Eden (Eden) in the young generation currently used space (bytes) 
         OC: Old generation capacity (bytes) 
         OU: Old generation currently used space (bytes) 
         PC: Perm (persistent generation) capacity ( byte) 
         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 : 最大持有次数限制 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326668048&siteId=291194637