JVM调优命令-jstat
命令格式
1
|
jstat [options] VMID [interval] [count] |
VMID : 本地虚拟机进程ID,即当前运行的java进程号
[interval] : 连续输出的时间间隔,单位为秒或者毫秒
[count] : 连续输出的次数,如果缺省打印无数次
Option | Displays |
---|---|
class | 类加载的行为统计。Statistics on the behavior of the class loader. |
compiler | HotSpt JIT编译器行为统计。Statistics of the behavior of the HotSpot Just-in-Time compiler. |
gc | 垃圾回收堆的行为统计。Statistics of the behavior of the garbage collected heap. |
gccapacity | 各个垃圾回收代容量(young,old,perm)和他们相应的空间统计。Statistics of the capacities of the generations and their corresponding spaces. |
gcutil | 垃圾回收统计概述(百分比)。Summary of garbage collection statistics. |
gccause | 垃圾收集统计概述(同-gcutil),附加最近两次垃圾回收事件的原因。Summary of garbage collection statistics (same as -gcutil), with the cause of the last and |
gcnew | 新生代行为统计。Statistics of the behavior of the new generation. |
gcnewcapacity | 新生代与其相应的内存空间的统计。Statistics of the sizes of the new generations and its corresponding spaces. |
gcold | 年老代和永生代行为统计。Statistics of the behavior of the old and permanent generations. |
gcoldcapacity | 年老代行为统计。Statistics of the sizes of the old generation. |
gcpermcapacity | 永生代行为统计。Statistics of the sizes of the permanent generation. |
printcompilation | HotSpot编译方法统计。HotSpot compilation method statistics. |
-class (监视类装载、卸载数量、总空间以及耗费的时间)
1
2
3
4
|
[root@localhost bin] # jstat -class 4513 Loaded Bytes Unloaded Bytes Time 8455 17240.8 0 0.0 15.47 |
Bytes : class字节大小
Unloaded : 未加载class的数量
Bytes : 未加载class的字节大小
Time : 加载时间
-compiler(输出JIT编译过的方法数量耗时等)
1
2
3
|
[root@localhost bin] # jstat -compiler 4513 Compiled Failed Invalid Time FailedType FailedMethod 1255 0 0 16.47 0 |
Failed : 编译失败数量
Invalid : 无效数量
Time : 编译耗时
FailedType : 失败类型
FailedMethod : 失败方法的全限定名
-gc(垃圾回收堆的行为统计,常用命令)
1
2
3
|
[root@localhost bin] # jstat -gc 4513 S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT 52224.0 53248.0 19364.2 0.0 804864.0 74967.7 168448.0 80595.4 52736.0 52628.1 10 0.232 0 0.000 0.232 |
S1C : survivor1区的总容量
S0U : survivor0区已使用的容量
S1C : survivor1区已使用的容量
EC : Eden区的总容量
EU : Eden区已使用的容量
OC : Old区的总容量
OU : Old区已使用的容量
PC : 当前perm的容量 (KB)
PU : perm的使用 (KB)
YGC : 新生代垃圾回收次数
YGCT : 新生代垃圾回收时间
FGC : 老年代垃圾回收次数
FGCT : 老年代垃圾回收时间
GCT : 垃圾回收总消耗时间
1
|
[root@localhost bin] # jstat -gc 4513 2000 2 |
-gccapacity(同-gc,还会输出Java堆各区域使用到的最大、最小空间)
1
2
3
|
[root@localhost bin] # jstat -gccapacity 4513 NGCMN NGCMX NGC S0C S1C EC OGCMN OGCMX OGC OC PGCMN PGCMX PGC PC YGC FGC 84480.0 1349632.0 913408.0 54272.0 51200.0 502784.0 168448.0 2699264.0 168448.0 168448.0 21504.0 83968.0 51712.0 51712.0 9 0 |
NGCMX : 新生代占用的最大空间
OGCMN : 老年代占用的最小空间
OGCMX : 老年代占用的最大空间
OGC:当前年老代的容量 (KB)
OC:当前年老代的空间 (KB)
PGCMN : perm占用的最小空间
PGCMX : perm占用的最大空间
-gcutil(同-gc,输出的是已使用空间占总空间的百分比)
1
2
3
|
[root@localhost bin] # jstat -gcutil 4513 S0 S1 E O P YGC YGCT FGC FGCT GCT 0.00 79.23 38.90 39.92 99.74 9 0.198 0 0.000 0.198 |
-gccause(垃圾收集统计概述(同-gcutil),附加最近两次垃圾回收事件的原因)
1
2
3
|
[root@localhost bin] # jstat -gccause 4513 S0 S1 E O P YGC YGCT FGC FGCT GCT LGCC GCC 0.00 79.23 39.37 39.92 99.74 9 0.198 0 0.000 0.198 Allocation Failure No GC |
GCC:当前垃圾回收的原因
-gcnew(统计新生代行为)
1
2
3
|
[root@localhost bin] # jstat -gcnew 4513 S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT 54272.0 51200.0 0.0 40565.8 2 15 54272.0 502784.0 197950.5 9 0.198 |
MTT:最大的tenuring threshold
DSS:survivor区域大小 (KB)
-gcnewcapacity(新生代与其相应的内存空间的统计)
1
2
3
|
[root@localhost bin] # jstat -gcnewcapacity 4513 NGCMN NGCMX NGC S0CMX S0C S1CMX S1C ECMX EC YGC FGC 84480.0 1349632.0 913408.0 449536.0 54272.0 449536.0 51200.0 1348608.0 502784.0 9 0 |
S0CMX:最大的S0空间 (KB)
S0C:当前S0空间 (KB)
ECMX:最大eden空间 (KB)
EC:当前eden空间 (KB)
-gcold(统计老年代行为)
1
2
3
|
[root@localhost bin] # jstat -gcold 4513 PC PU OC OU YGC FGC FGCT GCT 51712.0 51575.1 168448.0 67239.6 9 0 0.000 0.198 |
-gcoldcapacity(老年代与其相应的内存空间的统计)
1
2
3
|
[root@localhost bin] # jstat -gcoldcapacity 4513 OGCMN OGCMX OGC OC YGC FGC FGCT GCT 168448.0 2699264.0 168448.0 168448.0 9 0 0.000 0.198 |
-gcpermcapacity(永久代与其相应内存空间的统计)
1
2
3
|
[root@localhost bin] # jstat -gcpermcapacity 4513 PGCMN PGCMX PGC PC YGC FGC FGCT GCT 21504.0 83968.0 51712.0 51712.0 9 0 0.000 0.19 |
-printcompilation(hotspot编译方法统计)
1
2
3
|
[root@localhost bin] # jstat -printcompilation 4513 Compiled Size Type Method 1261 1261 1 java /util/concurrent/ScheduledThreadPoolExecutor $DelayedWorkQueue take |
Size:方法字节码的字节数
Type:编译类型
Method:编译方法的类名和方法名。类名使用"/" 代替 "." 作为空间分隔符. 方法名是给出类的方法名. 格式是一致于HotSpot - XX:+PrintComplation 选项
JVM调优命令-jstat的更多相关文章
- JVM调优总结 + jstat 分析(转)
[转] JVM调优总结 + jstat 分析 JVM调优总结 + jstat 分析 jstat -gccause pid 1 每格1毫秒输出结果jstat -gccause pid 2000 每格2秒 ...
- jvm系列(四):jvm调优-命令大全(jps jstat jmap jhat jstack jinfo)
文章同步发布于github博客地址,阅读效果更佳,欢迎品尝 运用jvm自带的命令可以方便的在生产监控和打印堆栈的日志信息帮忙我们来定位问题!虽然jvm调优成熟的工具已经有很多:jconsole.大名鼎 ...
- [转]jvm调优-命令大全(jps jstat jmap jhat jstack jinfo)
运用jvm自带的命令可以方便的在生产监控和打印堆栈的日志信息帮忙我们来定位问题!虽然jvm调优成熟的工具已经有很多:jconsole.大名鼎鼎的VisualVM,IBM的Memory Analyzer ...
- JVM调优 — 命令大全(jps jstat jmap jhat jstack jinfo)(转)
运用jvm自带的命令可以方便的在生产监控和打印堆栈的日志信息帮忙我们来定位问题!虽然jvm调优成熟的工具已经有很多:jconsole.大名鼎鼎的VisualVM,IBM的Memory Analyzer ...
- jvm调优-命令大全(jps jstat jmap jhat jstack jinfo)
现实企业级Java开发中,有时候我们会碰到下面这些问题: OutOfMemoryError,内存不足 内存泄露 线程死锁 锁争用(Lock Contention) Java进程消耗CPU过高 运用jv ...
- Java虚拟机(五):JVM调优命令
运用jvm自带的命令可以方便的在生产监控和打印堆栈的日志信息帮忙我们来定位问题!虽然jvm调优成熟的工具已经有很多:jconsole.大名鼎鼎的VisualVM,IBM的Memory Analyzer ...
- jvm系列(四):jvm调优-命令篇
运用jvm自带的命令可以方便的在生产监控和打印堆栈的日志信息帮忙我们来定位问题!虽然jvm调优成熟的工具已经有很多:jconsole.大名鼎鼎的VisualVM,IBM的Memory Analyzer ...
- JVM调优总结 + jstat 分析
jstat -gccause pid 1 每格1毫秒输出结果jstat -gccause pid 2000 每格2秒输出结果不断的在屏幕打印出结果 S0 S1 E O ...
- 类加载机制与JVM调优命令
一.类加载过程 类加载:类加载器将.class字节码文件加载进Java虚拟机的内存中. 加载:在硬盘上查找并通过IO读入字节码文件 连接:执行校验.准备.解析(可选)步骤 校验:校验字节码文件的正确性 ...
随机推荐
- 内幕:XX二手车直卖网,狗屁直卖网,我来揭开他们套路!
转自:明锐论坛 我是一位花生二手车直卖网的离职员工.已离职了一段时间,现在在某家汽车4S店公司上班.过去了那么久,每当看到他们铺天盖地的广告,心里都像十五个水桶--七上八下.思索已久,我还是决定鼓 ...
- CentOS7 Rsync服务搭建-Rsync+Inotify架构实现实时同步
一.rsync 概念 1.rsyncrsync是类unix/linux系统下的数据镜像备份工具.使用快速增量备份工具Remote Sync可以远程同步,支持本地复制,或者与其他SSH.rsync主机同 ...
- 管理idea Open Recent
在微服务开发过程中,随着服务的增加,日常需要在各个服务之间切换,这样idea 的 Open Recent 功能就显得特别有用,但是过多的最近打开记录中包括已经删除的工程或者无用的工程导致影响开发时切换 ...
- HyperLedger Fabric 学习思路分享
HyperLedger Fabric 学习思路分享 HyperLedger Fabric最初是由Digital Asset和IBM公司贡献的.由Linux基金会主办的一个超级账本项目,它是一个目前非常 ...
- PAT甲题题解-1063. Set Similarity (25)-set的使用
题意:两个整数集合,它们的相似度定义为:nc/nt*100%nc为两个集合都有的整数nt为两个集合一共有的整数注意这里的整数都是各不相同的,即重复的不考虑在内.给出n个整数集合,和k个询问,让你输出每 ...
- Linux内核实验作业六
实验作业:分析Linux内核创建一个新进程的过程 20135313吴子怡.北京电子科技学院 [第一部分]阅读理解task_struct数据结构 1.进程是计算机中已运行程序的实体.在面向线程设计的系统 ...
- 关于Sample的分析报告
首先,这是一个典型的sample Table box: 一. Stbl box中常见的子box: stts:Decoding Time to Sample Box时间戳和Sample映射表. ...
- Alpha冲刺——day6
Alpha冲刺--day6 作业链接 Alpha冲刺随笔集 github地址 团队成员 031602636 许舒玲(队长) 031602237 吴杰婷 031602220 雷博浩 031602634 ...
- Beta冲刺——day6
Beta冲刺--day6 作业链接 Beta冲刺随笔集 github地址 团队成员 031602636 许舒玲(队长) 031602237 吴杰婷 031602220 雷博浩 031602134 王龙 ...
- Jenkins发送邮件中文乱码问题解决
在环境变量中添加: JAVA_TOOL_OPTIONS = -Dfile.encoding=UTF8 配置好后,重启Jenkins即可