1. 获取pid

ps -aux | grep java

2. 查看堆中对象统计

jmap -histo [pid]

3. jmap

jmap -heap [pid]

4. dump分析

jmap -dump:format=b,file=./j.dump [pid]
jhat -J-Xmx1024M ./j.dump 

spoonysnail
80 声望1 粉丝