Skip to content

Instantly share code, notes, and snippets.

@mattyb149
Created March 15, 2014 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattyb149/9569272 to your computer and use it in GitHub Desktop.
Save mattyb149/9569272 to your computer and use it in GitHub Desktop.
Display registered MBeans in CRasH
import java.lang.management.ManagementFactory
import javax.management.*
MBeanServer mbeanServer = ManagementFactory.platformMBeanServer
def mbeans = mbeanServer.queryMBeans(null,ObjectName.WILDCARD)
mbeans.each {
def name = it.objectName.getKeyProperty 'name'
println name ?: it.toString();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment