我尝试运行命令
jmap -dump:format=b,file=jvm.hprof core.20170103.212745.20453.0007.dmp
但是我得到一个错误
Error attaching to remote server: java.rmi.UnknownHostException: Unknown host: core.20170103.212745.20453.0007.dmp; nested exception is:
java.net.UnknownHostException: core.20170103.212745.20453.0007.dmp
sun.jvm.hotspot.debugger.DebuggerException: java.rmi.UnknownHostException:
有什么错误?我尝试将其放在TomCat服务器上并运行它,但仍然抛出错误
最佳答案
您缺少“ executable”参数,因此jmap认为您正在尝试连接到远程主机。
尝试类似的东西:
jmap -dump:format=b,file=jvm.hprof /usr/bin/java core.20170103.212745.20453.0007.dmp