jmap打dump异常
背景
用jmap打dump文件经常遇到如下异常,打不出来,哥今天告拆大家一个终极解决方法,嘘,不要告拆别人。。
Attaching to core -F from executable 421442, please wait...
Error attaching to core file: cannot open binary file
sun.jvm.hotspot.debugger.DebuggerException: cannot open binary file
at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.attach0(Native Method)
at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.attach(LinuxDebuggerLocal.java:286)
。。。
解决方法
在root用户下使用su -m user -c " command " 搞定。如下:
[root@host11]# su -m yarn -c "jmap -dump:format=b,file=ll.bin 421442"
Dumping heap to /tmp/hsperfdata_yarn/ll.bin ...
Heap dump file created
Jhat打开dump
jhat -J-mx4g D:\soft\DumpViewer_bkill.com\ll2.bin
eclipse打开dump
1)安装mat
打开Eclipse - >help - > Eclipse Marketplace,搜mat
点install, 同意协议后,点击Finish就开始安装MAT了
2)选中使用
安装完成后提示重启Eclipse,重启后打开window - > open perspective,看到Memory Analysis证明安装成功,选中memory analisys - OK
3)打开dump
File -> open heap dump,选择你准备好的dump文件
tips:
eclips发生out of memory,在
C:\Java\eclipse\java-2018-12\eclipse目录下有个 eclips.ini文件,调整
-Xms1024m
-Xmx5024m
最新文章
- MSSQL MERGE语法
- HTML:图片热点 网页划区 表单
- Ubuntu下类似于Total Commander的两个工具
- 学习使用:before和:after伪元素
- 将一副图片编译进uboot
- 解决方法:java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index;
- Iso8601 日期格式
- cocos2dx游戏项目总结(持续更新)
- U - stl 的 优先队列 Ⅰ
- poj1163 dp入门
- Angularjs快速入门(二)
- weblogic AND jboss 反序列化漏洞
- 物联网RFID技术之应用ETC系统
- 使用IIS应用程序初始化来保持ASP.NET应用程序的活动
- 一、OpenStack环境准备及共享组件安装
- @Autowired注入报错
- helm安装redis+Sentinel集群搭建
- asp.net mvc easyui tree
- [原]Jenkins(二)---jenkins之Git+maven+jdk+tomcat
- linux driver ------ 三星公司uboot模式下更改分区(EMMC)大小fdisk命令 ------ iTOP4412 开发板烧写