Rjam (Real-time Java Application Monitor)

Using the Rjam Collector

The Rjam agent is highly configurable and can be deployed in a large number of ways. In Getting Started we installed Rjam and configured it to write the data to the local file system. This is a very simple configuration with very few dependencies. However, it's difficult to review and analysis the data. Here we will install the Rjam agent and configure it to write data to a database using the RjamCollector and then we'll use RjamAnalysis to view the data.

Download Rjam

If you have not already done so, 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}.

Start the Derby Database

Execute the startDerby script from {Rjam}/bin (startDerby.bat from windows).

Initialize the Rjam schema

You will initialize the Rjam database using RjamAnalysis. From the {Rjam} directory, execute startRjamAnalysis (.bat on Windows).

In the configuration panel populate the fields as follows (RjamAnalysis will remember these values the next time you start it).

Driver:org.apache.derby.jdbc.ClientDriver
URL:jdbc:derby://localhost:1527/rjam;create=true
Url:rjam
Password:rjam

Now click the "Connect" button and slect "Yes" from the dialog box.

When the initialization is complete you should see

Now your database is initialized and you can exit the RjamAnalysis program for now.

Start the Rjam Collector

From the {Rjam}/bin directory, execute the startRjamCollector (.bat from Windows) script. You can review the log file ({Rjam}/logs/rjamCollector.log) to verify that the collector started correctly.

Configure and Start your web application

Now start your web application as before but add the following arguments.

		-javaagent:{Rjam}/lib/RJamAgent-{version}.jar
		-Xbootclasspath/p:{Rjam}/lib/javassist.jar
		-DrjamConfigFile={Rjam}/config/rjam-keyref.xml
		-DrjamOutput={Rjam}/logs/rjam.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-keyref.xml
		-DrjamOutput=/home/tony/MyTemp/Rjam-VB02_02/logs/rjam-keyref.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).

Use RjamAnalysis to review the data

First review 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 from the {Rjam}/bin directory, execute the startRjamAnalysis[.bat] script as before. Make sure the configuration panel is properly configured (as we did in Initialize). And press the connect button. Once you are connected, select the "Selection" tab.

RjamAnalysis starts with the time frame set to the most recent 20 minutes. If needed, use the Start and End Date dialogs to set the Start and End times to include the test you just conducted. Now press the "Execute Query" button.