0

I want to access MemoryPool Mbeans through a java program so that I can 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

user348669
  • 21
  • 3
  • Do you already have the running code to access the JMX MBeans of the JVM, and you only need help with particular MemoryPool MBeans? – JoseK May 25 '10 at 12:32

2 Answers2

1

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.

Gotxi
  • 185
  • 3
  • 10
0

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

user348669
  • 21
  • 3