Skip to content

airlift/gcwatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

gcwatch is a simple JVM TI agent that monitors stop-the-world garbage collections and makes them available via a simple TCP server interface. This allows detecting if the machine and Java process is still running, even while the normal Java socket operations are blocked by the garbage collection event.

Protocol

The server returns either OK or GC xxx where xxx is the number of milliseconds since the garbage collection began, followed by a newline.

Building

make JAVA_HOME=/path/to/jdk

Usage

Run Java with the agent added as a JVM argument, specifying the port number for the agent to listen on:

-agentpath:/path/to/libgcwatch.so=port=2000

Alternatively, if modifying the Java command line is not possible, the above may be added to the JAVA_TOOL_OPTIONS environment variable.

About

Monitor the JVM for stop-the-world GC pauses

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published