jmap错误:unknown CollectedHeap type : class sun.jvm.hotspot.gc_interface.CollectedHeap
原文:https://www.jianshu.com/p/0e5d8db8ed5e
错误场景
今天使用jmap -heap命令查看堆的详细信息报错。
[root@instance-2gak1pfv debuginfo]# java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
[root@instance-2gak1pfv debuginfo]# jps -l
110386 org.apache.zookeeper.server.quorum.QuorumPeerMain
40565 sun.tools.jps.Jps
[root@instance-2gak1pfv debuginfo]# jmap -heap 110386
Attaching to process ID 110386, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.191-b12
using thread-local object allocation.
Mark Sweep Compact GC
Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 255852544 (244.0MB)
NewSize = 5570560 (5.3125MB)
MaxNewSize = 85262336 (81.3125MB)
OldSize = 11206656 (10.6875MB)
NewRatio = 2
SurvivorRatio = 8
MetaspaceSize = 21807104 (20.796875MB)
CompressedClassSpaceSize = 1073741824 (1024.0MB)
MaxMetaspaceSize = 17592186044415 MB
G1HeapRegionSize = 0 (0.0MB)
Heap Usage:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.tools.jmap.JMap.runTool(JMap.java:201)
at sun.tools.jmap.JMap.main(JMap.java:130)
Caused by: java.lang.RuntimeException: unknown CollectedHeap type : class sun.jvm.hotspot.gc_interface.CollectedHeap
at sun.jvm.hotspot.tools.HeapSummary.run(HeapSummary.java:157)
at sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:260)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:223)
at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
at sun.jvm.hotspot.tools.HeapSummary.main(HeapSummary.java:50)
... 6 more
解决办法:
安装debuginfo,去网站http://debuginfo.centos.org/7/x86_64里面找匹配当前的openjdk的版本,小版本号也要匹配上。然后使用wget命令下载
wget http://debuginfo.centos.org/7/x86_64/java-1.8.0-openjdk-debuginfo-1.8.0.191.b12-1.el7_6.x86_64.rpm
使用rpm命令安装
rpm -ivh java-1.8.0-openjdk-debuginfo-1.8.0.191.b12-1.el7_6.x86_64.rpm
然后查看是否安装了debuginfo
[root@izuf6ea4rfo45y44oj74jhz logs]# rpm -qa|grep debuginfo
java-1.8.0-openjdk-debuginfo-1.8.0.191.b12-1.el7_6.x86_64
执行jmap -heap命令查看堆详细信息
[root@izuf6ea4rfo45y44oj74jhz logs]# jmap -heap 1421
Attaching to process ID 1421, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.191-b12
using thread-local object allocation.
Mark Sweep Compact GC
Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 482344960 (460.0MB)
NewSize = 10485760 (10.0MB)
MaxNewSize = 160759808 (153.3125MB)
OldSize = 20971520 (20.0MB)
NewRatio = 2
SurvivorRatio = 8
MetaspaceSize = 21807104 (20.796875MB)
CompressedClassSpaceSize = 1073741824 (1024.0MB)
MaxMetaspaceSize = 17592186044415 MB
G1HeapRegionSize = 0 (0.0MB)
Heap Usage:
New Generation (Eden + 1 Survivor Space):
capacity = 48758784 (46.5MB)
used = 42933176 (40.94426727294922MB)
free = 5825608 (5.555732727050781MB)
88.05218768376176% used
Eden Space:
capacity = 43384832 (41.375MB)
used = 42933176 (40.94426727294922MB)
free = 451656 (0.43073272705078125MB)
98.95895413401624% used
From Space:
capacity = 5373952 (5.125MB)
used = 0 (0.0MB)
free = 5373952 (5.125MB)
0.0% used
To Space:
capacity = 5373952 (5.125MB)
used = 0 (0.0MB)
free = 5373952 (5.125MB)
0.0% used
tenured generation:
capacity = 108146688 (103.13671875MB)
used = 64887344 (61.88139343261719MB)
free = 43259344 (41.25532531738281MB)
59.99938158069159% used
21962 interned Strings occupying 2552376 bytes.
jmap错误:unknown CollectedHeap type : class sun.jvm.hotspot.gc_interface.CollectedHeap的更多相关文章
- 【JVM】【linux】linux上执行jmap命令查看JVM内存使用情况,报错:sun.jvm.hotspot.debugger.NoSuchSymbolException: Could not find symbol "gHotSpotVMTypes" in any of the known library name
运行命令: jmap -heap 报错如下: Attaching to process ID , please wait... sun.jvm.hotspot.debugger.NoSuchSymbo ...
- Spring错误之org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'bookService' is expected to be of type 'pw.fengya.tx.BookService' but was actually of type 'com.sun.proxy.$Proxy1
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cas ...
- mint17.3挂载u盘出现错误:mount:unknown filesystem type 'exfat'
mint17.3挂载u盘出现错误:mount:unknown filesystem type 'exfat' 安装exfat-fuse: sudo apt-get install exfat-fuse
- 在linux终端执行clear或top命令时出现:'xterm' unknown terminal type的错误
例如: [root@localhost phpmyadmin]# clear 'xterm': unknown terminal type. 解决办法: 1.临时办法,下次启动失效,需要重新执行 ex ...
- 运行top时,会报unknown terminal type错误
问题: 在板子上执行top时总是提示'vt102': unknown terminal type. 执行了export TERM=xterm,还是不管用 解决: 执行export,方向没有设置TERM ...
- Spring 动态代理 之 but was actually of type 'com.sun.proxy.$Proxy14 Exception
今天在写Spring的引介代理的时候,报了一个错: Exception in thread "main" org.springframework.beans.factory.Bea ...
- [virsh] error: unknown OS type hvm解决办法
今天在linux服务器上编译安装升级了下qemu,升级命令如下: root@ubuntu:/opt/qemu-# ./configure --prefix=/usr/local/ --target-l ...
- 'vt100': unknown terminal type.
在Linux终端执行clear或top命令时出现:vt100: unknown terminal type的错误 1.临时办法,下次启动失效,需要重新执行 执行以下命令 $ printenv | gr ...
- 在Linux终端执行clear或top命令时出现:'xterm': unknown terminal type
在Linux终端执行clear或top命令时出现:'xterm': unknown terminal type的错误. 例如: [root@localhost phpmyadmin]# clear ' ...
随机推荐
- C++ 重写虚函数的代码使用注意点+全部知识点+全部例子实现
h-------------------------- #ifndef VIRTUALFUNCTION_H #define VIRTUALFUNCTION_H /* * 派生类中覆盖虚函数的使用知识点 ...
- atlassian-confluence - docker安装
一下内容在centos 7安装成功.一.安装docker 1.yum安装docker12 yum update # 更新yumyum install docker # yum安装docker 2.开启 ...
- [技术博客] Springboot的Controller类使用
Springboot的Controller类使用 @Controller:处理http请求. 代码: @Controller public class QuestionController { ... ...
- IO流—其他流
内存操作流 这个流不关联任何文件,只能在内存中数据,自己在内存中维护着一个缓冲区,我们可以往他维护的缓冲区不断的写入数据,也可以从缓冲区中取出我们写入的数据 ByteArrayOutputStream ...
- Spring中Bean命名源码分析
Spring中Bean命名源码分析 一.案例代码 首先是demo的整体结构 其次是各个部分的代码,代码本身比较简单,不是我们关注的重点 配置类 /** * @Author Helius * @Crea ...
- 【Netcore】使用 Magic生成器 ,零代码实现CRUD - HTTP REST 之接口
软件介绍: Magic是一个CRUD后端生成器,内置于ASP.NET内核中.它的目的是让你“神奇地”做一些无聊的事情,通过使用自动化技术,创建80%的CRUD端点,自动包装MySQL或MS SQL S ...
- ES6高级技巧(二)
Array.from const cities = [ { name: 'Milan', visited: 'no' }, { name: 'Palermo', visited: 'yes' }, { ...
- ImageView基本用法
1.background通常指的都是背景,而src指的是内容. 2.当使用src填入图片时,是按照图片大小直接填充,并不会进行拉伸. 3.scaleType缩放类型设置: fitXY:对图像的横向与纵 ...
- AGC035
Contest Page A 唯一会做的题/kk 题目相当于要求相邻三个的异或和为\(0\). 当我们放入了三个数\(a,b,c\)时,接下来的放入顺序显然一定是\(a,b,c,a,b,c,...\) ...
- GoF的23种设计模式之行为型模式的特点和分类(2)
行为型模式用于描述程序在运行时复杂的流程控制,即描述多个类或对象之间怎样相互协作共同完成单个对象都无法单独完成的任务,它涉及算法与对象间职责的分配. 行为型模式分为类行为模式和对象行为模式,前者采用继 ...