开发者

How to access Memory pool mbeans

I want to access MemoryPool Mbeans through a java program so that I ca开发者_StackOverflow社区n retrieve the Eden Space, Perm Gen space, CodeCahe, Survior Space statistics during a period of time. How to do this? I tried java.lang:type=MemoryPool,name=Eden Space

I wan not lucky

Thanks, Shankar


The following worked fine for me: 'java.lang:type=MemoryPool,name=PS Eden Space'

If you connect to your app via JConsole you will be able to see the MBeans available and the exact ObjectName of the MBean you want to use.


Got the way to do it. Used ManagementFactory.MEMORY_POOL_MXBEAN_DOMAIN_TYPE,* for defining Object name, got the instances. That solved my problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