JVM内存泄漏分析总结

来源:互联网 发布:java企业级项目案例 编辑:程序博客网 时间:2024/05/17 22:31

1,登录linux服务器

2,观察JVM内存情况

>   jps>   jstat  -class   xxxxx

3,FGC查看

jstat -gcutil  pidjstat -gccause pid 1    每隔1毫秒输出结果jstat -gccause pid 2000 每隔2秒输出结果
S0  — Heap上的 Survivor space 0 区已使用空间的百分比     S1 — Heap上的 Survivor space 1 区已使用空间的百分比    YGC — 从应用程序启动到采样时发生 Young GC 的次数 YGCT– 从应用程序启动到采样时 Young GC 所用的时间(单位秒)    FGC — 从应用程序启动到采样时发生 Full GC 的次数 FGCT– 从应用程序启动到采样时 Full GC 所用的时间(单位秒)     GCT — 从应用程序启动到采样时用于垃

4,打印dump栈并用工具分析

jmap -dump:format=b,file=dump1 pid

可以使用IBM heapAnalyzer来进行dump文件分析

原创粉丝点击