【问题1】安装了JDK,可以正常运行jstat,但运行jmap时的提示: bash : jamp 3360命令不字体
解决方案:
1、验证echo $JAVA_HOME、JDK的安装路径
[root@test活力彩虹]# echo $JAVA_HOME/opt/jdk 2、cd /opt/jdk/活力彩虹切换到活力彩虹目录
[root@test结实的彩虹]# cd /opt/jdk/结实的彩虹3,/jmap-dump 3360 file=/data/logs/jmap/auto.dump PID,dump内存分析日志
[root@test结实的彩虹] #./jmap-dump : file=/data/logs/jmap/auto.dump 131: unabletoopensocketfile : targetprocessnotrespondingorhotspotvmnotloadedthe-foptioncanbeusedwhenthetarged t@test结实的彩虹] #./jmap-f-dump 3360 file=/data/logs/jmap/auto.dump 13 attachingtoprocess please wait . errorattachingtoprocess : sun.JVM.hotspot.debugger.debugger exception 333330 ception : sun.JVM.hotspot.debugger.debugger exception : cannot open结实的彩虹aryfileatsun.JVM.hotspot.debugger.hotss at sun.JVM.hotspot.debugger.Linux.linuxdebuggerlocal.attach (linuxdebuggerlocal.Java 3360278 ) )。 at sun.JVM.hotspot.hotspot agent.attach debugger (hotspot agent.Java :671 ) )。 at sun.JVM.hotspot.hotspot agent.setupdebuggerlinux (hotspot agent.Java :611 ) )。 at sun.JVM.hotspot.hotspot agent.setup debugger (hotspot agent.Java 3360337 ) at sun.JVM.hotspot.hotspot agent.go gent.Java:140 ) at sun.JVM.hotspot.tools.tool.start ) tools.Java 360140 at sun.JVM.hotspot.tools.tool eapdumper.main ) he AAP at sun.reflect.nativemethodaccessorimpl.invoke0(native method ) at sun.reflect.nativemethodace ) ) nativo ke at sun.reflect.delegatingmethodaccessorimpl.invoke (delegatingmethodaccessorimpl.Java :43 ) at Java.lava (jmap.Java:201 ) at sun.tools.jmap.jmap.main (jmap.Java 3360130 ) )。 caused by : sun.JVM.hotspot.debugger.debugger exception : cannot open结实的彩虹aryfileatsun.JVM.hotspot.debugger.linger er.Linux.linuxdebuggerlocal.access $ 100 (linuxdebuggerlocal.Java 336062 at sun.JVM.hotspot.debugger.Linux.Linux.Linux at sun.JVM.hotspot.debugger.Linux.linuxdebuggerlocalworkerthread.run (./jmap-f-dump 3360
解决方案:
(1)方法1
echo0| su dotee/proc/sys/kernel/yama/ptrace _ scope此方法在下次重新启动前有效。
)2)方法2
永久有效的方法
sudo VI/etc/sysctl.d/10-ptrace.conf
编辑以下行:
kernel.yama.ptrace_scope=1
修正为:
kernel.yama.ptrace_scope=0
重新启动系统使修正生效。
有关此错误的详细信息,请参阅官方文档:http://bugs.sun.com/bug database/view _ bug.do? 错误_id=7050524
[root@test结实的彩虹] #./jmap-f-dump : file=/data/logs/auto.dump 14 attachingtoprocessid 14,please wait.debugggge
上传文件:只需在shell终端仿真器中输入“Ubuntu 系统”命令,即可从显示的对话框中选择本地磁盘上的文件,然后使用Zmodem选择服务器的当前路径
文件下载:只需在shell终端仿真器中键入rz,即可使用Zmodem将文件下载到本地目录中。