Monday, March 4, 2013

How to attach JProfiler with WSO2 Products

JProfiler is very useful software for developers to monitor the memory usage, CPU usage, etc. of Java program. With in this post I'll explain how to attached the JProfiler to the Carbon products. I'll take latest Identity server 4.1.0 version as a Carbon product.

1. First thing is you need to download the JProfiler and install in to your machine. I have downloaded the JProfiler and installed in the following location.
[sourcecode language="xml"]
/home/dinuka/jprofiler7/
[/sourcecode]

2. Then you have to put the following line into the wso2server.sh file located at $IS_HOME/repository/bin/
[sourcecode language="xml"]
-agentpath:/home/dinuka/jprofiler7/bin/linux-x64/libjprofilerti.so=port=8849 \
[/sourcecode]
is

3.Now go to $IS_HOME/repository/bin and start the wso2server.sh

is

You can see Its waiting for connection from JProfiler.

4. Go to the location of JProfiler "/home/dinuka/jprofiler7/bin" and run the "jprofiler" file to start the JProfiler

is

is

Now go to Session->Start Center and select the tab "New Session" then click New Session

is

Select "Attach to Profiled JVM (local or remote)" and fill the details of Identity Server then click ok

is

5. You can select one of the following categories (Instrumentation or Sampling)

is

is

Then you can see Identity Server is Starting up.

is

Now JProfiler is connected Successfully

is

No comments:

Post a Comment