WO2012152127A1 - Management method, monitoring system and monitoring agent module for java virtual machine - Google Patents

Management method, monitoring system and monitoring agent module for java virtual machine Download PDF

Info

Publication number
WO2012152127A1
WO2012152127A1 PCT/CN2012/072641 CN2012072641W WO2012152127A1 WO 2012152127 A1 WO2012152127 A1 WO 2012152127A1 CN 2012072641 W CN2012072641 W CN 2012072641W WO 2012152127 A1 WO2012152127 A1 WO 2012152127A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual machine
management
java virtual
java
mbean
Prior art date
Application number
PCT/CN2012/072641
Other languages
French (fr)
Chinese (zh)
Inventor
陈鹏
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012152127A1 publication Critical patent/WO2012152127A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication

Definitions

  • the present invention relates to the field of monitoring technologies, and in particular, to a Java virtual machine (JVM Java Virtual Machine) management method, a monitoring system, and a monitoring agent module.
  • JVM Java Virtual Machine Java Virtual Machine
  • the stand-alone monitoring device is currently a popular monitoring tool. As shown in Fig. 1, the monitoring device is generally installed in the same device as the monitored JVM, and is managed by starting the monitoring device locally, such as monitoring and operation.
  • the main technical problem to be solved by the present invention is to provide a Java virtual machine management method, a monitoring system, and a monitoring agent module, which implement centralized remote management of at least one device Java virtual machine to reduce management costs.
  • an embodiment of the present invention provides a method for managing a Java virtual machine, including the following steps:
  • the at least one Java virtual machine is encapsulated with the Java virtual machine management Before registering the functional MBean resource to the Java management extension server, the method further includes the steps of: constructing a proxy interface of the Java virtual machine tool interface for one of the Java virtual machines, the proxy interface providing all management information of the Java virtual machine;
  • the proxy interface is encapsulated into an MBean resource having the Java virtual machine management function.
  • the remote management of the Java virtual machine that accesses the MBean resource is specifically:
  • a monitoring system includes a Java management extension server, a management module, and at least one Java virtual machine, where
  • Each Java virtual machine is correspondingly provided with a monitoring agent module, and the monitoring agent module is configured to register an MBean resource encapsulated with its monitored Java virtual machine management function to a Java management extension server; the Java management extension server, and the monitoring a proxy module connection, configured to register an MBean resource of a Java virtual machine management function; the management module, connected to the Java management extension server, configured to access at least one Java virtual machine to register an MBean resource on the Java management extension server, to The Java virtual machine that is accessed by the MBean resource is remotely managed.
  • the monitoring agent module is further configured to:
  • the proxy interface is encapsulated as an MBean resource with its monitored Java virtual machine management capabilities.
  • the Java management extension server further includes a connector, and the management module accesses, by the connector, the MBean resource registered by the at least one Java virtual machine on the Java management extension server.
  • the management module is specifically configured to:
  • the management module displays the management information of the Java virtual machine accessed by the Mbean resource in a graphical or tabular form.
  • a monitoring agent module comprising:
  • a registration unit that is set up to register an MBean resource encapsulated with its monitored Java virtual machine management capabilities to a Java Management Extension Server.
  • the monitoring agent module further includes:
  • a building unit configured to build a proxy interface of a Java virtual machine tool interface of the Java virtual machine it monitors, the proxy interface providing all management information of the Java virtual machine it monitors;
  • An encapsulation unit configured to encapsulate the proxy interface as an MBean resource with its monitored Java virtual machine management capabilities.
  • the present invention registers a MBean resource encapsulating the Java virtual machine management function of at least one Java virtual machine to the Java management extension server by setting a Java management extension server, and then connecting to the Java through the management module.
  • the management extension server accesses the MBean resource registered by the at least one Java virtual machine on the Java management extension server to perform centralized remote management of the Java virtual machine of the accessed MBean resource, thereby greatly reducing the management cost.
  • Figure 1 is a schematic diagram of a stand-alone monitoring device
  • FIG. 2 is a flowchart of a method for managing a Java virtual machine according to an embodiment of the present invention
  • FIG. 3 is a block diagram of a monitoring system according to an embodiment of the present invention
  • FIG. 4 is a schematic block diagram of a monitoring agent module according to an embodiment of the present invention. detailed description
  • the present invention registers a MBean (Mand Bean) resource of at least one Java virtual machine encapsulating the Java virtual machine management function to the Java management extension server by setting a Java management extension server, and then connects to the Java management extension server through the management module. And accessing at least one Java virtual machine to register the MBean resource on the Java management extension server to perform centralized remote management on the Java virtual machine of the accessed MBean resource, thereby reducing management cost.
  • MBean Mand Bean
  • FIG. 2 is a flowchart of a method for managing a Java virtual machine according to an embodiment of the present invention, where the process includes the following steps:
  • Step 201 Construct a proxy interface of a Java Virtual Machine Tool Interface (JVMTI) of the Java virtual machine, where the proxy interface provides all management information of the Java virtual machine, such as monitoring and operation. And information that the exception needs to be corrected.
  • JVMTI Java Virtual Machine Tool Interface
  • JVMTI provides a programming interface that allows software developers to create software agents to monitor and control Java programming language applications. Through the JVMTI interface, you can use C/C++ to create agents (Agents) to monitor and control JVM and Java applications, including profiling, debugging, monitoring, thread analysis, thread operations, garbage collection, deadlock decisions, and more.
  • Step 202 Encapsulate the proxy interface as an MBean resource having a management function of the Java virtual machine.
  • Step 203 Set the Java Management Extension Server.
  • Step 204 Register the MBean resource encapsulated with the Java virtual machine management function to a Java Management Extension (JMX) server.
  • JMX Java Management Extension
  • JMX is a framework for implanting management functions for applications, devices, systems, and more. JMX can flexibly develop seamlessly integrated systems, networks, and service management applications across a range of heterogeneous operating system platforms, system architectures, and network transport protocols. It makes it easy for Java applications to be managed remotely.
  • Steps 205-206 Accessing the MBean resource registered on the Java management extension server, and remotely managing the Java virtual machine of the accessed MBean resource.
  • FIG. 3 is a block diagram of a monitoring system according to an embodiment of the present invention, which includes a Java management extension server, a management module, and at least one Java virtual machine, where each Java virtual machine is correspondingly provided with a monitoring agent.
  • a module the monitoring agent module configured to register an MBean resource encapsulated with its monitored Java virtual machine management function to a Java management extension server; the Java management extension server, connected to the monitoring agent module, configured to register Java virtual machine management Functional MBean resources.
  • the Java management extension server maintains the lifecycle of the MBean registered by the monitoring agent module (including registering and unregistering MBeans) through the JMX server, and provides various services for the registered MBeans, and externally registers the registered MBeans through the connector.
  • the management interface is exposed to the outside management module.
  • the management module is connected to the Java management extension server and configured to access the MBean resource registered by the Java virtual machine on the Java management extension server to remotely manage the Java virtual machine of the accessed MBean resource.
  • each monitoring agent is started with the startup of the Java virtual machine it monitors, each The monitoring agent module needs to build a proxy interface of the Java virtual machine tool interface of its monitored Java virtual machine before registering the MBean resource encapsulated with its monitored Java virtual machine management function to the Java management extension server, the proxy interface providing its Monitor all management information for the Java virtual machine and then encapsulate the proxy interface as an MBean resource with its monitored Java virtual machine management capabilities.
  • the Java management extension server is provided with a connector, and the management module accesses the MBean resource registered on the Java management extension server through the connector.
  • the management module accesses the MBean resource
  • the accessed MBean resource needs to be encapsulated into an interface that can be called by the management module, and then the management module invokes the interface to remotely manage the Java virtual machine of the accessed MBean resource.
  • the management module may be a centralized console with a visual management interface
  • the visualization management module encapsulates the MBean resource registered on the Java management extension server into an interface that can be called by the visual management interface; and then invokes the interface. Displaying the management information of the Java virtual machine corresponding to the MBean resource in a graphical or tabular manner on the visual interface, and providing corresponding operation buttons for the user to remotely manage the Java virtual machine.
  • the monitoring system of the present invention can be implemented in the following manner:
  • the JVMTI Agent interface is implemented in C/C++, which provides all management information of the JVM.
  • the monitoring agent module uses the Java language to call the Agent interface of the Java virtual machine through JNI technology, and encapsulates the Agent interface into an MBean resource with the Java virtual machine management function; the user can customize the MBean resource to be managed for remote management;
  • the proxy module registers the MBean resource on the JMX server.
  • the JMX server provides MBean registration for the monitoring agent module, and centrally manages MBean resources and provides various services.
  • the JMX server provides a connector to the management module to access the MBean resources registered on the JMX server.
  • an embodiment of the present invention further provides a monitoring agent module, where the monitoring agent module is connected to a Java virtual machine, and specifically includes:
  • Registration unit set to MBean with the Java virtual machine management function that will be encapsulated with its monitoring
  • the source is registered to the Java Management Extension Server.
  • monitoring agent module further includes:
  • a building unit configured to build a proxy interface of a Java virtual machine tool interface of the Java virtual machine it monitors, the proxy interface providing all management information of the Java virtual machine it monitors;
  • An encapsulation unit configured to encapsulate the proxy interface as an MBean resource with its monitored Java virtual machine management capabilities.
  • a monitoring agent module is disposed correspondingly for each Java virtual machine, and each monitoring agent module registers the MBean resource encapsulated with the monitored Java virtual machine management function to the Java management extension server, so that the management module performs centralized Remote management.

