Archive for the ‘jvm’ Category

JProfiler is a tool for profiling JVM. In this tutorial I will show how to start WSO2 carbon servers with JProfiler so you can monitor the carbon servers for memory, threads and performance.  I will use WSO2 ESB (Enterprise Service Bus) in this guide, however this is same for any carbon server AS, Greg, API Manager …etc.

Step 1 : Dowload the packs

Download the WSO2 ESB from http://wso2.com/products/enterprise-service-bus/ . You can find all the WSO2 products from the Product page of http://wso2.com/.

Download the JProfiler from http://www.ej-technologies.com/download/jprofiler/files

Step 2 : Start JProfiler

Start the JProfiler  sh $JProfiler_HOME/bin/jprofiler

Step 3 : Step into profiling

Click Start centre at the top left

JProfiler Start Center

JProfiler Start Center

Step 4 :  Select Local or remote

2 local or remote

Step 5 : Select the vendor
Select the vendor

Select the vendor

Step 6 : Select the port the ESB will run
Select the port the carbon server will run

Select the port the carbon server will run

Step 7 : Select the startup mood

wait for

Step 8

Copy the selected text

Step 9 : Copy the above selected text to the $ESB_HOme/bin/wso2server.sh
wso2 server sh
Step 9 : Start the ESB server.
Carbon server waiting for JProfiler

Carbon server waiting for JProfiler

You will find ESB is waiting for JProfiler GUI to start. So start KProfiler

Step 11 : Profiler started

Start profiler by pressing OK button and  ESB server will start.

JProfiler started with WSO2 ESB

JProfiler started with WSO2 ESB

Advertisements
$JAVA_HOME/bin/jinfo -flag <flag> <process_id_of_jvm>

As an example, if you want to know the PermSize of the the jvm.

$JAVA_HOME/bin/jinfo -flag PermSize <process_id_of_jvm>