Ubuntu下用不了jmap的解决办法

Unbuntu下用jmap报错:

jmap -heap 3051

Attaching to process ID 3051, please wait...
Error attaching to process: sun.jvm.hotspot.debugger.DebuggerException: Can't attach to the process

解决:执行下面的命令:
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope


然后就可以用了

你可能感兴趣的:(ubuntu)