使用JMX以及如何使用现有应用程序 [英] Use of JMX and How to use for existing applications

查看:157
本文介绍了使用JMX以及如何使用现有应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经分发了几年前在JDK 5上开发的Web应用程序。

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


JMX将如何帮助这个应用程序?

How JMX will help this application?

1)它能帮我监控性能(内存,CPU和网络及磁盘IO)吗?

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

2)如果是,那么应用程序部署在多个服务器中,如何在一个仪表板中进行监控?

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

3)我是否必须对现有应用程序进行任何新代码更改,还是可以在不更改代码的情况下进行监视?

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

4)除性能监控外,我们还能做些什么?因为name是Management Extensions(MX)我们可以管理什么以及如何管理?似乎主要目标不是监控,而是管理?

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?

我无法从Oracle网站提供的教程中了解JMX http://docs.oracle.com/javase/tutorial/jmx/overview/why.html 。似乎有些商业代表准备了这个教程而不是技术人员。

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.

任何人都可以帮助我理解这个JMX的东西,真诚地感谢您的努力。

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

谢谢,
你的朋友。

Thanks, Your Friend.

推荐答案

JMX是一种获取信息的标准化方式退出正在运行的系统并调用它上面的操作。 JVM为您提供了一组MBean,您可以通过它们访问运行时数据,如内存消耗,GC统计信息和更多数据。您还可以调用许多操作。您的应用服务器还将为您提供许多MBean,您可以使用这些MBean来控制服务器和已安装的应用程序。

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. 是的,它会给出你有一些表现数据。请参阅 http://docs.oracle.com/javase/ 1.5.0 / docs / guide / management / overview.html 获取资源列表。

  2. 这取决于您的应用程序服务器。如果它支持集群环境,它可能会为您提供一个仪表板。

  3. 如果您对标准JVM和应用服务器MBean很好,则不需要进行任何更改。但您可能希望编写自己的MBean来提供特定的应用程序状态和统计信息或控制应用程序的方法。请参阅 http://docs.oracle.com/javase/tutorial/jmx/ mbeans / standard.html

  4. 嗯,你可以用标准化的方式做任何你喜欢的事。

  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.

查看jconsole(包含在JDK中)以了解JMX为您提供的内容!

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

这篇关于使用JMX以及如何使用现有应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