Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use of JMX and How to use for existing applications

We have distributed web application developed few years back on JDK 5.

How JMX will help this application?

1) Will it help me to monitor performance (Memory, CPU and Network & Disk IO)?

2) If so then application is deployed in multiple servers,how can I monitor in one single dashboard?

3) Do I have to make any new code changes to the existing application or can I monitor without code changes?

4) What else can we do apart from performance monitoring? Because name is Management Extensions (MX) what can we manage and how? It seems primary objective is not monitoring, it is management?

I couldn’t get much about JMX from the tutorial provided in Oracle website http://docs.oracle.com/javase/tutorial/jmx/overview/why.html. It seems some business representative prepared this tutorial not a techie.

Can anyone help me in understanding this JMX stuff, your efforts are sincerely appreciated.

Thanks, Your Friend.

like image 213
learner Avatar asked Feb 10 '12 17:02

learner


People also ask

What is JMX and how do you use it?

The JMX technology can be used for out-of-the-box management of the Java VM. The Java Virtual Machine (Java VM) is highly instrumented using the JMX technology. You can start a JMX agent to access the built-in Java VM instrumentation, and thereby monitor and manage a Java VM remotely.

What can you do with JMX?

The dynamics of the JMX technology architecture enables you to use it to monitor and manage resources as they are implemented and installed. It can also be used to monitor and manage the Java Virtual Machine (JVM machine). Typical uses of the JMX technology include: Consulting and changing application configuration.

Why you would want to use a JMX monitoring tool?

JMX Monitoring to Improve the Performance of Java Applications. Easily monitor JVMs and Java web application servers with the eG Enterprise JMX monitoring solution. Improve the performance of your applications by identifying bottlenecks at the code-level and in the infrastructure.

How do I connect to JMX?

Remote JMX ConnectionsRight click anywhere in the blank area under the application tree and select Add JMX Connection. Provide the machine name and port number for a running JMX agent, that has been started with the appropriate system properties to allow remote management.


1 Answers

JMX is a standardized way of getting information out of a running system and to invoke operations on it. The JVM gives you a set of MBeans through which you can access runtime data like memory consumption, GC stats and some more data. You can also invoke a number of operations. Your app server will also give you a number of MBeans which you can use to control the server and installed applications.

  1. Yes, it will give you some performance data. See http://docs.oracle.com/javase/1.5.0/docs/guide/management/overview.html for a list of resources.
  2. This depends on your application server. If it support clustered environments, it will probably give you a dashboard.
  3. If you are fine with the standard JVM and app server MBeans, you won't need do any changes. But you may want to write your own MBean to give specific application status and statistics or ways to control your application. See http://docs.oracle.com/javase/tutorial/jmx/mbeans/standard.html
  4. Well, you can do anything you like in a standardized way.

Take a look at jconsole (included in the JDK) to see what JMX offers for you!

like image 69
DagR Avatar answered Sep 20 '22 01:09

DagR