Remote Monitoring with JMX Tools in Jelastic, Part II: VisualVM

By July 19, 2012 HowTo One Comment
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

We have already shown you how to use JMX tools in Jelastic through JConsole. Here’s one more instruction for VisualVM tool, which integrates several commandline JDK tools and lightweight profiling capabilities. It enhances the capability of monitoring and performance analysis for the Java SE platform. This great tool is commonly used by application developers for monitoring, profile, taking thread dumps and browsing heap dumps. System administrators use it very often for monitoring and control of Java apps across the entire network. Even Java application users can create bug reports containing all the necessary information with VisualVM.

So, you have to go through the steps below to start VisualVM monitoring of your app in Jelastic Cloud Platform:

1. Go to and sign up if you haven’t done it yet or log in with your Jelastic credentials by clicking the Sign In link on the page.

2. While in Jelastic dashboard, click the Create environment button:

3. In the Environment Topology dialog, pick your application server (for example, Tomcat 6), switch on Public IPv4 for your server and type your environment name, for example, visualvm.


Wait just a minute for your environment to be created. You can see your Public IP in the dropdown list for Tomcat.

4. Click on config button for Tomcat.

5. Navigate to variables.conf file (server directory) and set the following system properties:{your_port_number}

jmx tools

Save the changes and restart Tomcat!

6. If you have Sun JDK 6 or 7 installed on your computer, run VisualVM (…/jdk/jre/bin/visualvm). Also you can download and install VisualVM separately. Then add a new JMX connection (enter Tomcat’s Public IP address and the port number that you have specified in variables.conf ).

In a few seconds your connection will be established and your application will appear in the list with remote connections. Also you’ll see short overview of your server, including server data, JVM arguments and system properties.

7. Navigate to the Monitor tab to follow the high-level statistics. Here are the charts which demonstrate CPU utilization including GC (garbage collection) activity, memory state and number of uploaded classes and created threads.

8. If you switch to the Threads tab you can monitor detailed stats on all your threads. There are several views of this statistics: timeline, table and details.

9. Sampler has two modes: CPU and Memory. The first one profiles methods according to the spent time, the second profiles them according to the created and removed objects.

Here is a video version of the same procedure::

Hope the instruction above will be useful for you. Stay tuned!

Related articles

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

One Comment

Leave a Reply

Subscribe to get the latest updates