Abstract

A management method, a monitoring system and a monitoring agent module for a Java virtual machine. The method comprises: setting a Java management extended server; registering at least one of the Mbean resources, which package a Java virtual machine management function, of the Java virtual machine to the Java management extended server; accessing at least one of the Mbean resources, which are registered on the Java management extended server by the Java virtual machine, to manage the Java virtual machine with the accessed Mbean resource remotely.

Description

Java虚拟机的管理方法、 监控系统和监控代理模块 技术领域  Java virtual machine management method, monitoring system and monitoring agent module
本发明涉及监控技术领域,具体涉及一种 Java虚拟机( JVMJava Virtual Machine ) 的管理方法、 监控系统和监控代理模块。 背景技术  The present invention relates to the field of monitoring technologies, and in particular, to a Java virtual machine (JVM Java Virtual Machine) management method, a monitoring system, and a monitoring agent module. Background technique
单机监控装置是目前比较流行的监控工具, 如图 1 所示, 监控装置一 般和被监控的 JVM安装于同一台设备中, 通过在本机启动该监控装置进行 管理, 比如监控、 操作等。  The stand-alone monitoring device is currently a popular monitoring tool. As shown in Fig. 1, the monitoring device is generally installed in the same device as the monitored JVM, and is managed by starting the monitoring device locally, such as monitoring and operation.
但是, 随着互联网的快速发展以及电信业务的不断增多, 一个大型网 站往往需要几百台甚至上万台服务器采取分布式技术进行协同工作。 这种 情况下, 对每台服务器启动单机监控装置进行管理耗费资源、 且成本很高。 发明内容  However, with the rapid development of the Internet and the increasing number of telecom services, a large network station often requires hundreds or even tens of thousands of servers to work in a distributed manner. In this case, managing each server to start a stand-alone monitoring device is resource intensive and costly. Summary of the invention
本发明要解决的主要技术问题是提供一种 Java虚拟机的管理方法、 监 控系统和监控代理模块, 实现对至少一台设备的 Java虚拟机进行集中远程 管理, 以减少管理的成本。  The main technical problem to be solved by the present invention is to provide a Java virtual machine management method, a monitoring system, and a monitoring agent module, which implement centralized remote management of at least one device Java virtual machine to reduce management costs.
为解决上述技术问题,本发明实施例提供一种 Java虚拟机的管理方法, 包括步驟:  To solve the above technical problem, an embodiment of the present invention provides a method for managing a Java virtual machine, including the following steps:
设置 Java管理扩展服务器, 将至少一个 Java虚拟机的封装有该 Java 虚拟机管理功能的 MBean资源注册到所述 Java管理扩展服务器;  Setting a Java management extension server, registering at least one Java virtual machine with an MBean resource encapsulating the Java virtual machine management function to the Java management extension server;
访问至少一个 Java虚拟机注册在 Java管理扩展服务器上的 MBean资 源, 以对所述被访问 Mbean资源的 Java虚拟机进行远程管理。  Accessing at least one Java virtual machine to register an MBean resource on the Java Management Extension Server to remotely manage the Java virtual machine of the accessed MBean resource.
一实施例中, 所述将至少一个 Java虚拟机的封装有该 Java虚拟机管理 功能的 MBean资源注册到所述 Java管理扩展服务器之前还包括步驟: 对其中一个 Java虚拟机, 构建其 Java虚拟机工具接口的代理接口, 所 述代理接口提供该 Java虚拟机的全部管理信息; In an embodiment, the at least one Java virtual machine is encapsulated with the Java virtual machine management Before registering the functional MBean resource to the Java management extension server, the method further includes the steps of: constructing a proxy interface of the Java virtual machine tool interface for one of the Java virtual machines, the proxy interface providing all management information of the Java virtual machine;
将所述代理接口封装为具有该 Java虚拟机管理功能的 MBean资源。 一实施例中, 所述对所述被访问 Mbean资源的 Java虚拟机进行远程管 理具体为:  The proxy interface is encapsulated into an MBean resource having the Java virtual machine management function. In an embodiment, the remote management of the Java virtual machine that accesses the MBean resource is specifically:
将注册在 Java管理扩展服务器上的 MBean资源封装成可以供可视化管 理界面调用的接口;  Encapsulating the MBean resource registered on the Java Management Extension Server into an interface that can be called by the visual management interface;
调用所述接口,在可视化界面上显示该 MBean资源对应的 Java虚拟机 的管理信息;  Calling the interface to display management information of the Java virtual machine corresponding to the MBean resource on the visual interface;
远程管理该 Java虚拟机。  Remotely manage the Java virtual machine.
一种监控系统,包括 Java管理扩展服务器、管理模块以及至少一个 Java 虚拟机, 其中,  A monitoring system includes a Java management extension server, a management module, and at least one Java virtual machine, where
每个 Java虚拟机均对应设置有监控代理模块, 所述监控代理模块设置 为将封装有其监控的 Java虚拟机管理功能的 MBean资源注册到 Java管理 扩展服务器; 所述 Java管理扩展服务器, 与监控代理模块连接, 设置为注 册 Java虚拟机管理功能的 MBean资源; 所述管理模块, 与 Java管理扩展 服务器连接, 设置为访问至少一个 Java虚拟机注册在 Java管理扩展服务器 上的 MBean资源, 以对所述被访问 Mbean资源的 Java虚拟机进行远程管 理。  Each Java virtual machine is correspondingly provided with a monitoring agent module, and the monitoring agent module is configured to register an MBean resource encapsulated with its monitored Java virtual machine management function to a Java management extension server; the Java management extension server, and the monitoring a proxy module connection, configured to register an MBean resource of a Java virtual machine management function; the management module, connected to the Java management extension server, configured to access at least one Java virtual machine to register an MBean resource on the Java management extension server, to The Java virtual machine that is accessed by the MBean resource is remotely managed.
一实施例中, 所述监控代理模块还设置为:  In an embodiment, the monitoring agent module is further configured to:
构建其监控的 Java虚拟机的 Java虚拟机工具接口的代理接口, 所述代 理接口提供其监控的 Java虚拟机的全部管理信息;  Constructing a proxy interface of a Java virtual machine tool interface of its monitored Java virtual machine, the proxy interface providing all management information of the Java virtual machine it monitors;
将所述代理接口封装为具有其监控的 Java虚拟机管理功能的 MBean资 源。 一实施例中, 所述 Java管理扩展服务器还包括连接器, 所述管理模块 通过所述连接器访问至少一个 Java虚拟机注册在 Java管理扩展服务器上的 MBean资源。 The proxy interface is encapsulated as an MBean resource with its monitored Java virtual machine management capabilities. In an embodiment, the Java management extension server further includes a connector, and the management module accesses, by the connector, the MBean resource registered by the at least one Java virtual machine on the Java management extension server.
一实施例中, 所述管理模块具体设置为:  In an embodiment, the management module is specifically configured to:
将注册在 Java管理扩展服务器上的 MBean资源封装成可以供可视化管 理界面调用的接口;  Encapsulating the MBean resource registered on the Java Management Extension Server into an interface that can be called by the visual management interface;
调用所述接口,在可视化界面上显示该 MBean资源对应的 Java虚拟机 的管理信息;  Calling the interface to display management information of the Java virtual machine corresponding to the MBean resource on the visual interface;
远程管理该 Java虚拟机。  Remotely manage the Java virtual machine.
一实施例中, 所述管理模块以图形或者表格形式显示被访问 Mbean资 源的 Java虚拟机的管理信息。  In an embodiment, the management module displays the management information of the Java virtual machine accessed by the Mbean resource in a graphical or tabular form.
一种监控代理模块, 包括:  A monitoring agent module, comprising:
注册单元,设置为将封装有其监控的 Java虚拟机管理功能的 MBean资 源注册到 Java管理扩展服务器。  A registration unit that is set up to register an MBean resource encapsulated with its monitored Java virtual machine management capabilities to a Java Management Extension Server.
一实施例中, 所述监控代理模块还包括:  In an embodiment, the monitoring agent module further includes:
构建单元, 设置为构建其监控的 Java虚拟机的 Java虚拟机工具接口的 代理接口, 所述代理接口提供其监控的 Java虚拟机的全部管理信息;  a building unit, configured to build a proxy interface of a Java virtual machine tool interface of the Java virtual machine it monitors, the proxy interface providing all management information of the Java virtual machine it monitors;
封装单元, 设置为将所述代理接口封装为具有其监控的 Java虚拟机管 理功能的 MBean资源。  An encapsulation unit, configured to encapsulate the proxy interface as an MBean resource with its monitored Java virtual machine management capabilities.
与现有技术相比, 本发明通过设置 Java管理扩展服务器, 将至少一个 Java虚拟机的封装有该 Java虚拟机管理功能的 MBean资源注册到所述 Java 管理扩展服务器, 再通过管理模块连接到 Java管理扩展服务器, 访问至少 一个 Java虚拟机注册在 Java管理扩展服务器上的 MBean资源, 以对所述 被访问 Mbean资源的 Java虚拟机进行集中远程管理, 大大减少了管理的成 本。 附图说明 Compared with the prior art, the present invention registers a MBean resource encapsulating the Java virtual machine management function of at least one Java virtual machine to the Java management extension server by setting a Java management extension server, and then connecting to the Java through the management module. The management extension server accesses the MBean resource registered by the at least one Java virtual machine on the Java management extension server to perform centralized remote management of the Java virtual machine of the accessed MBean resource, thereby greatly reducing the management cost. DRAWINGS
图 1为单机监控装置示意图;  Figure 1 is a schematic diagram of a stand-alone monitoring device;
图 2为本发明实施例提供的一种 Java虚拟机的管理方法流程图; 图 3为本发明实施例提供的一种监控系统组成框图;  2 is a flowchart of a method for managing a Java virtual machine according to an embodiment of the present invention; FIG. 3 is a block diagram of a monitoring system according to an embodiment of the present invention;
图 4为本发明实施例提供的一种监控代理模块原理框图。 具体实施方式  FIG. 4 is a schematic block diagram of a monitoring agent module according to an embodiment of the present invention. detailed description
下面通过具体实施方式结合附图对本发明作进一步详细说明。  The present invention will be further described in detail below with reference to the accompanying drawings.
本发明通过设置 Java管理扩展服务器, 将至少一个 Java虚拟机的封装 有该 Java虚拟机管理功能的 MBean ( Managed Bean )资源注册到所述 Java 管理扩展服务器, 再通过管理模块连接到 Java管理扩展服务器, 访问至少 一个 Java虚拟机注册在 Java管理扩展服务器上的 MBean资源, 以对所述 被访问 Mbean资源的 Java虚拟机进行集中远程管理, 减少管理的成本。  The present invention registers a MBean (Mand Bean) resource of at least one Java virtual machine encapsulating the Java virtual machine management function to the Java management extension server by setting a Java management extension server, and then connects to the Java management extension server through the management module. And accessing at least one Java virtual machine to register the MBean resource on the Java management extension server to perform centralized remote management on the Java virtual machine of the accessed MBean resource, thereby reducing management cost.
请参阅图 2所示, 图 2为本发明实施例提供的一种 Java虚拟机的管理 方法流程图, 该流程包括步驟:  Referring to FIG. 2, FIG. 2 is a flowchart of a method for managing a Java virtual machine according to an embodiment of the present invention, where the process includes the following steps:
步驟 201: 构建其中一个 Java虚拟机的 Java虚拟机工具接口 ( JVMTI, Java Virtual Machine Tool Interface )的代理( Agent )接口, 所述代理接口提 供该 Java虚拟机的全部管理信息, 比如需要监控、 操作以及异常需要修正 的信息。  Step 201: Construct a proxy interface of a Java Virtual Machine Tool Interface (JVMTI) of the Java virtual machine, where the proxy interface provides all management information of the Java virtual machine, such as monitoring and operation. And information that the exception needs to be corrected.
Java虚拟机内, JVMTI提供一种编程接口, 允许软件开发人员创建软 件代理以监视和控制 Java编程语言应用程序。通过 JVMTI接口可以使用 C/C++创建代理程序(Agent ) 以监视和控制 JVM和 Java应用程序, 包括 剖析、 调试、 监控、 线程分析、 线程操作、 垃圾回收、 死锁判定等等。  Within the Java Virtual Machine, JVMTI provides a programming interface that allows software developers to create software agents to monitor and control Java programming language applications. Through the JVMTI interface, you can use C/C++ to create agents (Agents) to monitor and control JVM and Java applications, including profiling, debugging, monitoring, thread analysis, thread operations, garbage collection, deadlock decisions, and more.
步驟 202: 将所述代理接口封装为具有该 Java虚拟机的管理功能的 MBean资源。  Step 202: Encapsulate the proxy interface as an MBean resource having a management function of the Java virtual machine.
步驟 203: 设置 Java管理扩展服务器。 步驟 204: 将封装有该 Java虚拟机管理功能的 MBean资源注册到 Java 管理扩展 ( JMX, Java Management Extensions )服务器。 Step 203: Set the Java Management Extension Server. Step 204: Register the MBean resource encapsulated with the Java virtual machine management function to a Java Management Extension (JMX) server.
JMX是一个为应用程序、 设备、 系统等植入管理功能的框架。 JMX可 以跨越一系列异构操作系统平台、 系统体系结构和网络传输协议, 灵活的 开发无缝集成的系统、 网络和服务管理应用。 可以使得 Java应用程序非常 容易地被远程管理。  JMX is a framework for implanting management functions for applications, devices, systems, and more. JMX can flexibly develop seamlessly integrated systems, networks, and service management applications across a range of heterogeneous operating system platforms, system architectures, and network transport protocols. It makes it easy for Java applications to be managed remotely.
步驟 205-206: 访问注册在 Java管理扩展服务器上的 MBean资源, 对 所述被访问 Mbean资源的 Java虚拟机进行远程管理。  Steps 205-206: Accessing the MBean resource registered on the Java management extension server, and remotely managing the Java virtual machine of the accessed MBean resource.
重复上述步驟, 依次对多个 Java虚拟机进行设置, 以实现集中统一管 理。  Repeat the above steps to set up multiple Java virtual machines in order to achieve centralized and unified management.
通过上述方法, 实现了远程管理所有装有监控代理的 JVM, 大大减小 了管理成本。  Through the above method, remote management of all JVMs equipped with monitoring agents is realized, which greatly reduces management costs.
请参阅图 3所示, 图 3本发明实施例提供的一种监控系统组成框图, 包括 Java管理扩展服务器、 管理模块和至少一个 Java虚拟机, 其中, 每个 Java虚拟机均对应设置有监控代理模块, 所述监控代理模块设置为将封装 有其监控的 Java虚拟机管理功能的 MBean资源注册到 Java管理扩展服务 器; 所述 Java管理扩展服务器, 与监控代理模块连接, 设置为注册 Java虚 拟机管理功能的 MBean资源。 Java管理扩展服务器对内它通过 JMX服务 器维护着监控代理模块注册的 MBean 的生命周期 (包括注册和注销 MBean ), 同时为所注册的 MBean提供各类服务,对外通过连接器将已注册 的 MBean的管理接口暴露给外面的管理模块。  Referring to FIG. 3, FIG. 3 is a block diagram of a monitoring system according to an embodiment of the present invention, which includes a Java management extension server, a management module, and at least one Java virtual machine, where each Java virtual machine is correspondingly provided with a monitoring agent. a module, the monitoring agent module configured to register an MBean resource encapsulated with its monitored Java virtual machine management function to a Java management extension server; the Java management extension server, connected to the monitoring agent module, configured to register Java virtual machine management Functional MBean resources. The Java management extension server maintains the lifecycle of the MBean registered by the monitoring agent module (including registering and unregistering MBeans) through the JMX server, and provides various services for the registered MBeans, and externally registers the registered MBeans through the connector. The management interface is exposed to the outside management module.
所述管理模块,与 Java管理扩展服务器连接,设置为访问至少一个 Java 虚拟机注册在 Java 管理扩展服务器上的 MBean 资源, 以对所述被访问 Mbean资源的 Java虚拟机进行远程管理。  The management module is connected to the Java management extension server and configured to access the MBean resource registered by the Java virtual machine on the Java management extension server to remotely manage the Java virtual machine of the accessed MBean resource.
进一步的, 每个监控代理随着其监控的 Java虚拟机的启动而启动, 每 个监控代理模块在将封装有其监控的 Java虚拟机管理功能的 MBean资源注 册到 Java管理扩展服务器之前需要构建其监控的 Java虚拟机的 Java虚拟机 工具接口的代理接口, 所述代理接口提供其监控的 Java虚拟机的全部管理 信息, 然后将所述代理接口封装为具有其监控的 Java虚拟机管理功能的 MBean资源。 所述 Java管理扩展服务器设置有连接器, 所述管理模块通过 所述连接器访问注册在 Java管理扩展服务器上的 MBean资源。所述管理模 块访问 MBean资源时需要先将访问的 MBean资源封装成可供管理模块调用 的接口, 然后管理模块调用所述接口, 以对所述被访问 Mbean资源的 Java 虚拟机进行远程管理。 Further, each monitoring agent is started with the startup of the Java virtual machine it monitors, each The monitoring agent module needs to build a proxy interface of the Java virtual machine tool interface of its monitored Java virtual machine before registering the MBean resource encapsulated with its monitored Java virtual machine management function to the Java management extension server, the proxy interface providing its Monitor all management information for the Java virtual machine and then encapsulate the proxy interface as an MBean resource with its monitored Java virtual machine management capabilities. The Java management extension server is provided with a connector, and the management module accesses the MBean resource registered on the Java management extension server through the connector. When the management module accesses the MBean resource, the accessed MBean resource needs to be encapsulated into an interface that can be called by the management module, and then the management module invokes the interface to remotely manage the Java virtual machine of the accessed MBean resource.
一实施例中, 管理模块可以为一个具有可视化管理界面的集中控制台 , 可视化管理模块将注册在 Java管理扩展服务器上的 MBean资源封装成可以 供可视化管理界面调用的接口; 然后调用所述接口, 在可视化界面上以图 形或者表格形式显示该 MBean资源对应的 Java虚拟机的管理信息,并提供 相应操作按钮, 供用户进行远程管理该 Java虚拟机。  In an embodiment, the management module may be a centralized console with a visual management interface, and the visualization management module encapsulates the MBean resource registered on the Java management extension server into an interface that can be called by the visual management interface; and then invokes the interface. Displaying the management information of the Java virtual machine corresponding to the MBean resource in a graphical or tabular manner on the visual interface, and providing corresponding operation buttons for the user to remotely manage the Java virtual machine.
具体的, 可以通过以下方式实现本发明的监控系统:  Specifically, the monitoring system of the present invention can be implemented in the following manner:
采用 C/C++实现 JVMTI的 Agent接口,该接口提供 JVM全部管理信息。 监控代理模块采用 Java语言通过 JNI技术调用该 Java虚拟机的 Agent接口, 并将 Agent接口封装为具有该 Java虚拟机管理功能的 MBean资源;用户可 以自定义需要管理的 MBean 资源, 供远程管理; 监控代理模块将 MBean 资源注册到 JMX服务器上。 JMX服务器为监控代理模块提供 MBean注册, 并对 MBean资源进行集中管理以及提供各类服务。 JMX服务器向管理模块 提供连接器, 以便其访问注册在该 JMX服务器上的 MBean资源。  The JVMTI Agent interface is implemented in C/C++, which provides all management information of the JVM. The monitoring agent module uses the Java language to call the Agent interface of the Java virtual machine through JNI technology, and encapsulates the Agent interface into an MBean resource with the Java virtual machine management function; the user can customize the MBean resource to be managed for remote management; The proxy module registers the MBean resource on the JMX server. The JMX server provides MBean registration for the monitoring agent module, and centrally manages MBean resources and provides various services. The JMX server provides a connector to the management module to access the MBean resources registered on the JMX server.
请参阅图 4所示, 根据上述方法和系统, 本发明实施例还提供了一种 监控代理模块, 所述监控代理模块与 Java虚拟机连接, 其具体包括:  Referring to FIG. 4, according to the foregoing method and system, an embodiment of the present invention further provides a monitoring agent module, where the monitoring agent module is connected to a Java virtual machine, and specifically includes:
注册单元,设置为将封装有其监控的 Java虚拟机管理功能的 MBean资 源注册到 Java管理扩展服务器。 Registration unit, set to MBean with the Java virtual machine management function that will be encapsulated with its monitoring The source is registered to the Java Management Extension Server.
进一步的, 所述监控代理模块还包括:  Further, the monitoring agent module further includes:
构建单元, 设置为构建其监控的 Java虚拟机的 Java虚拟机工具接口的 代理接口, 所述代理接口提供其监控的 Java虚拟机的全部管理信息;  a building unit, configured to build a proxy interface of a Java virtual machine tool interface of the Java virtual machine it monitors, the proxy interface providing all management information of the Java virtual machine it monitors;
封装单元, 设置为将所述代理接口封装为具有其监控的 Java虚拟机管 理功能的 MBean资源。  An encapsulation unit, configured to encapsulate the proxy interface as an MBean resource with its monitored Java virtual machine management capabilities.
本实施例中, 对每个 Java虚拟机都对应设置有监控代理模块, 每个监 控代理模块将封装有其监控的 Java虚拟机管理功能的 MBean资源注册到 Java管理扩展服务器, 以便管理模块进行集中远程管理。 能认定本发明的具体实施只局限于这些说明。 对于本发明所属技术领域的 普通技术人员来说, 在不脱离本发明构思的前提下, 还可以做出若干简单 推演或替换, 都应当视为属于本发明的保护范围。  In this embodiment, a monitoring agent module is disposed correspondingly for each Java virtual machine, and each monitoring agent module registers the MBean resource encapsulated with the monitored Java virtual machine management function to the Java management extension server, so that the management module performs centralized Remote management. It is to be understood that the specific embodiments of the invention are limited only by the description. It is to be understood by those skilled in the art that the present invention may be practiced without departing from the spirit and scope of the invention.

