search cancel

Profiling and Debugging JBoss


Article ID: 49947


Updated On:


CA Directory CA Identity Manager CA Identity Governance CA Identity Portal CA Risk Analytics CA Secure Cloud SaaS - Arcot A-OK (WebFort) CLOUDMINDER ADVANCED AUTHENTICATION CA Secure Cloud SaaS - Advanced Authentication CA Secure Cloud SaaS - Identity Management CA Secure Cloud SaaS - Single Sign On CA Security Command Center CA Data Protection (DataMinder) CA User Activity Reporting



How to profile and debug JBoss application server when either more information is needed beyond the maximum level of debugging available to us, or when JBoss stops writing to the log. This is very good also for finding memory leaks down to the method level.


When troubleshooting issues with IM and JBoss, we are most commonly relying on various debugging levels of the application components and/or the application server components. However there can be hangs, memory leaks and performance issues in the application server that will not be logged. At times the application server may just stop writing to the log file altogether, leaving us at a dead end with troubleshooting.

To that end there is a free profiling tool from Eclipse that does not require installation. It monitors various aspects of the java process - e.g. memory usage (to check for any leaks), execution time etc, and it does so by tracing every single method in every class in every package. It is particularly simple to view from the interface itself because there you can refer specifically to the package causing the problem - is it a IM package, a core application server package etc. This is highly important for differentiating between a product problem and a JBoss core problem, and proving this differentiation.

This tool is called Eclipse TPTP (Test and Performance Tools Platform), and it can be downloaded from this location:

Please follow these instructions to get it working:

  1. Copy and unzip it to a machine with JBoss
  2. Ensure the piAgent.dll library used by the profiler is in your path
    (found under tptp.runtime.allInOne.win32.win32.x86-TPTP-4.7.2\eclipse\plugins\\agent_controller\bin)
  3. Configure the agentController (tptp.runtime.allInOne.win32.win32.x86-TPTP-4.7.2\eclipse\plugins\\agent_controller\bin)
  4. Start the AgentController (tptp.runtime.allInOne.win32.win32.x86-TPTP-4.7.2\eclipse\plugins\\agent_controller\bin\acserver.exe)
  5. Add the -XrunpiAgent:server=enabled JVM parameter onto the java command used to start JBoss:
    set\workpoint_client.policy -Xms256m -Xmx1024m -XX:MaxPermSize=256m -XX:ReservedCodeCacheSize=50m -XrunpiAgent:server=enabled %JAVA_OPTS%
  6. Restart JBoss
  7. In Eclipse: Select menu Window ? Open Perspective ? Other ? Profiling and Logging. Run ? Profile Configurations.
  8. Select Attach To Agent then click the 'New' button. Select the default host (localhost:10002), pickup the java profiling agent, apply changes.
  9. Click 'Profile' and the profiler starts collecting statistical data related to memory usage and execution times, per object, per function.


Component: IDMGR