IBM User Guide for Java V7 on Windows > Troubleshooting and support > Using diagnostic tools > Using JConsole

MBeans and MXBeans

MBeans provide information about the state of the Java Virtual Machine. MXBeans, a generalized variant of MBeans, are constructed using a pre-defined set of data types, allowing them to be reference more efficiently.

To start JConsole...

When you connect to a running JVM, you see an MBeans tab that displays a navigation tree containing the MBeans exported by the JVM. The list of available MBeans depends on the version of Java that you are using. The categories of MBean available in java.lang.management include:

Clicking an MBean category in the navigation tree shows you all the related MBeans that are available. Clicking an individual MBean shows you the information that the MBean extracts from the JVM, separated into the following sections:

Attributes Attributes provide information about the current state. Some MBeans enable you to change the JVM options. For example, in the Memory MBean, you might select the Verbose option to enable VerboseGC logging output.
Operations Information from the JVM, including thread information In the Threading MBean.
Notifications Notifications supported by the MBean. JConsole subscribs to these notifications.
Info Available notifications.


GarbageCollector MBeans

Some MBeans provide garbage collection (GC) information. Expanding the java.lang > GarbageCollector item in JConsole shows you the available GC MBeans. Before Java 6 SR 7, only the J9-GC MBean was available. For Java 6 SR 7 and later, the list of MBeans depends on the GC policy in use.

For the gencon GC policy, two MBeans are available:

For all other GC polices, only the MarkSweepCompact MBean is available.

You can use JConsole to monitor some useful GC values:

Property Meaning
Name The name of the MBean. Dependent on the GC policy in use. Possible values: Copy or MarkSweepCompact.
CollectionCount The number of times garbage collection has occurred under the control of the garbage collector.
CollectionTime The cumulative total of time used so far by this garbage collector, measured in milliseconds.
LastCollectionEndTime The end time of the last collection performed by this garbage collector, measured in milliseconds since the application started.
LastCollectionStartTime The start time of the last collection performed by this garbage collector, measured in milliseconds since the application started.
MemoryUsed For the Copy MBean, this value is the number of nursery bytes of memory used by the heap. For the MarkSweepCompact MBean, this value is the number of tenured bytes of memory used by the heap.
TotalCompacts The total number of times the heap has been compacted by the collector monitored by the selected bean. For the copy collector in the gencon GC policy, this value is always zero.
TotalMemoryFreed The accumulated total of the memory freed by the collector, monitored by the selected bean.


OperatingSystem bean

The OperatingSystem bean shows information about the operating system in which the JVM runs, including the platform architecture, the processors, the physical memory, and system load averages. From Java 6 SR7, the following properties are included:

Property Meaning
FreePhysicalMemorySize The amount of physical memory that is currently available (free) in bytes.
ProcessVirtualMemorySize The amount of virtual memory used (committed) by the process, in bytes. The value includes pages in physical memory and in the swap space.
ProcessPrivateMemorySize The subset of ProcessVirtualMemoryUsed that is private to the process, in bytes. Depending on the platform, this value can include shared memory that is not in use by another process.
ProcessPhysicalMemorySize The subset of ProcessVirtualMemoryUsed that currently occupies physical memory, in bytes. The value includes shared and private memory.
ProcessCpuTime The amount of time spent running the process, in 100 nanosecond units. The value is the sum of user time and kernel (system) time.

If a value of -1 is shown for a property, either that property is unavailable on the platform, or an error occurred.


Parent: Using JConsole

Error 404 - Not Found

Error 404 - Not Found

The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.