Claims

1、 一种 Java虚拟机的管理方法, 其中, 该方法包括: A method for managing a Java virtual machine, wherein the method comprises:
设置 Java管理扩展服务器, 将至少一个 Java虚拟机的封装有该 Java 虚拟机管理功能的 MBean资源注册到所述 Java管理扩展服务器;  Setting a Java management extension server, registering at least one Java virtual machine with an MBean resource encapsulating the Java virtual machine management function to the Java management extension server;
访问至少一个 Java虚拟机注册在 Java管理扩展服务器上的 MBean资 源, 以对所述被访问 Mbean资源的 Java虚拟机进行远程管理。  Accessing at least one Java virtual machine to register an MBean resource on the Java Management Extension Server to remotely manage the Java virtual machine of the accessed MBean resource.
2、 如权利要求 1所述的方法, 其中, 所述将至少一个 Java虚拟机的封 装有该 Java虚拟机管理功能的 MBean资源注册到所述 Java管理扩展服务 器之前, 该方法还包括:  2. The method of claim 1, wherein before the registering the MBean resource of the at least one Java virtual machine that encapsulates the Java virtual machine management function to the Java management extension server, the method further comprises:
对其中一个 Java虚拟机, 构建其 Java虚拟机工具接口的代理接口, 所 述代理接口提供该 Java虚拟机的全部管理信息;  For one of the Java virtual machines, construct a proxy interface of its Java virtual machine tool interface, and the proxy interface provides all management information of the Java virtual machine;
将所述代理接口封装为具有该 Java虚拟机管理功能的 MBean资源。 The proxy interface is encapsulated into an MBean resource having the Java virtual machine management function.
3、 如权利要求 2所述的方法, 其中, 所述对所述被访问 Mbean资源的 Java虚拟机进行远程管理为: 3. The method according to claim 2, wherein the remote management of the Java virtual machine of the accessed MBean resource is:
将注册在 Java管理扩展服务器上的该 Java虚拟机的 MBean资源封装 成可以供可视化管理界面调用的接口;  Encapsulating the MBean resource of the Java virtual machine registered on the Java management extension server into an interface that can be called by the visual management interface;
调用所述接口, 在可视化界面上显示该 Java虚拟机的管理信息; 远程管理该 Java虚拟机。  Calling the interface, displaying the management information of the Java virtual machine on the visual interface; remotely managing the Java virtual machine.
4、 一种监控系统, 其中, 该监控系统包括: Java管理扩展服务器、 管 理模块以及至少一个 Java虚拟机, 其中,  4. A monitoring system, wherein the monitoring system comprises: a Java management extension server, a management module, and at least one Java virtual machine, wherein
每个 Java虚拟机均对应设置有监控代理模块, 所述监控代理模块设置 为将封装有其监控的 Java虚拟机管理功能的 MBean资源注册到 Java管理 扩展服务器;  Each Java virtual machine is correspondingly provided with a monitoring agent module, and the monitoring agent module is configured to register an MBean resource encapsulated with its monitored Java virtual machine management function to a Java management extension server;
所述 Java管理扩展服务器, 与监控代理模块连接, 设置为注册 Java虚 拟机管理功能的 MBean资源; 所述管理模块,与 Java管理扩展服务器连接,设置为访问至少一个 Java 虚拟机注册在 Java 管理扩展服务器上的 MBean 资源, 以对所述被访问 Mbean资源的 Java虚拟机进行远程管理。 The Java management extension server is connected to the monitoring agent module and configured to register the MBean resource of the Java virtual machine management function; The management module is connected to the Java management extension server and configured to access the MBean resource registered by the Java virtual machine on the Java management extension server to remotely manage the Java virtual machine of the accessed MBean resource.
5、 根据权利要求 4所述的监控系统, 其中,  5. The monitoring system according to claim 4, wherein
所述监控代理模块, 还设置为构建其监控的 Java虚拟机的 Java虚拟机 工具接口的代理接口, 所述代理接口提供其监控的 Java虚拟机的全部管理 信息; 将所述代理接口封装为具有 Java虚拟机管理功能的 MBean资源。  The monitoring agent module is further configured to build a proxy interface of a Java virtual machine tool interface of the Java virtual machine it monitors, the proxy interface providing all management information of the Java virtual machine it monitors; encapsulating the proxy interface to have MBean resource for Java virtual machine management functions.
6、 根据权利要求 4所述的监控系统, 其中, 所述 Java管理扩展服务器 还包括连接器,  6. The monitoring system according to claim 4, wherein the Java management extension server further comprises a connector,
所述管理模块, 具体设置为通过所述连接器访问至少一个 Java虚拟机 注册在 Java管理扩展服务器上的 MBean资源。  The management module is specifically configured to access, by using the connector, an MBean resource registered by the Java management extension server by at least one Java virtual machine.
7、 根据权利要求 5所述的监控系统, 其中,  7. The monitoring system according to claim 5, wherein
所述管理模块, 具体设置为将注册在 Java管理扩展服务器上的 MBean 资源封装成可以供可视化管理界面调用的接口; 调用所述接口, 在可视化 界面上显示该 MBean资源对应的 Java虚拟机的管理信息;远程管理该 Java 虚拟机。  The management module is specifically configured to encapsulate the MBean resource registered on the Java management extension server into an interface that can be invoked by the visual management interface; invoke the interface to display the management of the Java virtual machine corresponding to the MBean resource on the visual interface. Information; remotely manage the Java virtual machine.
8、 根据权利要求 4至 7任一项所述的监控系统, 其中, 所述管理模块 以图形或者表格形式显示被访问 Mbean资源的 Java虚拟机的管理信息。  The monitoring system according to any one of claims 4 to 7, wherein the management module displays the management information of the Java virtual machine of the accessed Mbean resource in a graphical or tabular form.
9、 一种监控代理模块, 其中, 该监控代理模块包括:  9. A monitoring agent module, wherein the monitoring agent module comprises:
注册单元,设置为将封装有其监控的 Java虚拟机管理功能的 MBean资 源注册到 Java管理扩展服务器。  A registration unit that is set up to register an MBean resource encapsulated with its monitored Java virtual machine management capabilities to a Java Management Extension Server.
10、 根据权利要求 9所述的监控代理模块, 其中, 该监控代理模块还 包括:  The monitoring agent module according to claim 9, wherein the monitoring agent module further comprises:
构建单元, 设置为构建其监控的 Java虚拟机的 Java虚拟机工具接口的 代理接口, 所述代理接口提供其监控的 Java虚拟机的全部管理信息; 封装单元, 设置为将所述代理接口封装为具有其监控的 Java虚拟机管 理功能的 MBean资源。 a building unit, configured to build a proxy interface of a Java virtual machine tool interface of its monitored Java virtual machine, the proxy interface providing all management information of the Java virtual machine it monitors; An encapsulation unit, configured to encapsulate the proxy interface as an MBean resource with its monitored Java virtual machine management functionality.
PCT/CN2012/072641 2011-05-06 2012-03-20 Management method, monitoring system and monitoring agent module for java virtual machine WO2012152127A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2011101170275A CN102184120A (en) 2011-05-06 2011-05-06 Management method, monitoring system and monitoring agent module for Java virtual machine
CN201110117027.5 2011-05-06

