93.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
		




原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
运维 监控 网络协议
译|llustrated Guide to Monitoring and Tuning the Linux Networking Stack: Receiving Data
译|llustrated Guide to Monitoring and Tuning the Linux Networking Stack: Receiving Data
141 0
sun.jvm.hotspot.runtime.VMVersionMismatchException: Supported versions are 25.221-b11. Target VM
今天在查看 JVM 堆内存具体使用情况的时候,执行 jmap 命令发现如下的报错信息,报错说的是虚拟机版本不匹配,感觉很奇怪因为我刚在另外一台机器上执行了这个命令,换了一台机器就执行报错,初步判断是机器环境的问题,最后对比了两个机器的 JDK 环境,发现报错的这台机器上有两个不同版本的 JDK 所以推测跟多个版本有关系.
|
Java Android开发
Java Heap Space: Understanding and Resolving Memory Issues
Java Heap Space: Understanding and Resolving Memory Issues
|
Java Unix Linux
The JVM Tool Interface (JVM TI): How VM Agents Work
The JVM Tool Interface (JVM TI): How VM Agents Work
176 0
|
Java
Java Virtual Machine Process Status Tool <jps>
jps(Java Virtual Machine Process Status Tool)是java提供的一个显示当前所有java进程pid的命令
87 0