jstat命令

1. C:\Users\Administrator>jstat -option

invalid argument count
Usage: jstat -help|-options
       jstat -<option> [-t] [-h<lines>] <vmid> [<interval> [<count>]]

Definitions:
  <option>      An option reported by the -options option
  <vmid>        Virtual Machine Identifier. A vmid takes the following form:
                     <lvmid>[@<hostname>[:<port>]]
                Where <lvmid> is the local vm identifier for the target
                Java virtual machine, typically a process id; <hostname> is
                the name of the host running the target Java virtual machine;
                and <port> is the port number for the rmiregistry on the
                target host. See the jvmstat documentation for a more complete
                description of the Virtual Machine Identifier.
  <lines>       Number of samples between header lines.
  <interval>    Sampling interval. The following forms are allowed:
                    <n>["ms"|"s"]
                Where <n> is an integer and the suffix specifies the units as
                milliseconds("ms") or seconds("s"). The default units are "ms".
  <count>       Number of samples to take before terminating.
  -J<flag>      Pass <flag> directly to the runtime system.

 

2. C:\Users\Administrator>jstat -options

-class                            统计class loader 信息
-compiler                       统计编译信息
-gc                                统计JVM中 gc 的堆栈信息
-gccapacity                  统计不同的generations 的 堆栈容量信息
-gccause                      统计GC情况,并带有GC的 原因(这个对内存泄露调优等有很大的用处)
-gcmetacapacity            统计GC元数据容量信息
-gcnew                            统计gc时,新生代的情况
-gcnewcapacity              统计gc时,新生代 heap 容量 
-gcold                             统计gc时,老年代的情况
-gcoldcapacity                统计gc时,老年代 heap 容量 
-gcutil                            统计gc时,heap情况 
-printcompilation            从字节码转化成本地代码的编译信息

 

 

3. C:\Users\Administrator>jstat -gc -h5  8336 3000 1000


 S0C    S1C    S0U    S1U      EC       EU        OC         OU       MC     MU    CCSC   CCSU   YGC     YGCT    FGC    FGCT     GCT
10752.0 10752.0  0.0    0.0   65024.0  10404.7   173568.0     0.0     4480.0 766.2  384.0   75.8       0    0.000   0      0.000    0.000

 

参数说明:

  • S0C:第一个幸存区的大小
  • S1C:第二个幸存区的大小
  • S0U:第一个幸存区的使用大小
  • S1U:第二个幸存区的使用大小
  • EC:年轻代中Eden(伊甸园)区的大小
  • EU:年轻代中Eden(伊甸园区的使用大小
  • OC:老年代大小
  • OU:老年代使用大小
  • MC:方法区大小
  • MU:方法区使用大小
  • CCSC:压缩类空间大小
  • CCSU:压缩类空间使用大小
  • YGC:年轻代垃圾回收次数
  • YGCT:年轻代垃圾回收消耗时间
  • FGC:老年代Full GC 垃圾回收次数
  • FGCT:老年代Full GC 垃圾回收消耗时间
  • GCT:垃圾回收消耗总时间

 

4. C:\Users\Administrator>jstat -gccause -h5  8336 3000 1000


  S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT    LGCC                 GCC
  0.00   0.00  16.00   0.00  17.10  19.74      0    0.000     0    0.000    0.00    0 No GC                No GC

  • E : Heap上的 Eden space 区已使用空间的百分比
  • O :Heap上的 Old space 区已使用空间的百分比
  • M :Heap上的 Method space 区已使用空间的百分比
  • P : Perm space 区已使用空间的百分比
  • LGCC    : Last gc 回收总数
  • GCC  : gc 收集次数

 

5. C:\Users\Administrator>jstat -printcompilation -h5  8336 3000 1000

Compiled  Size  Type Method
     224    299    1 java/util/concurrent/LinkedBlockingQueue offer
     224    299    1 java/util/concurrent/LinkedBlockingQueue offer
 

  • Compiled:最近编译方法的数量
  • Size:最近编译方法的字节码数量
  • Type:最近编译方法的编译类型。
  • Method:方法名标识。

 

转载于:https://my.oschina.net/Rayn/blog/747873

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值