1,登录linux服务器
2,观察JVM内存情况
> jps
> jstat -
class xxxxx
3,FGC查看
jstat
-gcutil pid
jstat
-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文件分析