zoukankan      html  css  js  c++  java
  • 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:softDumpViewer_bkill.comll2.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:Javaeclipsejava-2018-12eclipse目录下有个 eclips.ini文件,调整

       -Xms1024m
       -Xmx5024m

      

  • 相关阅读:
    ZwQuerySystemInformation的用法
    将十进制整型数转成 2~36(不包含10) 进制数
    简化版C语言文法 130
    Python基础综合练习 130
    编译原理 130
    词法分析 130
    熟悉常用的Linux操作 130
    129有确定性的有穷自动机 130
    实验一.词法分析实验 130
    1.大 数据概述 130
  • 原文地址:https://www.cnblogs.com/cwind/p/10335787.html
Copyright © 2011-2022 走看看