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 ' ...
随机推荐
- Solr的核心操作案例
@Service public class SearchServiceImpl implements SearchService { @Autowired private SolrTemplate s ...
- Error in readRDS(dest) : error reading from connection
Error in readRDS(dest) : error reading from connection 解决办法:可能是镜像设置错误,导致无法抓取文件 修改 RStudio 中的镜像地址 设置成 ...
- Spring Boot进阶系列二
上一篇文章,主要分析了怎么建立一个Restful web service,系列二主要创建一个H5静态页面使用ajax请求数据,功能主要有添加一本书,请求所有书并且按照Id降序排列,以及查看,删除一本书 ...
- STL源码剖析 阅读笔记
结构图:
- 码医自学法V2.2(附名老中医)
这段时间经常有网友微信公众号问我怎么入门'中医' 我贴下我自己的学习方法(仅供参考) 基础回顾:https://www.cnblogs.com/dunitian/p/7483038.html PS:自 ...
- xcode添加一个真机设备
1.首先先安装Xcode并且运行Xcode,点击左角菜单Xcode -> Preferences:点击Accounts+号弹菜单点击Add Apple ID:弹框输入账号密码普通账号行需要发者账 ...
- Thinkphp中的系统变量
Action中使用的系统常量 THINK_PATH // ThinkPHP 系统目录 APP_PATH // 当前项目目录 APP_NAME // 当前项目名称 MODULE_NAME //当前模块名 ...
- Linux shell脚本单例模式实现
一.说明 关于单例模式,最开始的是一些小工具,运行起来后再点击运行时会提示已经运行了一个实例,觉得挺有意思但也没有很在意. 前段时间看了前领导的一段代码不太懂是做什么用的,同事查了下资料说是为了实现单 ...
- HTTP漫谈
一.说明 1.1 当前背景说明 很多web的书包括web安全的书都会有一章介绍http协议,我就总恶意揣测作者是在凑字数,一般都直接跳过去. 相比TCP/IP这种各字段基于数值代号的协议,http这种 ...
- mysql中,手动提交事务
1: 在mysql中,手动提交事务的案例:CREATE PROCEDURE tfer_funds (from_account int, to_account int, tfer_amoun ...