Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Administration Guide

- Previous: Transaction Service Statistics
- Next: Production Web Container (PWC) Statistics

### Java Virtual Machine (JVM) Statistics

The JVM has monitorable attributes that are always enabled. The statistics available for the JVM are shown in the following table.

Table 16–16 JVM Statistics

Statistic | Data Type | Description
--- | --- | ---
`heapsize` | BoundedRangeStatistic | The resident memory footprint with the higher and lower bounds of the JVM’s memory heap size.
`uptime` | CountStatistic | The amount of time the JVM has been running.

#### JVM Statistics in J2SE 5.0

If the Application Server is configured to run on J2SE version 5.0 or higher, 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 on the additional monitoring features available in J2SE 5.0 is available in a document titled Monitoring and Management for the Java Platform, which is available from `http://java.sun.com/j2se/1.5.0/docs/guide/management/`.

The J2SE 5.0 monitoring tools are discussed at `http://java.sun.com/j2se/1.5.0/docs/tooldocs/#manage`.

The statistics available for class loading in the JVM in J2SE 5.0 are shown in JVM Statistics in J2SE 5.0.

Table 16–17 JVM Statistics for J2SE 5.0 - 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 compilation in the JVM in J2SE 5.0 are shown in JVM Statistics in J2SE 5.0.

Table 16–18 JVM Statistics for J2SE 5.0 - Compilation

Statistic | Data Type | Description
--- | --- | ---
`totalcompilationtime` | CountStatistic | Accumulated time (in milliseconds) spent in compilation.

The statistics available for garbage collection in the JVM in J2SE 5.0 are shown in JVM Statistics in J2SE 5.0.

Table 16–19 JVM Statistics for J2SE 5.0 - Garbage Collection

Statistic | Data Type | Description
--- | --- | ---
`collectioncount` | CountStatistic | Total number of collections that have occurred.
`collectiontime` | CountStatistic | Accumulated collection time (in milliseconds).

The statistics available for memory in the JVM in J2SE 5.0 are shown in JVM Statistics in J2SE 5.0.

Table 16–20 JVM Statistics for J2SE 5.0 - Memory

Statistic | Data Type | Description
--- | --- | ---
`objectpendingfinalizationcount` | CountStatistic | Approximate number of objects that are pending finalization.
`initheapsize` | CountStatistic | Size of the heap initially requested by the JVM.
`usedheapsize` | CountStatistic | Size of the heap currently in use.
`maxheapsize` | CountStatistic | Maximum amount of memory (in bytes) that can be used for memory management.
`committedheapsize` | CountStatistic | Amount of memory (in bytes) that is committed for the JVM to use.
`initnonheapsize` | CountStatistic | Size of the non-heap area initially requested by the JVM.
`usednonheapsize` | CountStatistic | Size of the non-heap area currently in use.
`maxnonheapsize` | CountStatistic | Maximum amount of memory (in bytes) that can be used for memory management.
`committednonheapsize` | CountStatistic | Amount of memory (in bytes) that is committed for the JVM to use.

The statistics available for the operating system in the JVM in J2SE 5.0 are shown in JVM Statistics in J2SE 5.0.

Table 16–21 JVM Statistics for J2SE 5.0 - Operating System

Statistic | Data Type | Description
--- | --- | ---
`arch` | StringStatistic | Operating system architecture.
`availableprocessors` | CountStatistic | Number of processors available to the JVM.
`name` | StringStatistic | Operating system name.
`version` | StringStatistic | Operating system version.

The statistics available for the runtime in the JVM in J2SE 5.0 are shown in JVM Statistics in J2SE 5.0.

Table 16–22 JVM Statistics for J2SE 5.0 - Runtime

Statistic | Data Type | Description
--- | --- | ---
`name` | StringStatistic | Name representing the running JVM
`vmname` | StringStatistic | JVM implementation name.
`vmvendor` | StringStatistic | JVM implementation vendor.
`vmversion` | StringStatistic | JVM implementation version.
`specname` | StringStatistic | JVM specification name.
`specvendor` | StringStatistic | JVM specification vendor.
`specversion` | StringStatistic | JVM specification version.
`managementspecversion` | StringStatistic | Management spec. version implemented by the JVM.
`classpath` | StringStatistic | Classpath that is used by the system class loader to search for class files.
`librarypath` | StringStatistic | Java library path.
`bootclasspath` | StringStatistic | Classpath that is used by the bootstrap class loader to search for class files.
`inputarguments` | StringStatistic | Input arguments passed to the JVM. Does not include the arguments to the `main` method.
`uptime` | CountStatistic | Uptime of the JVM (in milliseconds).

The statistics available for `ThreadInfo` in the JVM in J2SE 5.0 are shown in JVM Statistics in J2SE 5.0.

Table 16–23 JVM Statistics for J2SE 5.0 - Thread Info

Statistic | Data Type | Description
--- | --- | ---
`threadid` | CountStatistic | Id of the thread.
`threadname` | StringStatistic | Name of the thread.
`threadstate` | StringStatistic | State of the thread.
`blockedtime` | CountStatistic | Time elapsed (in milliseconds) since the thread entered the `BLOCKED` state. Returns -1 if thread contention monitoring is disabled.
`blockedcount` | CountStatistic | Total number of times that the thread entered the `BLOCKED` state.
`waitedtime` | CountStatistic | Elapsed time (in milliseconds) that the thread has been in a `WAITING` state. Returns -1 if thread contention monitoring is disabled.
`waitedcount` | CountStatistic | Total number of times the thread was in `WAITING` or `TIMED_WAITING` states.
`lockname` | StringStatistic | String representation of the monitor lock that the thread is blocked to enter or waiting to be notified through the `Object.wait` method.
`lockownerid` | CountStatistic | Id of the thread that holds the monitor lock of an object on which this thread is blocking.
`lockownername` | StringStatistic | Name of the thread that holds the monitor lock of the object this thread is blocking on.
`stacktrace` | StringStatistic | Stack trace associated with this thread.

The statistics available for threads in the JVM in J2SE 5.0 are shown in JVM Statistics in J2SE 5.0.

Table 16–24 JVM Statistics for J2SE 5.0 - Threads

Statistic | Data Type | Description
--- | --- | ---
`threadcount` | CountStatistic | Current number of live daemon and non-daemon threads.
`peakthreadcount` | CountStatistic | Peak live thread count since the JVM started or the peak was reset.
`totalstartedthreadcount` | CountStatistic | Total number of threads created and/or started since the JVM started.
`daemonthreadcount` | CountStatistic | Current number of live daemon threads.
`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.
`monitordeadlockedthreads` | StringStatistic | List of thread ids that are monitor deadlocked.

- Previous: Transaction Service Statistics
- Next: Production Web Container (PWC) Statistics

- © 2010, Oracle Corporation and/or its affiliates