jmap 导出 tomcat 内存快照分析

登录系统(注意这里启动 tomcat 的用户)

# 获取 tomcat 的 pid 号
ps -ef|grep tomcat

# 例如这里 pid 号为 13133
jmap -dump:live,format=b,file=dump.hprof 13133

使用 MAT 分析

# MAT 下载地址:https://www.eclipse.org/mat/downloads.php

# 我这里下载的 windows 版本,解压后,按需更改 MemoryAnalyzer.ini 里面的配置,我改成了 4G 大小


下载 dump.hprof ,使用 MAT 打开分析


猜你喜欢

转载自www.cnblogs.com/klvchen/p/12055597.html