Getting Started with LagHunter

Usage of LagHunter is quite simple. We provide a default configuration file where all variables are set to the proper values. Naturally, it is possible to edit the file and change, remove, and add an option/value.

LagHunter works as Java agent. It is required to have LagHunter-4.jar, LagHunterBootClasses-4.jar and LiLaConfiguration-4.txt in the same directory. It is recommended to set heap size maximum size to 1GB which satisfies most of the cases. To run your application together with our LagHunter, go to a terminal window, change directory to where your agents are, and use the example command given below:

java -Xmx1024m -javaagent:LagHunter-4.jar=/useLiLaConfigurationFile -cp [class path] mainClass

LagHunter itself, has sampling profiler, flyby profiler, gc profiler, and FTP trace files upload agent. Nevertheless, it is possible to run and use native agents instead with LagHunter as they are more accurate. We provide them complied for three different platforms: Windows, Linux, and Mac OS X. Use LagHunter embedded agents for other platforms!

it is not mandatory to run all agents but only those you need. For example, to run LagHunter together with agents on Mac use the example command given below:

java -Xmx1024m -javaagent:LagHunter-4.jar=/useLiLaConfigurationFile -agentpath:libsamplingprofiler.jnilib agentpath:libflybysamplingprofiler.jnilib -agentpath:libgcprofiler.jnilib -agentpath:libwriter.jnilib -cp [class path] mainClass

Note: Make sure that your settings are as you wish in LiLaConfiguration-4.txt.

LagHunter default configuration file defines standard set of options. Nevertheless, there are more options their list is available with the following terminal command:

java -javaagent:LagHunter-4.jar=/help

At the end of runtime, each agent produces a trace file that contains information it has been collecting. Writer agent only uploads traces to the FTP server you specify on the command line or in the configuration file.

To take a look at the traces file from one run use our LagAlyzer. To obtain cumulative information from multiple traces please contact us and we will be glad to help you.

More details about LagHunter we provide in this tutorial that is about both LagHunter and LagAlyzer.