JMX: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 42: Line 42:
* [http://docs.oracle.com/javase/8/docs/api/java/lang/management/MemoryManagerMXBean.html ManagerMXBean]
* [http://docs.oracle.com/javase/8/docs/api/java/lang/management/MemoryManagerMXBean.html ManagerMXBean]
* [http://docs.oracle.com/javase/8/docs/api/java/lang/management/MemoryPoolMXBean.html MemoryPoolMXBean]
* [http://docs.oracle.com/javase/8/docs/api/java/lang/management/MemoryPoolMXBean.html MemoryPoolMXBean]
* [http://docs.oracle.com/javase/8/docs/api/java/lang/management/BufferPoolMXBean.html BufferPoolMXBean]
* [http://docs.oracle.com/javase/8/docs/api/java/lang/management/GarbageCollectorMXBean.html GarbageCollectorMXBean]
* [http://docs.oracle.com/javase/8/docs/api/java/lang/management/GarbageCollectorMXBean.html GarbageCollectorMXBean]



Revision as of 03:22, 22 April 2017

External

Internal

Overview

Subjects

Concepts

MXBean

An MXBean is a kind of MBean. For more details see

http://docs.oracle.com/javase/7/docs/api/javax/management/MXBean.html#mxbean-def

Open Type

http://docs.oracle.com/javase/7/docs/api/javax/management/openmbean/OpenType.html

The Platform MBean Server

The platform MBean server is an MBean server that is built into the JVM. It can be accessed and shared by all managed components that are running in that JVM. It can be retrieved with java.lang.management.ManagementFactory.getPlatformMBeanServer(). The platform MBean server was introduced in Java 5. javax.management.MBeanServerFactory can be used to create a different MBean server, or look up an already existing MBean server (that is not the platform server).

For a code example of how to look up the platform MBean server and how to register an arbitrary MBean to it, see

https://github.com/NovaOrdis/playground/blob/master/http/http-server/src/main/java/io/novaordis/playground/http/server/Main.java

Platform MXBeans

A platform managed object is an JMX MXBean deployed on a JVM's platform MBean server. Platform MXBeans expose monitoring and management capabilities for components of the Java platform.

Platform MXBeans only use a set of basic data types, so a JMX management application and the platform MBeanServer can interoperate without requiring classes for MXBean specific data types. The data types being transmitted between the management client and the JMX server are open types and this allows interoperation across versions.

Common platform MXBeans:

Memory Monitoring and Management

Thread Monitoring and Management

All Known Subinterfaces: BufferPoolMXBean, ClassLoadingMXBean, CompilationMXBean, GarbageCollectorMXBean, MemoryManagerMXBean, MemoryMXBean, MemoryPoolMXBean, OperatingSystemMXBean, PlatformLoggingMXBean, RuntimeMXBean, ThreadMXBean