Publications (1)

Publication Number Publication Date
WO2012152127A1 true WO2012152127A1 (en) 2012-11-15

Family

ID=44570301

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/072641 WO2012152127A1 (en) 2011-05-06 2012-03-20 Management method, monitoring system and monitoring agent module for java virtual machine

Country Status (2)

Country Link
CN (1) CN102184120A (en)
WO (1) WO2012152127A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102184120A (en) * 2011-05-06 2011-09-14 中兴通讯股份有限公司 Management method, monitoring system and monitoring agent module for Java virtual machine
CN103457945A (en) * 2013-08-28 2013-12-18 中国科学院信息工程研究所 Intrusion detection method and system
US10394531B2 (en) * 2017-04-29 2019-08-27 Cisco Technology, Inc. Hyper dynamic Java management extension
CN109327335A (en) * 2018-10-07 2019-02-12 杭州安恒信息技术股份有限公司 A kind of cloud monitoring solution system and method
CN110471742B (en) * 2019-08-15 2022-03-29 中国银行股份有限公司 Java object monitoring management system and method under distributed environment
CN113176913B (en) * 2021-05-25 2023-03-24 深圳前海微众银行股份有限公司 Processing method and device of JAVA agent, terminal equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7512953B1 (en) * 2004-08-31 2009-03-31 Sap Ag System and method for smart proxy creation and management within a distributed object-oriented architecture
CN101847116A (en) * 2010-05-05 2010-09-29 中兴通讯股份有限公司 Monitoring system based on J2EE framework and method
CN102184120A (en) * 2011-05-06 2011-09-14 中兴通讯股份有限公司 Management method, monitoring system and monitoring agent module for Java virtual machine

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7512953B1 (en) * 2004-08-31 2009-03-31 Sap Ag System and method for smart proxy creation and management within a distributed object-oriented architecture
CN101847116A (en) * 2010-05-05 2010-09-29 中兴通讯股份有限公司 Monitoring system based on J2EE framework and method
CN102184120A (en) * 2011-05-06 2011-09-14 中兴通讯股份有限公司 Management method, monitoring system and monitoring agent module for Java virtual machine

