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 打开分析



免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM