Java内存转储问题 [英] Java memory dump issue

查看:126
本文介绍了Java内存转储问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用下面的代码创建内存转储

I have tried to create a memory dump using with below code

 **/usr/lib/jvm/j2sdk1.5-sun/bin/jmap -heap 10699**

但是我遇到了下面提到的错误,任何人都可以帮助我

but i got below mentioned error, anyone can help to me

附加到进程ID 10699,请稍候... 附加到进程时出错:sun.jvm.hotspot.debugger.DebuggerException:无法附加到进程

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

我正在使用Java 5

I'm using java 5

推荐答案

要主动,我假设您正在运行ubuntu.在这种情况下,键入以下内容:

To be proactive, I'll assume you're running ubuntu. In that case, type the following:

echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope

如果您没有运行ubuntu,我建议您以与运行目标进程相同的用户身份运行jmap

If you're not running ubuntu, I'll recommend that you run jmap as the same user as ran your target process

这篇关于Java内存转储问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