如何抛弃Permgen?

发布于 2024-09-30 11:22:32 字数 216 浏览 2 评论 0原文

我想转储应用程序服务器的 Permgen。

我不想使用 -XX:+TraceClassLoading -XX:+TraceClassUnloading 因为我不想重新启动服务器,我也不想使用 jconsole

我有任何像jmap这样的工具(用于堆转储没有找到permgen的任何选项)来获取permgen,这样我就可以只提供pid。

I wanted to take the dump of the Permgen of a application server.

I do not want to use -XX:+TraceClassLoading -XX:+TraceClassUnloading as i do not want to restart the server, Neither i want to use jconsole.

I there any tool like jmap(used to heap dump didnt find any option for permgen) to get the permgen so that i can supply only the pid.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

∝单色的世界 2024-10-07 11:22:32
jmap -permstat <pid>

将产生这样的输出:

30337 intern Strings occupying 2746200 bytes.
class_loader    classes bytes   parent_loader   alive?  type

<bootstrap> 2031    7253392   null      live    <internal>
0x517474f0  1   1760      null      dead    sun/reflect/DelegatingClassLoader@0x43f95d38
0x4f83f670  1   1744    0x4ebfb8e8  dead    sun/reflect/DelegatingClassLoader@0x43f95d38
[...]

total = 287 10020   35889952        N/A     alive=3, dead=284       N/A  

这不是完整的转储,但这样做将允许您进行一些调查。

我仍在寻找如何找到更多信息。

jmap -permstat <pid>

is going to produce an output like that :

30337 intern Strings occupying 2746200 bytes.
class_loader    classes bytes   parent_loader   alive?  type

<bootstrap> 2031    7253392   null      live    <internal>
0x517474f0  1   1760      null      dead    sun/reflect/DelegatingClassLoader@0x43f95d38
0x4f83f670  1   1744    0x4ebfb8e8  dead    sun/reflect/DelegatingClassLoader@0x43f95d38
[...]

total = 287 10020   35889952        N/A     alive=3, dead=284       N/A  

This is not a full dump, but doing that is going to allow you to do some investigation.

I am still looking on how to find more information.

淡忘如思 2024-10-07 11:22:32

不可能像对堆那样“转储永久代”。

除了其他人介绍的 jmap -permstat 之外,您还可以分析标准堆转储以了解永久代,如 此博客条目:“未知的一代:Perm”

由于堆转储并没有真正包含有关 Perm 空间的大量信息,因此 Perm 问题很难解决。最近,我发现了 Sporar、Sundararajan 和 Kieviet 撰写的这篇很棒的文章。作者对永久代进行了一些阐述。当然,我必须立即检查是否以及如何使用 Eclipse Memory Analyzer 来分析这个“未知”的一代。这就是本博客的主题。

It is not possible to 'dump permgen' as it's done for the heap.

In addition to jmap -permstat as others have presented, you can analyze standard heap dump to shed some light on your permanent generation as described in this blog entry: 'The Unknown Generation: Perm'.

Because a heap dump does not really contain a lot of information about perm space, perm problems are difficult to tackle. Recently, I found this great article by Sporar, Sundararajan and Kieviet. The authors shed some light on the permanent generation. Of course, I had to check right away if and how I can use the Eclipse Memory Analyzer to analyze this “unknown” generation. This is what this blog is about.

我不会写诗 2024-10-07 11:22:32
jmap -permstat <pid>
jmap -permstat <pid>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文