Rjam (Real-time Java Application Monitor)

Getting Started

The Rjam agent is highly configurable. It can be deployed in a large number of ways. The first thing we'll do is install and configure Rjam to write the data to the local file system. This a is a very simple configuration with very few dependencies (view the log configuration file ).

To get started, download the latest version of the Rjam distribution from Sourceforge and extract that onto your local drive. We'll refer to that location as {Rjam}.

Prepare your application to use Rjam by adding the following lines to your startup:

		-javaagent:{Rjam}/lib/RJamAgent-{version}.jar
		-Xbootclasspath/p:{Rjam}/lib/javassist.jar
		-DrjamConfigFile={Rjam}/config/rjam-log.xml
		-DrjamOutput={Rjam}/logs/rjam.log
		-DDefaultReporter.FileName={Rjam}/logs/rJamData.log
	


	Here's an example of what that might look like:
		-javaagent:/home/tony/MyTemp/Rjam-VB02_02/lib/RJamAgent-VB02_02.jar
		-Xbootclasspath/p:/home/tony/MyTemp/Rjam-VB02_02/lib/javassist-3-14.jar
		-DrjamConfigFile=/home/tony/MyTemp/Rjam-VB02_02/config/rjam-log.xml
		-DrjamOutput=/home/tony/MyTemp/Rjam-VB02_02/logs/rjam.log
		-DDefaultReporter.FileName=/home/tony/MyTemp/Rjam-VB02_02//logs/rJamData.log

		

That's all there is to it. Now validate that your web application has started correctly by visiting the site and execute a few Servlets (or JSPs).

Now review the rjam files. First look at the rjam.log file. This file will contains information about the Rjam configuration, startup and any errors that Rjam encountered. You should see something like this.

Now look at the rjamData.log file. This file will contains information about the activity of your application. You should see something like this. Each line in the data file is a comma delimited list of fields that represent an Event. The following fields are in the data file; Monitor Name, Object ID, Event ID, ClassName+"."+MethodName,Event Type, Time of the Event,Data Associated with the Event, Thread Id If the Event is an End the duration (time=xx) is also included.

Examples:
Servlet,1306666360191,1232,test.org.rjam.servlet.DataSourceServlet.GET,Start,1306666360191,/RjamWebTest/DataSource,2119510 
Servlet,1306666360191,1232,test.org.rjam.servlet.DataSourceServlet.GET,End,1306666365745,2119510, time=5554