Thursday, March 11, 2010

Profiling Weblogic Application through Eclipse Galileo and TPTP plug-in (Using TPTP Agent Controller)

TPTP (Test & Performance Tools Platform) is an open source project from Eclipse community ( TPTP provides a powerful tool to analyze performance, memory and coverage aspect of a J2EE application. Installing and configuring TPTP in Eclipse is quite straight forward. If the application is a standalone application or running on Tomcat server, profiling the application is a button click activity (right click on the project and select profile). But it becomes bit tricky to profile an application running on Weblogic server as there is no direct adaptor available to achieve the same. To profile a Weblogic application, we need to install and configure TPTP agent controller to work with Weblogic server.

I just thought to list down the steps involved in end-to-end configuration of TPTP along with Agent Controller for Weblogic applications. Here is my list of steps.

1. Installing TPTP Plug-in in Eclipse

  1. Open Eclipse
  2. Go to Help -> Install new software
  3. Click on Add button next to Work with dropdown
  4. Provide details below and hit OK
    1. Name : Any name
    2. Location:
  5. Select newly added site in Work with dropdown
  6. Select the features with desired version from the text area coming downside of the screen.
  7. Click on next and follow subsequent instructions to install TPTP plug-in in your Eclipse.
  8. Once done, restart your Eclipse.

Theoretically this should install TPTP plug-in with Agent Controller but it didn’t work in my case. So as a next step I explicitly installed Agent Controller,

2. Installing Agent Controller

  1. Go to TPTP download site
  2. Download the desired version of Agent Controller by selecting the appropriate platform
  3. Install file is a zip archive, open it with any zip utility and extract to your file system in the desired drive e.g. C:\tptp
  4. It creates a folder as C:\tptp\agntctrl\
  5. Add the bin folder (e.g. C:\tptp\agntctrl\win_ia32\bin) in the path variable.
  6. Execute “SetConfig.bat” batch file from a command line in the bin directory to generate the configuration file for the Agent Controller.
  7. Provide specific details being prompted or hit Enter for default.
  8. This completes the agent controller installation.

Once TPTP and Agent controller are in place, we need to Configure Weblogic server so that it generates the traces for Agent Controller.

3. Configuring Weblogic server

  1. Stop the Weblogic server, if it’s running already.
  2. Open startWebLogic.cmd file from your Weblogic installation in a text editor.
  3. Look for statement as “set JAVA_OPTIONS=%JAVA_OPTIONS%”
  4. Add argument as “-XrunpiAgent:server=enabled” like set JAVA_OPTIONS=%JAVA_OPTIONS% -XrunpiAgent:server=enabled
  5. Save and close the CMD file.

At this point you are all set to profile your Weblogic application running within Eclipse (If not done already follow the steps to run the application with Eclipse). Below are the steps to start profiling your J2EE application within Eclipse.

4. Profiling the application through Eclipse

  1. Open your Eclipse IDE
  2. Start the Weblogic server hosting the J2EE application.
  3. Wait for server to completely start.
  4. Click on the icon for profile next to run icon in command bar of the eclipse.
  5. Click on “profile configurations..” option
  6. It opens a new window with some options in left pane.
  7. Double click on “Attach to Agent” option
  8. It opens dialogue for new configuration. Fill the details as below
    1. Name: Any descriptive name
    2. Leave to host tab as default
    3. Go to Agent tab
    4. You should see the agent controller check box preceded by a “+” sign, if you don’t see the agent controller being list, click on the refresh button. If still don’t see the agent controller, your agent controller may not be running. In this case start the Agent Controller manually by running “ACServer.exe” from bin directory of Agent Controller installation.
    5. Click on the “+” sign to expand and select one are more analysis type to be performed e.g. Basic Memory Analysis, Execution Time Analysis etc.
    6. Once you select the analysis type, “Profile” button in the bottom is enabled.
    7. Click the button and start analyzing your application.

This completed all the configurations required. If interested in more on profiling techniques, wait for my coming postings.


  1. Hi, Thanks for this nice post, i was tring to follow the steps mentioned by you but facing one problem at step 4.d , as i am not geting any + sign after refreshing many times also.please help.

  2. Sorry I didn't notice your question. As I mentioned in step 8.d, your agent controller should be running. '+' sign appears only when the agent controller is properly configured and in started state. Please review your agent controller settings and its status and try again.

  3. Hi, I hit this error when starting Weblogic Server. my Weblogic version is 10gR3

    [ERROR][load ] Could not load library piAgent

    1. same issue here, weblogic doesn start