Java Tool Tutorials - Herong's Tutorial Notes
Dr. Herong Yang, Version 5.11

'jstat' - JVM Statistics Monitoring Tool

This chapter provides tutorial notes on JVM statistics monitoring tools. Topics include listing JVM processes with 'jps', the JVM remote monitoring server - 'jstatd', Java security policy file, connecting 'jps' and 'jstat' to a remote machine, RMI protocol and URL, getting garbage collection statistics with 'jstat -gcutil'.

'jps' - JVM Process Status Tool

Listing JVM Processes on the Local Machine with "jps"

'jstatd' - JVM Remote Monitoring Server

Starting 'jstatd' with a Security Policy File

Connecting to 'jps' to Remote 'jstatd'

'jstat' Command Options and Parameters

Garbage Collection Testing Program

'jstat -gcutil' - Garbage Collection Statistics

Accessing Remote JVM Processes with 'jstat'

Conclusions:

  • JDK 1.6 offers 3 nice JVM monitoring tools: jps, jstatd, and jstat.
  • jps is simple tool that allows you to list all running JVM processes on the local machine or a remote machine.
  • jstatd is an RMI server that allows you to access local JVM processes by jps and jstat from remote machines.
  • jstat is a monitoring tool that allows you to obtain sample data periodically from a local or remote JVM process.

Dr. Herong Yang, updated in 2008
'jstat' - JVM Statistics Monitoring Tool