Java:如何检查当前的Perm / PermGen大小? [英] Java : how to check current Perm / PermGen Size?
问题描述
昨天当我运行WebLogic Application Server 11g安装程序时,我遇到了OutOfMemory错误,所以我用Google搜索了答案:
Yesterday when I was running the WebLogic Application Server 11g installer, I encountered a OutOfMemory error, so I Googled for the answer:
java -Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m -jar wls1032_generic.jar
一切正常:)
然而,当我对解决方案三思而后行时,我可能犯了一个错误:我怎么知道那些当前的设置?我当然需要在覆盖它们之前检查它们的值,对吗?
However, when I think twice about the solution, I might have made a mistake: How could I know the current settings of those? I certainly need to check their values before overriding them, right?
有什么想法吗?
相关链接: SO上的另一个帖子建议使用试错法,这是不理想的。
Related link: People in another thread on SO suggested trial and error approach, which is not ideal.
很多提前谢谢。
推荐答案
您可以使用 jinfo.exe
实用程序。
%JAVA_HOME%\bin\jinfo.exe -flag< flagName> ; < pid>
所以检查 -XX的值:PermSize
JVM你可以运行的选项
so to check the value of -XX:PermSize
JVM option you can run
%JAVA_HOME%\ bin\jinfo.exe -flag PermSize< pid>
这篇关于Java:如何检查当前的Perm / PermGen大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!