Also Published As

Publication number Publication date
CN102184120A (en) 2011-09-14

Similar Documents

Publication Publication Date Title
US20220046076A1 (en) Method And System For Real-Time Modeling Of Communication, Virtualization And Transaction Execution Related Topological Aspects Of Monitored Software Applications And Hardware Entities
WO2012152127A1 (en) Management method, monitoring system and monitoring agent module for java virtual machine
CN101799751B (en) Method for building monitoring agent software of host machine
US7216160B2 (en) Server-based application monitoring through collection of application component and environmental statistics
US8150960B2 (en) Event forwarding
CN101605056B (en) J2EE server monitoring device and monitoring method employing same
US8010973B2 (en) Class loader for managing a network
CN102694866B (en) Service request broker system in distributed network environment
US20160344846A1 (en) Inter-process communication method based on application layer of android and basic application communication system
CN104579792A (en) Architecture and method for achieving centralized management of various types of virtual resources based on multiple adaptive modes
US20040230973A1 (en) Mechanism to provide adminstrative control in a multi-process application server
CN105138398A (en) SOCKET communication and process management common platform and method under synchronous communication mode
CN102497453A (en) Calling device and calling method for remote programs
CN105357273A (en) Universal SOCKET communication and process management platform and method in asynchronous communication mode
WO2017113457A1 (en) Light-weight embedded network management system and method
CN113791758B (en) Service arrangement localization execution system and method thereof
US11182131B2 (en) System and method that support production management
JP5264837B2 (en) Remote plug-in device, robot plug-in execution engine device, and robot plug-in execution system
JP2010146551A (en) Method port arrangement and configuration method thereof for robot software component
JP5550731B2 (en) A device that mediates between network operators and developers
CN106453686A (en) Connecting method and connecting device for JMX (Java Management Extensions) client
CN111459534A (en) Application system architecture of energy information gateway
Lovas et al. Debugging of metacomputing applications
CN112328443A (en) System service monitoring method, monitoring system and electronic equipment
JP2006127399A (en) Application platform provision system, method, and program for it

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12782586

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12782586

Country of ref document: EP

Kind code of ref document: A1