jmap dump:file=[文件名].dump [进程号] 生成dump
root@VM-185-251-ubuntu:/opt/scripts# jmap -dump:file=three.dump 9597
Dumping heap to /opt/scripts/three.dump ...
Heap dump file created
jvisualvm.exe 可以查看 dump文件 ,oql 可以查询
select x from java.lang.String
查看 jvm gc 情况
jstat -gcutil 9597 3000
jmap -heap 9597