Oracle GlassFish Server 3.0.1 Administration Guide

JVM Statistics

The JVM fits into the tree of objects as show in JVM Tree Hierarchy.

The statistics that are available for the Virtual Machine for Java platform (Java Virtual Machine) or JVM machine are shown in the following sections:

JVM Class Loading System Statistics

Use the following dotted name pattern for JVM class loading system statistics:

server.jvm.class-loading-system.statistic

With Java SE, additional monitoring information can be obtained from the JVM. Set the monitoring level to LOW to enable the display of this additional information. Set the monitoring level to HIGH to also view information pertaining to each live thread in the system. More information about the additional monitoring features for Java SE is available in Monitoring and Management for the Java Platform.

The Java SE monitoring tools are discussed at http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/technotes/tools/.

The statistics that are available for class loading in the JVM for Java SE are shown in the following table.

Table 8–17 JVM Monitoring Statistics for Java SE Class Loading

Statistic 

Data Type 

Description 

loadedclasscount

CountStatistic 

Number of classes that are currently loaded in the JVM 

totalloadedclasscount

CountStatistic 

Total number of classes that have been loaded since the JVM began execution 

unloadedclasscount

CountStatistic 

Number of classes that have been unloaded from the JVM since the JVM began execution 

The statistics available for threads in the JVM in Java SE are shown in the following table.

Table 8–18 JVM Monitoring Statistics for Java SE - Threads

Statistic 

Data Type 

Description 

allthreadids

StringStatistic 

List of all live thread ids. 

currentthreadcputime

CountStatistic 

CPU time for the current thread (in nanoseconds) if CPU time measurement is enabled. If CPU time measurement is disabled, returns -1. 

daemonthreadcount

CountStatistic 

Current number of live daemon threads. 

monitordeadlockedthreads

StringStatistic 

List of thread ids that are monitor deadlocked. 

peakthreadcount

CountStatistic 

Peak live thread count since the JVM started or the peak was reset. 

threadcount

CountStatistic 

Current number of live daemon and non-daemon threads. 

totalstartedthreadcount

CountStatistic 

Total number of threads created and/or started since the JVM started. 

JVM Compilation System Statistics

Use the following dotted name pattern for JVM compilation system statistics:

server.jvm.compilation-system.statistic

The statistics that are available for compilation in the JVM for Java SE are shown in the following table.

Table 8–19 JVM Monitoring Statistics for Java SE Compilation

Statistic 

Data Type 

Description 

name-current

StringStatistic 

Name of the current compiler 

totalcompilationtime

CountStatistic 

Accumulated time (in milliseconds) spent in compilation 

JVM Garbage Collectors Statistics

Use the following dotted name pattern for JVM garbage collectors statistics:

server.jvm.garbage-collectors.statistic

The statistics that are available for garbage collection in the JVM for Java SE are shown in the following table.

Table 8–20 JVM Monitoring Statistics for Java SE Garbage Collectors

Statistic 

Data Type 

Description 

collectioncount

CountStatistic 

Total number of collections that have occurred 

collectiontime

CountStatistic 

Accumulated time (in milliseconds) spent in collection 

JVM Memory Statistics

Use the following dotted name pattern for JVM memory statistics:

server.jvm.memory.statistic

The statistics that are available for memory in the JVM for Java SE are shown in the following table.

Table 8–21 JVM Monitoring Statistics for Java SE Memory

Statistic 

Data Type 

Description 

committedheapsize

CountStatistic 

Amount of heap memory (in bytes) that is committed for the JVM to use 

committednonheapsize

CountStatistic 

Amount of non-heap memory (in bytes) that is committed for the JVM to use 

initheapsize

CountStatistic 

Size of the heap initially requested by the JVM 

initnonheapsize

CountStatistic 

Size of the non-heap area initially requested by the JVM 

maxheapsize

CountStatistic 

Maximum amount of heap memory (in bytes) that can be used for memory management 

maxnonheapsize

CountStatistic 

Maximum amount of non-heap memory (in bytes) that can be used for memory management 

objectpendingfinalizationcount

CountStatistic 

Approximate number of objects that are pending finalization 

usedheapsize

CountStatistic 

Size of the heap currently in use 

usednonheapsize

CountStatistic 

Size of the non-heap area currently in use 

JVM Operating System Statistics

Use the following dotted name pattern for JVM operating system statistics:

server.jvm.operating-system.statistic

The statistics that are available for the operating system for the JVM machine in Java SE are shown in the following table.

Table 8–22 JVM Statistics for the Java SE Operating System

Statistic 

Data Type 

Description 

arch-current

StringStatistic 

Operating system architecture 

availableprocessors

CountStatistic 

Number of processors available to the JVM 

name-current

StringStatistic 

Operating system name 

version-current

StringStatistic 

Operating system version 

JVM Runtime Statistics

Use the following dotted name pattern for JVM runtime statistics:

server.jvm.runtime.statistic

The statistics that are available for the runtime in the JVM runtime for Java SE are shown in the following table.

Table 8–23 JVM Monitoring Statistics for Java SE Runtime

Statistic 

Data Type 

Description 

classpath-current

StringStatistic 

Classpath that is used by the system class loader to search for class files 

inputarguments-current

StringStatistic 

Input arguments passed to the JVM; not including arguments to the main method

managementspecversion-current

StringStatistic 

Management specification version implemented by the JVM 

name-current

StringStatistic 

Name representing the running JVM 

specname-current

StringStatistic 

JVM specification name 

specvendor-current

StringStatistic 

JVM specification vendor 

specversion-current

StringStatistic 

JVM specification version 

uptime

CountStatistic 

Uptime of the JVM (in milliseconds) 

vmname-current

StringStatistic 

JVM implementation name 

vmvendor-current

StringStatistic 

JVM implementation vendor 

vmversion-current

StringStatistic 

JVM implementation version