15.2.3 IBM Rational Agent Controller

As mentioned before, the profiling tools work in conjunction with the IBM Rational Agent Controller, which is a separately installable program from the IBM Rational Application Developer V6 installation. Thus make sure that the Agent Controller has been installed on the host where you want to monitor the process.

The Agent Controller is a daemon process that enables client applications to launch host processes and interact with agents that coexist within host processes. The Agent Controller interacts with the following components:

- Host process

The host process contains the application that is to be profiled. This can be a stand-alone Java process or a WAS instance (including an instance running in an IBM Rational Application Developer V6 test environment). An Agent Controller must be executing on the same machine as the host process.

- Agent

An agent is a reusable binary file that provides services to the host process, and more importantly, provides a portal by which application data can be forwarded to attached clients. A host process can have one or more agents currently running within it.

Java Profiling Agent

The Java Profiling Agent uses the Java Virtual Machine Profiler Interface (JVMPI). The agent is a library that provides services to the host process to capture and record the behavior of a Java application, and makes this data available to attached clients. It is used for the collection of both stand-alone Java applications as well as applications running on an appserver. Figure 15-1 shows the use of the Java Profiling Agent.

J2EE Request Profiler

The J2EE Request Profiler is an agent that operates in a WAS process. It collects runtime data relating to the execution of the Web application, such as execution of EJBs and servlets, by intercepting requests to the EJB or Web containers. Distributed environments can be profiled by connecting to J2EE Request Profiler agents running on different nodes.

The J2EE Request Profiler only provides a subset of the information available from the Java Profiling Agent, since it only looks at the execution of the enterprise components, and not at Java objects and methods that are called from the EJBs and servlets. The J2EE Request Profiler does, however, have the ability to combine data from more than one WebSphere instance, allowing you to analyze and measure the behavior and performance of a distributed application.

- Client

A client is a local or remote application that retrieves and displays data that is collected by an agent. A single client can be attached to many agents at once, and can connect to Agent Controllers on local or remote machines. All communication between the client and agents occurs via the Agent Controller. A profiler client is provided with IBM Rational Application Developer V6. The profiling functionality in Rational Application Developer can be accessed from the Profiling and Logging Perspective.

In this chapter, we discuss the profiling of an application running on WAS. Similar techniques can be used to profile applications running in a Rational Application Developer test environment.

Before attempting to profile an application, ensure that the Agent Controller has been started. In Windows this can be checked from the Services program.


Next