Jstat查看JVM统计信息

命令格式

options: -class ,-compliler,-gc,-printcompilation

类装载:

[root@iZ4jc05catqgal8iwrpyhxZ bin]# ./jstat -class 18692

Loaded  Bytes  Unloaded  Bytes     Time  

 16934 34342.0       72   106.7     361.47

-class option

Class loader statistics.

Loaded: Number of classes loaded.   //加载的类的个数

Bytes: Number of kBs loaded.          //加载了多个k

Unloaded: Number of classes unloaded. //卸载的类的个数

Bytes: Number of Kbytes unloaded.       //卸载了多个k

Time: Time spent performing class loading and unloading operations. //类加载和类卸载的时间

[root@iZ4jc05catqgal8iwrpyhxZ bin]# ./jstat -class 18692 1000 10

Loaded  Bytes  Unloaded  Bytes     Time  

 16934 34342.0       72   106.7     361.47

 16934 34342.0       72   106.7     361.47

 16934 34342.0       72   106.7     361.47

 16934 34342.0       72   106.7     361.47

 16934 34342.0       72   106.7     361.47

 16934 34342.0       72   106.7     361.47

 16934 34342.0       72   106.7     361.47

 16934 34342.0       72   106.7     361.47

每隔1秒打印1次,共输出10次

垃圾收集

 -gc  -gcutil  -gccause  -gcnew  -gclod

[root@iZ4jc05catqgal8iwrpyhxZ bin]# ./jstat -gc 18692

 S0C    S1C    S0U    S1U      EC       EU        OC         OU       MC     MU    CCSC   CCSU   YGC     YGCT    FGC    FGCT     GCT  

34944.0 34944.0  0.0   11177.6 279744.0  5863.7   699072.0   227001.6  109952.0 107869.1 12672.0 12211.7     53    2.253   4      0.887    3.140

[root@iZ4jc05catqgal8iwrpyhxZ bin]# ./jstat -gc 18692 1000 10

……

-gc option

Garbage-collected heap statistics.

S0C: Current survivor space 0 capacity (kB).    S0的总量

S1C: Current survivor space 1 capacity (kB).    S1的总量

S0U: Survivor space 0 utilization (kB).    //S0使用量

S1U: Survivor space 1 utilization (kB).    //S1使用量

EC: Current eden space capacity (kB).    //Eden区总量

EU: Eden space utilization (kB).           //Eden区使用量

OC: Current old space capacity (kB).      //Old区总量

OU: Old space utilization (kB).             //Old区使用量

MC: Metaspace capacity (kB).             // Metacspace区总量

MU: Metacspace utilization (kB).           // Metacspace区使用量

CCSC: Compressed class space capacity (kB).   // 压缩类空间的总量

CCSU: Compressed class space used (kB).      // 压缩类空间的使用量

YGC: Number of young generation garbage collection events.   YoungGC的次数

YGCT: Young generation garbage collection time.             YoungGC的时间

FGC: Number of full GC events.                             FullGC的次数

FGCT: Full garbage collection time.                         FullGC的时间

GCT: Total garbage collection time.                         总的GC时间

 

Young=S0+S1+Eden

堆区=Young区+Old区

S0和S1在同一时间点上只会启动1个

非堆区:操作系统的本地内存,独立于JVM之外的

CCS:启用短指针时用到

CodeCache:git的代码信息,java代码转换为Native代码

JIT编译:

-compiler  -printcompilation

[root@iZ4jc05catqgal8iwrpyhxZ bin]# ./jstat - compiler 18692

Compiled: Number of compilation tasks performed.    //完成的编译任务数(编译成本地方法)

Failed: Number of compilations tasks failed.  //失败的任务数

Invalid: Number of compilation tasks that were invalidated. //无效的任务数

Time: Time spent performing compilation tasks. //编译的时间

FailedType: Compile type of the last failed compilation.

FailedMethod: Class name and method of the last failed compilation.//失败的方法

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值