Tools for measuring and analysing software performance.
The Gin agent runs in-process in the JVM as a Java Agent in order to capture low-impact performance snapshots while your system is running.
The Gin agent is free (as in beer) and released under the Creative Commons Attribution-NoDerivatives 4.0 International License (CC BY-ND).
This means you are free to use and share the agent as you wish but that:
Just add the gin-agent-1.X.X.jar
as a javaagent to the command line used to launch your JVM i.e.
-javaagent:<path to gin-agent.jar>[=option1=value1[,optionN=valueN]]
Where the possible options are:
output
- the directory in which to save the created archive files, defaults to the location specified by java.io.tmpdirsample
- the sampling interval in milliseconds, defaults to 100 ms. The sampling interval controls the frequency with which samples are taken from the process being monitored. Typical useful values range from 20 ms to 1000 ms.collect
- the collection interval in minutes, defaults to 5 minutes. The collection interval is the time period over which samples are aggregated to create each individual profile in the archive.batch
- the number of profiles to gather in each created archive, defaults to 12 (which represents an hour of profiles at the default collection interval of 5 minutes)port
- the port to start listening for command interface connections, if not supplied the command interface is not started and the agent will always start profiling immediatelystart
- if present the profiler will start profiling immediately even when a command interface is started, by default the agent will not start profiling immediately if the command interface is startedupload
- the upload authentication key, if not supplied the profiles will not be uploadedurl
- the upload url, defaults to …quiet
- runs the agent in quiet mode which suppresses the logging the profiler normally sends to System.err
Example:
-javaagent:/usr/local/opt/gin/gin-agent-1.x.x.jar=output=/tmp,sample=250,collect=30,batch=48,quiet,port=12345,start
Runs the profiler with a sampling rate of 250 ms, creating a new profile every 30 minutes and batching 48 profiles into each archive.
Archives are saved to /tmp
. The agent is run in quiet mode.
The command interface is started, listening on port 12345. The agent will begin profiling immediately.
For long running applications it can be useful to manually start, stop and reconfigure the profiler without having to restart the entire java application. Therefore the Gin agent supports a command interface which can optionally be started by providing a port number for the command interface to listen on.
Once the command interface is started an interactive command interface session can be started by connecting to the command interface port with a telnet client. Once connected you will see a command prompt where you can issue commands to the Gin agent.
Supported commands are: