Home | 简体中文 | 繁体中文 | 杂文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 作品与服务 | Email

14.4. jstat - Java Virtual Machine Statistics Monitoring Tool

# jstat -class 15888 1000 10
Loaded  Bytes  Unloaded  Bytes     Time   
 17409 34782.5      231   339.0      13.21
 17409 34782.5      231   339.0      13.21
 17409 34782.5      231   339.0      13.21
 17409 34782.5      231   339.0      13.21
 17409 34782.5      231   339.0      13.21
 17409 34782.5      231   339.0      13.21		
		
# jstat -gc 15888 1000 10
 S0C    S1C    S0U    S1U      EC       EU        OC         OU       PC     PU    YGC     YGCT    FGC    FGCT     GCT   
13824.0 13824.0 1204.1  0.0   2766848.0 2327059.3  349696.0   318073.6  229888.0 101912.6    288    4.895   2      1.055    5.949
13824.0 13824.0 1204.1  0.0   2766848.0 2327059.3  349696.0   318073.6  229888.0 101912.6    288    4.895   2      1.055    5.949
13824.0 13824.0 1204.1  0.0   2766848.0 2327059.3  349696.0   318073.6  229888.0 101912.6    288    4.895   2      1.055    5.949
13824.0 13824.0 1204.1  0.0   2766848.0 2327059.3  349696.0   318073.6  229888.0 101912.6    288    4.895   2      1.055    5.949		
		
# jstat -gcutil 15888
  S0     S1     E      O      P     YGC     YGCT    FGC    FGCT     GCT   
  8.71   0.00  84.12  90.96  44.33    288    4.895     2    1.055    5.949		
		
# jstat -compiler 15888
Compiled Failed Invalid   Time   FailedType FailedMethod
    2987      0       0    59.55          0  		
		
# jstat -gccapacity 15888
 NGCMN    NGCMX     NGC     S0C   S1C       EC      OGCMN      OGCMX       OGC         OC      PGCMN    PGCMX     PGC       PC     YGC    FGC 
175104.0 2796544.0 2794496.0 13824.0 13824.0 2766848.0   349696.0  5592064.0   349696.0   349696.0  65536.0 524288.0 229888.0 229888.0    288     2		
		
# jstat -gcnew 15888
 S0C    S1C    S0U    S1U   TT MTT  DSS      EC       EU     YGC     YGCT  
13824.0 13824.0 1204.1    0.0  1  15 13824.0 2766848.0 2327429.8    288    4.895		
		
# jstat -gcnewcapacity 15888
  NGCMN      NGCMX       NGC      S0CMX     S0C     S1CMX     S1C       ECMX        EC      YGC   FGC 
  175104.0  2796544.0  2794496.0 931840.0  13824.0 931840.0  13824.0  2795520.0  2766848.0   288     2		
		
# jstat -gcold 15888
   PC       PU        OC          OU       YGC    FGC    FGCT     GCT   
229888.0 101912.6    349696.0    318073.6    288     2    1.055    5.949		
		
# jstat -gcoldcapacity 15888
   OGCMN       OGCMX        OGC         OC       YGC   FGC    FGCT     GCT   
   349696.0   5592064.0    349696.0    349696.0   288     2    1.055    5.949		
		

每 1000 毫秒打印一次,一共打印 5 次,还可以加上 -h3 每三行显示一下标题。

# jstat -printcompilation -h3 15888
Compiled  Size  Type Method
    2987     91    1 org/apache/catalina/connector/Request isAlpha
		
comments powered by Disqus