jvmstat

Introduction

The jvmstat technology adds light weight performance and configuration instrumentation to the HotSpot JVM and provides a set of monitoring APIs and tools for monitoring the performance of the HotSpot JVM in production environments. The instrumentation is designed such that it is 'always on', yet has negligible performance impact. The monitoring interfaces added to the HotSpot JVM are proprietary and may or may not be supported in future versions of the HotSpot JVM.

Availability

The instrumented HotSpot JVM ships with J2SE 1.4.2 or later, providing always-on instrumentation. The HotSpot JVM, verion 1.4.1, also includes the the instrumentation, but it must be enabled with the -XX:+UsePerfData flag.

As of Java SE 5.0 and later, a subset of the jvmstat tools is included with the JDK. The tools include are:

jps

- formerly jvmps

jstat

- formerly jvmstat

jstatd

- formerly perfagent

The visualgc tool is not included with the Java SE 5.0 and later distributions, but is instead provided in this unbundled jvmstat 3.0 distribution.

The jvmstat tools included with Java SE 5.0 and later, and the visualgc tool included with the jvmstat 3.0 distribution, are capable of monitoring Java applications running on HotSpot 1.4.1 and later JVMs. Only this distribution and a Java SE 5.0 or later JDK are needed to monitor any version of an instrumented HotSpot JVM. The previous jvmstat versions are still available (check the Some features of the jvmstat tools require the existance of specific counter instances in the HotSpot JVM. Older HotSpot JVMs may not contain these specific counters. When encountering an older JVM, some features of the jvmstat tools may be disabled or warning messages may be issued.

Installation

This distribution of the jvmstat tools requires Java SE 5.0 or later with the HotSpot JVM. Before configuring and using the jvmstat tools, first download and install Java SE 5.0 or later for your operating environment. You must choose the JDK distribution as the class files needed by the monitoring tools are not included with the JRE. Once you have a working Java SE 5.0 or later installation, you are ready to install the jvmstat distribution. Follow the platform specific instructions for UNIX platforms and Windows platforms.

Tools

The jvmstat 3.0 distribution includes the following tools:

visualgc

A tool to graphically display instrumentation

Please see the Tool Documentation page for more details on these tools.

Instrumentation

The instrumented HotSpot JVM exports a set of instrumentation objects, or counters as they are typically called. The set of counters exported by a JVM is not static, as a JVM may create certain counters only when appropriate arguments are specified on the command line. Furthermore, different versions of a JVM may export very different sets of instrumentation. The names of these counters and the data structures used to represent them are considered private, uncommitted interfaces to the HotSpot JVM. Users should not become dependent on any counter names, particularly those that start with prefixes other than "java.".

Support

The jvmstat tools are officially unsupported. If you are expericencing a problem, please check the jvmstat FAQ for solutions. If you are still experiencing problems, or have additional questions, please send an email to jvmstat-support@sun.com .