【发布时间】:2014-04-05 01:58:54
【问题描述】:
我想使用 WLST 获取 WL 域中服务器的 Max Perm Gen 和 Usage。 到目前为止,我能够看到可以从 JMX、mBean 获取信息。 mBean 位置是“java.lang:Location=Server1,name=PS Perm Gen,type=MemoryPool”
我尝试了下面的代码,但它似乎不起作用。
testObject=ObjectName('java.lang:Location=Server1,name=PS Perm Gen,type=MemoryPool')
或者尝试下面的代码也不起作用。
testBean=getMBean('javax.management.openmbean.CompositeData:Location=Server1,name=Usage,type=PS Perm Gen')
for item in testBean:
print item.getKey() + ':' + item.getValue()
请帮忙。
更新:--------------------------------------------- ---- 感谢您的快速回复。目前还没有与我的主题相关的 WLST 代码可供分享,因为我正在尝试从搜索中探索可能性。
基本上,在将人工制品部署到 WL 托管服务器之前,我会尝试检查 WLST 运行中可用的 Perm Gen 大小。
这是因为 WebLogic 没有从 WL 托管服务器中释放未部署的工件的非堆内存空间,如果您继续在不回收的情况下进行部署/取消部署,WL 托管服务器最终将抛出 OOME 的 Perm Gen 空间。
我们正在尽量减少服务中断,并尽可能长时间地保持 WL 托管服务器正常运行。 我到处搜索 WLST mBean 树位置以获得非堆内存状态,但失败了。
但是如果使用JManage,可以通过mBean对象“java.lang:Location=Server1,name=PS Perm Gen,type=MemoryPool”获取非堆内存状态。
它将在 JManage 中显示如下:
Object Name java.lang:Location=Server1,name=PS Perm Gen,type=MemoryPool
Class Name sun.management.MemoryPoolImpl
Description Information on the management interface of the MBean
Configured Name Add to Application
所以我想知道如果 mBean 存在,为什么不能从 WLST 中提取 mBean 信息?因此,我正在尝试向任何有类似经历/情况的人寻求帮助。
【问题讨论】:
-
你在哪里找到那个例子?您可以从 WLST 获取通用堆使用情况,如下所示:theheat.dk/blog/?p=1917 或 yenlo.nl/nl/start-stop-and-check-status-weblogic-using-wlst
-
谢谢,mkstemp,但你知道这些是堆使用,Perm Gen 内存在堆区域之外。
-
能否请您分享您的异常、错误堆栈以便我们提供帮助
-
看看 weblogic 关于“使用平台 MBean 服务器”的文档:docs.oracle.com/cd/E24329_01/web.1211/e24415/… 看起来你必须在 custom() mbean 树中
标签: weblogic jython permgen wlst