[go: up one dir, main page]

CN101021800A - Virtual machine monitoring - Google Patents

Virtual machine monitoring Download PDF

Info

Publication number
CN101021800A
CN101021800A CN 200610004392 CN200610004392A CN101021800A CN 101021800 A CN101021800 A CN 101021800A CN 200610004392 CN200610004392 CN 200610004392 CN 200610004392 A CN200610004392 A CN 200610004392A CN 101021800 A CN101021800 A CN 101021800A
Authority
CN
China
Prior art keywords
state information
program
machine
internal
monitor
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN 200610004392
Other languages
Chinese (zh)
Inventor
简·多斯特尔特
弗兰克·基利安
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SAP SE
Original Assignee
SAP SE
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 SAP SE filed Critical SAP SE
Priority to CN 200610004392 priority Critical patent/CN101021800A/en
Publication of CN101021800A publication Critical patent/CN101021800A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention relates to a system and method for monitoring the internal operation of a virtual machine ('VM'). VM is operated to interpret and implement a procedure. The internal operation of state information is stored to the internal memory buffer during VM operating period. Subsequently, the above information is extracted from the internal VM operation at a favorable external position.

Description

虚拟机监控virtual machine monitoring

技术领域technical field

本发明涉及一般涉及虚拟机(virtual machines),并且特别、但不唯一地涉及监控虚拟机的内部操作。The present invention relates generally to virtual machines, and in particular, but not exclusively, to monitoring the internal operations of virtual machines.

背景技术Background technique

企业软件已经或多或少地改变了各种各样的企业处理和管理日常工作的方式。商家利用企业软件(例如,基于网络的应用服务器)来控制生产计划、采购与后勤、仓库和存货管理、生产、供应商管理、客户服务、财务、人事管理、以及其它的基础商业活动。随着企业软件工业的继续成熟,为了便利这种各种各样的任务的集合而利用到的多种应用软件和硬件资源被合并为坚固的(robust)、高度集成的解决方案(例如,SAP NetWeaver、SAP xAPPs、mySAP Business Suite等)。Enterprise software has more or less changed the way businesses of all kinds approach and manage their day-to-day work. Merchants utilize enterprise software (eg, web-based application servers) to control production planning, purchasing and logistics, warehouse and inventory management, production, supplier management, customer service, accounting, personnel management, and other basic business activities. As the enterprise software industry continues to mature, the multiple application software and hardware resources utilized to facilitate this diverse collection of tasks are consolidated into robust, highly integrated solutions (e.g., SAP NetWeaver, SAP xAPPs, mySAP Business Suite, etc.).

为了集成各种各样的硬件和软件资源,企业软件的开发者们具有能够最小化甚至切断企业解决方案对服务平台的依赖性的起杆杠平衡作用的(leveraged)跨平台引擎。Java 2平台,Enterprise Edition TM(企业版)(“J2EE”)(例如,J2EE规范,版本1.4)是一种得到Java Virtual Machine(“JVM”,Java虚拟机)引擎支持的基于Java的解决方案。J2EE简化了应用开发,并通过创建标准化和可重复利用的模块部件,降低了对编程和程序员训练的需要。基于Java的解决方案的受欢迎程度非常明显,就好像信息技术(“IT”)世界受Java语言的吸引一样。In order to integrate various hardware and software resources, developers of enterprise software have leveraged cross-platform engines that can minimize or even cut off the dependence of enterprise solutions on service platforms. The Java 2 Platform, Enterprise Edition ("J2EE") (eg, J2EE Specification, Version 1.4) is a Java-based solution powered by the Java Virtual Machine ("JVM") engine. J2EE simplifies application development and reduces the need for programming and programmer training by creating standardized and reusable modular components. The popularity of Java-based solutions is evident, as is the information technology ("IT") world's attraction to the Java language.

随着企业软件被编入现代商业的构件中,企业解决方案的故障就不再仅仅是一种令人讨厌的损害,而是可能会导致对商业的灾难性的严重破坏。因此,坚固的、可靠的软件始终是关键性的。企业软件工业正在步向能够维持、不间断操作而不需要人工干涉的自我修复软件的最终目标。为了达成这一目标,IT技术人员们可以得益于能够监控他们的企业软件的健康状况(health)的传统工具。利用适当的监控工具,IT技术人员可以适时采取行动来保证他们的软件的健康状态,或者发现出错的应用程序以防止重复犯错。当前,JVM并没有提供足够的机制来实时地监控它们的内部操作。As enterprise software is woven into the fabric of modern business, the failure of an enterprise solution is no longer just a nuisance, but can cause catastrophic disruption to the business. Therefore, solid, reliable software is always critical. The enterprise software industry is moving toward the ultimate goal of self-healing software capable of sustaining, uninterrupted operation without human intervention. To achieve this goal, IT technicians can benefit from traditional tools that can monitor the health of their enterprise software. With the proper monitoring tools in place, IT technicians can take timely action to ensure the health of their software, or spot erroneous applications to prevent repeat mistakes. Currently, JVMs do not provide sufficient mechanisms to monitor their internal operations in real time.

发明内容Contents of the invention

描述了一种监控虚拟机(“VM”)的内部操作的系统和方法。VM被操作以解释和执行一个程序。在VM的操作期间,关于VM的内部操作的状态信息被存储在内部存储缓冲器中。随后,在VM的操作期间从内部存储缓冲器抽取(extract)所述状态信息,以便从VM的外部有利位置监控VM的操作。A system and method of monitoring internal operations of a virtual machine ("VM") is described. VM is operated to interpret and execute a program. During operation of the VM, state information about the internal operation of the VM is stored in an internal memory buffer. The state information is then extracted from an internal memory buffer during operation of the VM in order to monitor the operation of the VM from a vantage point external to the VM.

在一个实施例中,通过执行嵌入程序中的监控代码来积累状态信息。所述监控代码的执行可以与所述程序的程序代码的执行交织进行。In one embodiment, status information is accumulated by executing monitoring code embedded in the program. The execution of the monitoring code may be interleaved with the execution of the program code of the program.

在程序的执行期间,创建对象并存储到堆(heap)。当程序不再参考这些对象时,一个自动垃圾收集器(garbage collector)擦除不被参考的对象。在一个实施例中,状态信息包括垃圾收集活动信息。During program execution, objects are created and stored on the heap. An automatic garbage collector (garbage collector) erases unreferenced objects when the program no longer references them. In one embodiment, the state information includes garbage collection activity information.

在一个实施例中,本机VM监控器(monitor)被调用,从内部存储缓冲器中检索状态信息。检索的状态信息可以随后被传送给监控台(monitoringconsole),以便显示在监控台上。In one embodiment, a native VM monitor is invoked to retrieve status information from an internal memory buffer. The retrieved status information may then be communicated to a monitoring console for display on the monitoring console.

在一个实施例中,VM监控程序被在VM上解释和执行。VM监控程序专用于搜集来自VM的部件的至少一部分状态信息,并将所述一部分状态信息存储到内部存储缓冲器。In one embodiment, a VM monitor is interpreted and executed on a VM. The VM monitor program is dedicated to collecting at least a portion of state information from components of the VM and storing the portion of state information to an internal memory buffer.

在一个实施例中,内部存储缓冲器与VM的故障相隔离。如果VM发生故障,内部存储缓冲器可以在发生故障之后被访问,以便对VM故障的原因进行事后调查。In one embodiment, internal memory buffers are isolated from VM failures. If a VM fails, the internal storage buffers can be accessed after the failure for postmortem investigation into the cause of the VM failure.

本发明的实施例可以包括全部或某些上述特征。上述特征可以通过计算机程序、方法、系统或装置、或者任何计算机程序、方法或系统的组合来实施。本发明的一个或多个实施例的这些以及其它细节将在附图以及下面的描述中进行阐述。Embodiments of the invention may include all or some of the features described above. The above features can be implemented by computer programs, methods, systems or devices, or any combination of computer programs, methods or systems. These and other details of one or more embodiments of the invention are set forth in the accompanying drawings and the description below.

附图说明Description of drawings

本发明的非限定性的和非穷举性的实施例将参考下列附图进行描述,其中,除非特意说明,在各个附图中相同的附图标号总是指代相同的部分。Non-limiting and non-exhaustive embodiments of the present invention will be described with reference to the following drawings, wherein like reference numerals refer to like parts throughout the various drawings unless otherwise indicated.

图1是根据本发明的一个实施例的用于监控虚拟机(“VM”)的内部操作的系统的框图。1 is a block diagram of a system for monitoring internal operations of a virtual machine ("VM") according to one embodiment of the present invention.

图2是说明根据本发明的一个实施例的软件系统的框图,该软件系统包括能够提供内部状态信息给外部实体的VM,用于对VM进行监控。2 is a block diagram illustrating a software system including a VM capable of providing internal state information to an external entity for monitoring the VM, according to one embodiment of the present invention.

图3是说明根据本发明的一个实施例的用于监控VM的内部操作的处理的流程图。3 is a flow diagram illustrating a process for monitoring the internal operations of a VM according to one embodiment of the invention.

图4是说明用于实施本发明的一个实施例的演示企业环境的框图。Figure 4 is a block diagram illustrating a demo enterprise environment for implementing one embodiment of the present invention.

图5说明了用于实施本发明的一个实施例的演示处理系统。Figure 5 illustrates a demonstration processing system for implementing one embodiment of the present invention.

具体实施方式Detailed ways

这里描述用于监控虚拟机(“VM”)的内部操作的系统和方法的实施例。图1是根据本发明的实施例的虚拟机(“VM”)105的内部操作的系统100的框图。所说明的系统100的实施例包括VM 105、程序110、以及监控台115。虽然只示出了三个程序110操作在VM 105上,但是更多或更少的程序110可以以时分复用的方式同时运行。Embodiments of systems and methods for monitoring the internal operations of a virtual machine ("VM") are described herein. 1 is a block diagram of a system 100 of the internal operations of a virtual machine ("VM") 105 in accordance with an embodiment of the present invention. The illustrated embodiment of system 100 includes VM 105, program 110, and monitoring station 115. Although only three programs 110 are shown operating on VM 105, more or fewer programs 110 may run concurrently in a time-division multiplexed manner.

VM 105解释并执行一个或多个程序110以生成输出结果120。VM 105通过将程序从中间解释(intermediate interpreted)语言(例如,字节码)转换为随后被执行的本机机器语言(native machine language)来解释程序110。在一个实施例中,VM 105是Java VM(“JVM”),而程序110表示编译为Java字节码的Java程序。虽然本发明的实施例是利用面向对象的Java编程语言来描述的,但是这里所描述的技术也可以等效地应用到其它解释语言,以及用于解释和执行这些语言的VM。VM 105 interprets and executes one or more programs 110 to generate output 120. VM 105 interprets program 110 by converting the program from an intermediate interpreted language (eg, bytecode) into a native machine language which is then executed. In one embodiment, VM 105 is a Java VM ("JVM"), and program 110 represents a Java program compiled to Java bytecode. Although embodiments of the present invention are described using the object-oriented Java programming language, the techniques described here are equally applicable to other interpreted languages, and VMs for interpreting and executing those languages.

在VM 105的操作期间,VM 105可以提供实时状态信息125给监控台115用于在其上显示。状态信息125可以提供在解释和执行程序110期间VM105的内部工作的详细操作信息。信息技术(“IT”)技术人员可以直接地浏览显示在监控台115上的状态信息125,以确定VM 105是否操作在健康状态,是否将要发生故障,以及其它方面。而且,状态信息125可以在VM 105故障/崩溃之后被访问,以便对故障原因进行事后调查。During operation of VM 105, VM 105 may provide real-time status information 125 to monitoring station 115 for display thereon. State information 125 may provide detailed operational information of the internal workings of VM 105 during interpretation and execution of program 110 . An information technology ("IT") technician can directly browse the status information 125 displayed on the monitoring console 115 to determine whether the VM 105 is operating in a healthy state, is about to fail, and other aspects. Also, state information 125 can be accessed after a VM 105 failure/crash for postmortem investigation into the cause of the failure.

状态信息125可以响应于监控台115发出的状态问询130被“拖”(pull)到监控台115,或者状态信息125可以被“推”(push)到监控台115。将状态信息125推到监控台115可以是事件触发的或是周期性触发的。监控台115可以在本地位于执行VM 105的相同硬件机器上,或者有利地在与之通信地耦合的远程机器上执行。状态信息125可以包括各种数据,包括但不局限于,垃圾收集活动、堆状态、执行活动、线程活动、程序活动等。The status information 125 may be “pull” to the monitoring station 115 in response to a status query 130 issued by the monitoring station 115 , or the status information 125 may be “pushed” to the monitoring station 115 . Pushing status information 125 to monitoring station 115 may be event triggered or periodically triggered. The monitoring station 115 may be located locally on the same hardware machine that executes the VM 105, or advantageously executes on a remote machine communicatively coupled thereto. Status information 125 may include various data including, but not limited to, garbage collection activity, heap status, execution activity, thread activity, program activity, and the like.

图2是说明根据本发明的一个实施例的软件系统200的框图,该软件系统200包括能够提供状态信息125给外部实体的VM 105,用于对VM 105的内部操作进行监控。所说明的软件系统200的实施例包括操作系统205(例如,Windows、Linux、Unix、MS-DOS、OS/400、OS/390等)、本机包装程序(native wrapper)210、VM 105、以及本机VM监控器215。2 is a block diagram illustrating a software system 200 including a VM 105 capable of providing status information 125 to an external entity for monitoring the internal operation of the VM 105, according to one embodiment of the present invention. The illustrated embodiment of the software system 200 includes an operating system 205 (e.g., Windows, Linux, Unix, MS-DOS, OS/400, OS/390, etc.), a native wrapper 210, a VM 105, and Native VM Monitor 215 .

本机包装程序210提供VM 105的运行时间环境。在VM 105是符合Java2平台、Enterprise EditionTM(“J2EE”)(例如,J2EE规范,版本1.4)的JVM的实施例中,本机包装程序210通常被称为“JLaunch”。本机包装程序210是由OS 205执行和管理的本机机器代码(例如,编译的C++)。当启动时,本机包装程序210在其内部建立VM 105。Native wrapper 210 provides a runtime environment for VM 105 . In embodiments where VM 105 is a Java2 Platform, Enterprise Edition ("J2EE") compliant JVM (eg, J2EE Specification, Version 1.4), native wrapper 210 is commonly referred to as "JLaunch." Native wrapper 210 is native machine code (eg, compiled C++) executed and managed by OS 205 . When started, native wrapper 210 creates VM 105 within itself.

在操作期间,所说明的VM 105的实施例包括内部存储缓冲器220、内部应用编程接口(“API”)225、本机API 230、堆235、堆管理器237、垃圾收集器240、输入/输出(“I/O”)系统243、以及维护与由VM 105当前执行的各个任务(例如,程序110、垃圾收集器240等)相关联的信息的多个线程245。线程245没有被示出在图2的所有可执行实体中,以便使图2看上去不显拥挤,不使发明变得模糊。内部存储缓冲器220被VM 105用来存储在VM 105操作期间从VM 105的各个内部部件收集的状态信息125。内部API 225提供了VM 105的各个内部部件对内部存储缓冲器220的访问。在VM 105是JVM的实施例中,内部API 225被称为“Java API”。本机API 230提供VM 105外部的实体对内部存储缓冲器220的访问,从而提供了对状态信息125的访问,以便从外部有利位置监控VM 105的内部操作。本机API 230使能(enable)本机机器代码实体,诸如本机VM监控器215来访问内部存储缓冲器220,而不需要在VM 105自身上被解释和执行。虽然图2说明了本机VM监控器215在本机包装程序210的内部,但是在一些实施例中,本机VM监控器215也可以在本机包装程序210的外部。During operation, the illustrated embodiment of VM 105 includes internal storage buffer 220, internal application programming interface ("API") 225, native API 230, heap 235, heap manager 237, garbage collector 240, input/ An output ("I/O") system 243, and a number of threads 245 that maintain information associated with various tasks currently being executed by VM 105 (eg, programs 110, garbage collector 240, etc.). Thread 245 is not shown in all executable entities of FIG. 2 in order to make FIG. 2 appear less crowded and not to obscure the invention. Internal storage buffer 220 is used by VM 105 to store state information 125 collected from various internal components of VM 105 during operation of VM 105. Internal API 225 provides access to internal storage buffer 220 by various internal components of VM 105. In embodiments where VM 105 is a JVM, internal API 225 is referred to as the "Java API". Native API 230 provides entities external to VM 105 access to internal memory buffer 220, thereby providing access to status information 125 for monitoring the internal operation of VM 105 from an external vantage point. Native API 230 enables native machine code entities, such as native VM monitor 215, to access internal memory buffer 220 without being interpreted and executed on VM 105 itself. Although FIG. 2 illustrates that the native VM monitor 215 is internal to the native wrapper 210 , in some embodiments the native VM monitor 215 may also be external to the native wrapper 210 .

堆235被VM 105作为预留存储器池建立,以便将来在程序110和VM监控程序250(下面详细讨论)被装入时由这些程序使用。堆235由VM 105的堆管理器237管理,用于在程序110请求时分配和解除分配存储器,以及用于存储由程序110(或者VM监控程序250)创建的对象255。Heap 235 is established by VM 105 as a pool of reserved memory for future use by programs 110 and VM monitor program 250 (discussed in detail below) as they are loaded. The heap 235 is managed by the heap manager 237 of the VM 105 for allocating and deallocating memory when requested by the program 110, and for storing objects 255 created by the program 110 (or the VM monitor program 250).

在程序110是面向对象的程序(例如,Java程序)的实施例中,它们一般包括对象和类。当程序110被VM 105装载并执行时,对象255被创建,然后存储到堆235。类包括执行任务并在它们完成那些任务时返回信息的方法。对象实质上是在特性和行为方面模拟了软件程序的片段(pieces)的可重复使用的软件部分。类被用来例示具有这些特性和行为的对象。换句话说,每个对象255都从例示(例如,创建)特定对象255的类继承它们的特性和行为。In embodiments where programs 110 are object-oriented programs (eg, Java programs), they generally include objects and classes. When program 110 is loaded and executed by VM 105, object 255 is created and then stored to heap 235. Classes include methods that perform tasks and return information when they complete those tasks. Objects are essentially reusable software parts that simulate pieces of a software program in terms of characteristics and behavior. Classes are used to instantiate objects with these properties and behaviors. In other words, each object 255 inherits their properties and behavior from the class that instantiated (eg, created) the particular object 255 .

随着程序110通过向堆235添入对象255来消耗堆235,在堆235中可接受新对象的存储器会变得缺乏。因此,垃圾收集器240实施一种有规则(disciplined)的程序,用于将消耗的存储器返回到堆235。在一个实施例中,垃圾收集器240被VM 105自动执行,以回收动态分配的存储器,而不需要程序110的程序员的明确指令来执行。当对堆235中的一个对象255不再有参考时,特定对象255被标记进行垃圾收集。然后,当执行垃圾收集器240时,回收被标记的对象255消耗的存储器。当堆235中的可用存储器变得缺乏时,通过有规则地执行垃圾收集可以帮助避免资源泄漏。As program 110 consumes heap 235 by adding objects 255 to heap 235, memory in heap 235 that can accept new objects may become scarce. Thus, the garbage collector 240 implements a disciplined procedure for returning consumed memory to the heap 235 . In one embodiment, the garbage collector 240 is executed automatically by the VM 105 to reclaim dynamically allocated memory without requiring explicit instructions from the programmer of the program 110 to execute. When there are no longer references to an object 255 in the heap 235, the particular object 255 is marked for garbage collection. Then, when the garbage collector 240 executes, the memory consumed by the marked objects 255 is reclaimed. Regularly performing garbage collection can help avoid resource leaks when available memory in the heap 235 becomes scarce.

然而,当堆235中的可用存储器变得缺乏时,由于垃圾收集活动,VM 105的性能会受到损害。例如,如果堆235超过了80%的容量,垃圾收集器240的垃圾收集活动会导致VM 105的能产生的计算输出(例如,输出结果120,参见图1)被压缩到几乎中止。虽然垃圾收集器240在删除未被参考的对象255以回收消耗的存储器方面做得相对很好,但是由于各种原因,并不是所有空闲的对象255都被回收了。因此,越陈旧的(older)VM 105越可能在漫长的垃圾收集活动中受到损害。However, when available memory in the heap 235 becomes scarce, the performance of the VM 105 can suffer due to garbage collection activity. For example, if the heap 235 exceeds 80% capacity, the garbage collection activity of the garbage collector 240 can cause the computational output (eg, output 120 , see FIG. 1 ) that the VM 105 can produce to be compacted to a near halt. While the garbage collector 240 does a relatively good job of removing unreferenced objects 255 to reclaim consumed memory, not all free objects 255 are reclaimed for various reasons. Therefore, the older (older) VM 105 is more likely to be damaged during a lengthy garbage collection event.

在一个实施例中,VM 105的各个实体被“装配”(instrumented)了监控代码,以便积累/生成至少一部分状态信息125,并将所述一部分状态信息复制到内部存储缓冲器220。监控代码的执行可以与实体的常规程序代码的执行交织进行。被监控代码积累/生成的一部分状态信息125可以包括每个实体的处理开始和停止的时间、执行实体的每个线程245的处理运行时间、由特定实体创建的对象255的数量、实体消耗的存储器的量,等等。每个实体被装配来积累和/或生成与特定实体的操作和执行相关的各种状态信息125。这些实体可以包括垃圾收集器240、堆管理器237、I/O系统243等。装配在这些实体中的每一个的监控代码具有以下目的:收集VM 105中可得到的大量状态信息的至少一部分,并且将其报告给内部存储缓冲器220。In one embodiment, various entities of VM 105 are "instrumented" with monitoring code to accumulate/generate at least a portion of state information 125 and copy the portion of state information to internal memory buffer 220. Execution of the monitoring code may be interleaved with execution of the entity's regular program code. A portion of the state information 125 accumulated/generated by the monitored code may include when processing for each entity started and stopped, processing elapsed time for each thread 245 executing the entity, number of objects 255 created by a particular entity, memory consumed by the entity amount, and so on. Each entity is equipped to accumulate and/or generate various state information 125 related to the operation and execution of the particular entity. These entities may include garbage collector 240, heap manager 237, I/O system 243, and the like. The monitoring code installed in each of these entities has the purpose of collecting at least a portion of the vast amount of state information available in VM 105 and reporting it to internal memory buffer 220.

在一个实施例中,垃圾收集器240被装配有监控代码265,以积累/生成至少一部分状态信息125,并将所述一部分状态信息125复制到内部存储缓冲器220。监控代码265的执行可以与垃圾收集器240的常规垃圾收集活动的执行交织进行。在一个实施例中,响应于垃圾收集事件来执行监控代码265。由监控代码265积累/生成的一部分状态信息125包括多种垃圾收集相关信息。这种垃圾收集相关信息可以包括:由垃圾收集器240执行的垃圾收集事件的时间戳和运行时间、垃圾收集事件的计数、在每个垃圾收集事件期间从堆235收集的对象255的数量的计数、在每个垃圾收集事件期间在堆235中回收的存储器的量、堆235中可用的存储器的量、请求者(例如,程序员110)在堆235中的对象255的命中率、堆235的利用率等。而且,监控代码265可以在内部存储缓冲器220中保存最近垃圾收集事件的历史,并将每个垃圾收集事件编入一些或全部上述垃圾收集相关信息的索引。In one embodiment, garbage collector 240 is equipped with monitoring code 265 to accumulate/generate at least a portion of state information 125 and copy the portion of state information 125 to internal storage buffer 220 . Execution of monitoring code 265 may be interleaved with execution of regular garbage collection activities by garbage collector 240 . In one embodiment, monitoring code 265 is executed in response to a garbage collection event. A portion of status information 125 accumulated/generated by monitoring code 265 includes various garbage collection related information. Such garbage collection related information may include: timestamps and elapsed times of garbage collection events performed by garbage collector 240, counts of garbage collection events, counts of the number of objects 255 collected from heap 235 during each garbage collection event , the amount of memory reclaimed in the heap 235 during each garbage collection event, the amount of memory available in the heap 235, the hit ratio of objects 255 in the heap 235 by the requestor (e.g., the programmer 110), the Utilization etc. Furthermore, monitoring code 265 may maintain a history of recent garbage collection events in internal storage buffer 220 and index each garbage collection event into some or all of the aforementioned garbage collection-related information.

在一个实施例中,VM监控程序250可以在VM 105上解释和执行,其主要目的用于搜集状态信息125和将状态信息125复制到内部存储缓冲器220。VM监控程序250可以被单独提供来执行监控职责。VM监控程序250可以收集/生成上述状态信息125的一些或全部,以及其它监控信息。编写专用于监控任务的独立程序使得可以在设计程序110和垃圾收集器240很久以后再编写监控程序,而不需要更新程序110和垃圾收集器240。VM监控程序250使得开发者生成专用监控程序以调查VM 105或程序110中的问题或“缺陷”(bug),而这些问题或缺陷直到VM 105和/或程序110已经被编写并公布给大众之后才变得明显。实际上,许多软件问题直到软件构架(software build)被公布给更大的用户群(user base)才变得明显。因此,VM监控程序250可以被设计来帮助对程序110和/或VM 105的阿尔法(alpha)测试,或者甚至被包括在程序110和/或VM 105的贝塔(beta)发行版中。VM监控程序250提供用于实施稍后开发的用于在VM 105上执行的监控代码的有效机制。In one embodiment, a VM monitor 250 may be interpreted and executed on the VM 105 with the primary purpose of collecting state information 125 and copying the state information 125 to the internal storage buffer 220. A VM monitor program 250 may be provided separately to perform monitoring duties. VM monitor program 250 may collect/generate some or all of the status information 125 described above, as well as other monitoring information. Writing a separate program dedicated to the monitoring task allows the monitoring program to be written long after the program 110 and garbage collector 240 are designed without requiring the program 110 and garbage collector 240 to be updated. VM monitor program 250 enables developers to create special monitor programs to investigate problems or "bugs" in VM 105 or program 110 until after VM 105 and/or program 110 have been written and released to the public only became obvious. In fact, many software problems do not become apparent until the software build is released to a larger user base. Accordingly, VM monitor 250 may be designed to aid in alpha testing of program 110 and/or VM 105, or even be included in a beta release of program 110 and/or VM 105. VM Monitor 250 provides an efficient mechanism for implementing monitoring code that is later developed for execution on VM 105.

包括监控代码265的监控代码和VM监控器程序250通过内部API 225访问内部存储缓冲器220以复制那里的状态信息125。在一个实施例中,内部API 225利用功能调用提取(abstract)对内部存储缓冲器220的访问。VM105的每个想要复制状态信息125到内部存储缓冲器220的部件,通过内部API 225对内部发表给VM 105的一个或多个功能进行“调用”(call),并将积累的/生成的状态信息125传递给调用的功能。接着,所调用的功能将状态信息125复制到内部存储缓冲器220中的适当插槽(slot)或位置。Monitoring code and VM monitor program 250, including monitoring code 265, accesses internal storage buffer 220 through internal API 225 to copy state information 125 therein. In one embodiment, the internal API 225 abstracts access to the internal storage buffer 220 using function calls. Each component of VM 105 that wants to copy state information 125 to internal storage buffer 220, "calls" one or more functions internally published to VM 105 via internal API 225, and transfers the accumulated/generated Status information 125 is passed to the calling function. The called function then copies the state information 125 to the appropriate slot or location in the internal memory buffer 220 .

本机VM监控器215担当各种外部实体的代理器(例如,监控台115),请求对内部存储缓冲器220的访问,来监控VM 105的内部操作。在一个实施例中,本机VM监控器215可以接收状态请求130并提供状态信息125或其一部分作为响应。另一种方案,或者附加的,本机VM监控器215可以与监控台115协商一个报告合同,以便有规则地或周期性地提供状态信息125,而不需要状态请求130。因此,本机VM监控器215既可以将状态信息125推到监控台115,也可以由监控台115从本机VM监控器215拖动状态信息125。The native VM monitor 215 acts as a proxy for various external entities (eg, the monitoring station 115), requesting access to the internal storage buffer 220 to monitor the internal operation of the VM 105. In one embodiment, native VM monitor 215 may receive status request 130 and provide status information 125 or a portion thereof in response. Alternatively, or additionally, the native VM monitor 215 may negotiate a reporting contract with the monitoring station 115 to provide status information 125 on a regular or periodic basis without requiring a status request 130 . Therefore, the local VM monitor 215 can either push the status information 125 to the monitoring console 115 or the monitoring console 115 can pull the status information 125 from the local VM monitor 215 .

利用内部API 225提取对内部存储缓冲器220的访问,可以对内部存储缓冲器220的内容与VM 105的其余部分进行隔离,从而保护内部存储缓冲器220的内容。即使VM 105崩溃,进入死循环,或发生其它故障,状态信息220也可以被保护,而不受到故障的损害。由于本机API 230使用本机代码执行,本机API 230并不由VM 105解释和执行。因此,如果VM 105故障,本机VM监控器215仍然能够访问内部存储缓冲器220,以获得在VM 105故障之前刚刚更新的最新状态信息。因此,内部存储缓冲器220的内容可以被检索,以便进行事后调查以确定VM 105的故障原因。Using the internal API 225 to abstract access to the internal storage buffer 220, the content of the internal storage buffer 220 can be isolated from the rest of the VM 105, thereby protecting the content of the internal storage buffer 220. Even if the VM 105 crashes, enters an infinite loop, or otherwise fails, the state information 220 can be protected from damage by the failure. Since the native API 230 is executed using native code, the native API 230 is not interpreted and executed by the VM 105. Thus, if a VM 105 fails, the native VM monitor 215 can still access the internal storage buffer 220 to obtain the latest state information just updated before the VM 105 failed. Accordingly, the contents of internal storage buffer 220 may be retrieved for postmortem investigation to determine the cause of VM 105 failure.

图3是说明根据本发明的一个实施例的用于监控VM 105的内部操作的处理300的流程图。在处理块305,程序110被在VM 105解释和执行。在Java实施例中,程序110是被实时解释和转换为本机机器代码的Java字节码。所转换的机器代码然后被执行。FIG. 3 is a flow diagram illustrating a process 300 for monitoring the internal operations of VM 105, according to one embodiment of the invention. At processing block 305, program 110 is interpreted and executed on VM 105. In a Java embodiment, program 110 is Java bytecode that is interpreted and converted to native machine code in real time. The translated machine code is then executed.

在执行程序110期间,监控代码利用属于特定程序110操作、特定程序110的资源消耗、以及VM 105的其它内部工作的状态信息125更新内部存储缓冲器220(处理块310)。如上所述,监控代码可以与VM 105中的各种子实体的程序代码以交织的方式执行。在一个实施例中,监控代码通过对内部API 225的功能调用来调用内部存储缓冲器220,并将收集/生成的状态信息125传递给调用的功能。During execution of the program 110, the monitoring code updates the internal storage buffer 220 with state information 125 pertaining to the operation of the particular program 110, the resource consumption of the particular program 110, and other internal workings of the VM 105 (processing block 310). As noted above, the monitoring code may execute in an interleaved fashion with the program code of various sub-entities within the VM 105. In one embodiment, the monitoring code invokes the internal storage buffer 220 through a function call to the internal API 225 and passes the collected/generated state information 125 to the called function.

随着程序110的执行,对象255被创建,并被存储到堆235(处理块315)。只要堆235还有可用的存储器来存储新的对象255,程序110就会继续执行,并创建所需的新的对象255。但是,如果堆235接近其容量,并且堆235中接受新的对象255的可用存储器变得缺乏(判定块320),则处理300继续到处理块325。As program 110 executes, object 255 is created and stored to heap 235 (processing block 315). As long as the heap 235 has memory available to store the new object 255, the program 110 will continue to execute and create the new object 255 as needed. However, if the heap 235 is approaching its capacity, and the available memory in the heap 235 to accept the new object 255 becomes scarce (decision block 320 ), then process 300 continues to processing block 325 .

在处理块325,垃圾收集器240执行自动垃圾收集,以便删除未被参考的对象255,并回收在堆235中消耗的存储器。如上所述,响应于垃圾收集事件,监控代码265利用含有垃圾收集信息的状态信息125更新内部存储缓冲器220(处理块330)。在一个实施例中,监控代码265通过对内部API 225的功能调用来访问内部存储缓冲器220。At processing block 325 , garbage collector 240 performs automatic garbage collection to delete unreferenced objects 255 and reclaim memory consumed in heap 235 . As noted above, in response to a garbage collection event, monitoring code 265 updates internal storage buffer 220 with state information 125 containing garbage collection information (processing block 330). In one embodiment, monitoring code 265 accesses internal storage buffer 220 through function calls to internal API 225.

在处理块335,本机VM监控器215通过本机API 230从内部存储缓冲器220提取一些或全部状态信息125。在一个实施例中,本机VM监控器215通过对本机API 230的功能调用来调用内部存储缓冲器220。在处理块340中,所检索的状态信息125被传输到监控台115。如上所述,状态信息125可以被推到监控台115,或者可以通过发送状态请求130从本机VM监控器215拖出。监控台115可以在与执行VM 115的相同硬件上执行,或者在通过网络或其它通信媒体与本机VM监控器215通信地耦合的远程硬件上执行。At processing block 335, the native VM monitor 215 retrieves some or all of the state information 125 from the internal storage buffer 220 via the native API 230. In one embodiment, the native VM monitor 215 invokes the internal memory buffer 220 through a function call to the native API 230. In processing block 340 , the retrieved status information 125 is transmitted to the monitoring station 115 . As described above, status information 125 can be pushed to the monitoring station 115 , or can be pulled from the native VM monitor 215 by sending a status request 130 . The monitor station 115 may execute on the same hardware as the VM 115 is executing, or on remote hardware communicatively coupled to the local VM monitor 215 via a network or other communication medium.

图4是说明用于实施本发明的实施例的演示企业环境400的框图。所说明的企业环境400的实施例包括耦合集群(cluster)405以服务来自客户机节点410的请求。集群405可以包括:一个或多个服务节点415,每一个服务节点415都支持一个或多个应用服务器(“AS”)实例(instance)417;消息服务器节点420,支持消息服务器422;数据库节点425,支持数据库427;以及网络分配器(dispatcher)430。FIG. 4 is a block diagram illustrating a demo enterprise environment 400 for implementing an embodiment of the present invention. The illustrated embodiment of the enterprise environment 400 includes a coupling cluster 405 to service requests from client nodes 410 . Cluster 405 may include: one or more service nodes 415 each supporting one or more application server ("AS") instances 417; message server nodes 420 supporting message server 422; database nodes 425 , support database 427; and network dispatcher (dispatcher) 430.

AS实例417可以是网络应用服务器,诸如SAP的网络AS,微软(Microsoft)的.NET等。每个AS实例417可以包括一个或多个VM 105以执行程序110。由AS实例417内的VM 105执行的程序110可以集体提供用于实施AS实例417的各个子层(例如,商业层、集成层、演示层等)的逻辑。应当理解,AS实例417的多种部件被排除在图4之外,这样做是为了清楚起见,以免使得本发明变得模糊。在一个实施例中,VM 105可以是符合J2EE标准的JVM以执行Java程序。在一个实施例中,VM 105可以符合来自Microsoft的.NET的框架以执行.NET程序。AS实例417甚至可以包括符合J2EE标准和.NET框架两者的VM 105。The AS instance 417 may be a network application server, such as SAP's network AS, Microsoft's .NET, and so on. Each AS instance 417 may include one or more VMs 105 to execute programs 110. Programs 110 executed by VMs 105 within AS instance 417 may collectively provide logic for implementing various sub-layers of AS instance 417 (eg, business layer, integration layer, presentation layer, etc.). It should be understood that various components of AS instance 417 have been excluded from FIG. 4 for the sake of clarity so as not to obscure the invention. In one embodiment, VM 105 may be a JVM conforming to the J2EE standard to execute Java programs. In one embodiment, VM 105 may conform to the .NET framework from Microsoft to execute .NET programs. The AS instance 417 may even include a VM 105 that complies with both the J2EE standard and the .NET framework.

网络分配器430实施将来自客户机节点410的服务请求在集群405中的服务器节点415间进行分配的负载平衡机制。例如,网络分配器430实施循环法(round-robin)负载平衡机制或类似机制。网络分配器430可以是具有在集群405的服务器节点415间分配服务请求任务的服务器节点415之一,或者是一个独立的硬件节点。服务请求由服务器节点415处理,然后提供给数据库节点425。数据库节点425提供所请求的数据给服务器节点415,服务器节点415依次对结果进行处理和编排格式,以便显示在客户机节点410上。每个AS实例417还包括其自己的分配器机制,以便将分派给它的服务请求在它的各个VM 105间进行分配。Network distributor 430 implements a load balancing mechanism that distributes service requests from client nodes 410 among server nodes 415 in cluster 405 . For example, network distributor 430 implements a round-robin load balancing mechanism or similar mechanism. The network distributor 430 may be one of the server nodes 415 having the task of distributing service requests among the server nodes 415 of the cluster 405, or an independent hardware node. Service requests are processed by server nodes 415 and then provided to database nodes 425 . Database node 425 provides the requested data to server node 415 , which in turn processes and formats the results for display on client node 410 . Each AS instance 417 also includes its own allocator mechanism to distribute service requests assigned to it among its various VMs 105.

在VM 105是JVM的实施例中,程序110可以是提供服务器端逻辑、以便在客户机节点410上生成图形用户界面(“GUI”)的小服务程序(servlet),并且还可以包括用于在GUI中提供动态内容的Java服务器网页(“JSP”)。程序110还可以包括提供企业Java组件(Enterprise JavaBean)(“EJB”)的商业逻辑的商业应用、提供客户端逻辑的小应用程序(applet)等。In embodiments where VM 105 is a JVM, program 110 may be a servlet that provides server-side logic to generate a graphical user interface ("GUI") on client node 410, and may also include A Java Server Pages ("JSP") serving dynamic content in the GUI. Program 110 may also include business applications providing business logic of Enterprise JavaBean ("EJB"), applets providing client logic, and the like.

一个客户机节点410可以执行监控台115以提供对AS实例417的远程监控,特别是对每个VM 105的远程监控。如果IT技术人员注意到VM 105中的一个具有较低的堆利用率、过于活跃的垃圾收集活动等,这个IT技术人员就可以采取适当行动,包括将出问题的VM 105复位。A client node 410 may execute the monitoring console 115 to provide remote monitoring of the AS instance 417, particularly of each VM 105. If an IT technician notices that one of the VMs 105 has low heap utilization, overly active garbage collection activity, etc., the IT technician can take appropriate action, including resetting the offending VM 105.

图5是说明演示处理系统500的框图,所述处理系统500用于执行VM105、软件环境200、处理300的任何一个,或者用于实施客户机节点410、服务器节点415、消息服务器节点420、或数据库节点425的任何一个。所说明的处理系统500的实施例包括一个或多个处理器(或者中央处理单元)505、系统存储器510、非易失性(“NV”)存储器515、DSU 520、通信链路525、芯片组530。所说明的处理系统500可以表示任何计算系统,包括台式计算机、笔记本计算机、工作站、手持计算机、服务器、刀片式服务器(blade server)等。5 is a block diagram illustrating an exemplary processing system 500 for executing any of VM 105, software environment 200, process 300, or for implementing client node 410, server node 415, message server node 420, or Any of the database nodes 425. The illustrated embodiment of processing system 500 includes one or more processors (or central processing units) 505, system memory 510, non-volatile ("NV") memory 515, DSU 520, communication link 525, chipset 530. The illustrated processing system 500 may represent any computing system, including desktop computers, notebook computers, workstations, handheld computers, servers, blade servers, and the like.

处理系统500的元件如下相互连接。处理器505通过芯片组530通信耦合到系统存储器510、NV存储器515、DSU 520、和通信链路525,以便向它们发送指令或数据,或者从它们接收指令或数据。在一个实施例中,NV存储器515是闪速存储器。在其它实施例中,NV存储器515包括只读存储器(“ROM”)、可编程ROM、可擦除可编程ROM、电可擦除可编程ROM等中的任何一个。在一个实施例中,系统存储器710包括随机存取存储器(“RAM”),诸如动态RAM(“DRAM”)、同步DRAM(“SDRAM”)、双倍速率(double data rate)SDRAM(“DDR SDRAM”)、静态RAM(“SRAM”)等。DSU 520表示任何用于软件数据、应用、和/或操作系统的存储设备,但是最典型的是非易失性存储设备。DSU 520可选地包括一个或多个集成驱动电子(“IDE”)硬盘、增强型IDE(“EIDE”)硬盘、独立盘冗余阵列(“RAID”)、小型计算机系统接口(“SCSI”)硬盘等。虽然DSU 520被示出为在处理系统500的内部,但是DSU 520也可以在外部耦合到处理系统500。通信链路525将处理系统500耦合到网络,以便处理系统500可以在网络上与一个或多个其它计算机进行通信。通信链路525可以包括调制解调器、以太网卡、千兆比特以太网卡、通用串行总线(“USB”)端口、无线网络接口卡、光纤接口等。The elements of processing system 500 are interconnected as follows. Processor 505 is communicatively coupled to system memory 510, NV memory 515, DSU 520, and communication link 525 through chipset 530 to send instructions or data to or receive instructions or data from them. In one embodiment, NV memory 515 is flash memory. In other embodiments, NV memory 515 includes any of read only memory ("ROM"), programmable ROM, erasable programmable ROM, electrically erasable programmable ROM, and the like. In one embodiment, system memory 710 includes random access memory (“RAM”) such as dynamic RAM (“DRAM”), synchronous DRAM (“SDRAM”), double data rate SDRAM (“DDR SDRAM”) ”), Static RAM (“SRAM”), etc. DSU 520 represents any storage device for software data, applications, and/or operating systems, but is most typically a non-volatile storage device. The DSU 520 optionally includes one or more Integrated Drive Electronics (“IDE”) hard drives, Enhanced IDE (“EIDE”) hard drives, Redundant Array of Independent Disks (“RAID”), Small Computer System Interface (“SCSI”) hard disk, etc. Although DSU 520 is shown as being internal to processing system 500, DSU 520 may also be coupled externally to processing system 500. Communication link 525 couples processing system 500 to a network so that processing system 500 can communicate with one or more other computers over the network. Communications link 525 may include a modem, Ethernet card, Gigabit Ethernet card, Universal Serial Bus ("USB") port, wireless network interface card, fiber optic interface, or the like.

应当理解,为了清楚,处理系统500的各种其它元件都被排除在图5以及本公开文本之外。例如,处理系统500还可以包括图形卡、附加DSU、其它持久数据存储设备(例如,磁带驱动器)等。芯片组530还可以包括系统总线和各种其它数据总线,用于与子部件相互连接,诸如存储控制器集线器和输入/输出(“I/O”)控制器集线器,并且还包括数据总线(例如,外围部件互连总线),用于将外围设备连接到芯片组530。相对应地,处理系统500也可以在没有一个或多个所说明的元件的情况下操作。例如,处理系统500不需要包括DSU 520。It should be understood that various other elements of processing system 500 have been excluded from FIG. 5 and this disclosure for the sake of clarity. For example, processing system 500 may also include graphics cards, additional DSUs, other persistent data storage devices (eg, tape drives), and the like. Chipset 530 may also include a system bus and various other data buses for interconnecting subcomponents, such as memory controller hubs and input/output ("I/O") controller hubs, and also include data buses such as , peripheral component interconnect bus) for connecting peripheral devices to the chipset 530 . Accordingly, processing system 500 may also operate without one or more of the illustrated elements. For example, processing system 500 need not include DSU 520.

这篇说明中所参考的“一个实施例”或“实施例”是指与该实施例相应描述的特定特征、结构、或特性被包括在本发明的至少一个实施例中。因此,在说明书各处出现的语句“在一个实施例中”或“在实施例中”并不必须是指同一个实施例。而且,特定的特征、结构、或特性可以以适当的方式组合到一个或多个实施例中。Reference in this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described with respect to the embodiment is included in at least one embodiment of the present invention. Thus, appearances of the phrase "in one embodiment" or "in an embodiment" in various places in the specification are not necessarily referring to the same embodiment. Also, specific features, structures, or characteristics may be combined in an appropriate manner in one or more embodiments.

上面说明的处理300是按照计算机软件和硬件来描述的。所描述的技术可以构成嵌入在机器(例如,计算机)可读介质中的机器可读指令,当由机器执行时可以使机器执行所描述的操作。此外,处理300也可以被嵌入硬件中,诸如专用集成电路(“ASIC”)等。在处理300中一些或全部处理块的出现次序不应当被认为是限定性的。相反,本领域的普通技术人员受本公开内容的启示,应当理解一些处理块可以以未说明的各种次序来执行。Process 300 illustrated above is described in terms of computer software and hardware. The described techniques may constitute machine-readable instructions embodied in a machine (eg, computer)-readable medium, which, when executed by a machine, cause the machine to perform the operations described. Furthermore, process 300 may also be embedded in hardware, such as an application specific integrated circuit ("ASIC") or the like. The order in which some or all of the processing blocks appear in process 300 should not be considered limiting. Rather, those of ordinary skill in the art, given the light of this disclosure, should understand that some processing blocks may be performed in various orders not illustrated.

本发明所说明的实施例的上述描述,包括摘要中所描述的内容,并不是为了穷举,或将本发明限定为一种特定形式。在上面的一些例子中,为了避免使某些方面变得不明显,公知的结构、材料或操作并没有被示出或详细描述。在这里描述的本发明的特定实施例或例子是为了说明目的,相关领域技术人员应当认识到可以在发明的范围内进行各种等效的修改。The above description of illustrated embodiments of the invention, including what is described in the Abstract, is not intended to be exhaustive or to limit the invention to one particular form. In some of the above instances, to avoid obscuring certain aspects, well-known structures, materials or operations have not been shown or described in detail. Specific embodiments, or examples, of the invention are described herein for illustrative purposes, and various equivalent modifications are possible within the scope of the invention, those skilled in the relevant art will recognize.

根据上面的详细描述,可以对本发明进行这些修改。下面权利要求书中所使用的术语并不应当被解释为将本发明限制在说明书和权利要求书中所公开的特定实施例。相反,本发明的保护范围是由下面权利要求书整体确定的,其应当被按照权利要求释义所确定的条款来解释。These modifications can be made to the invention in light of the above detailed description. The terms used in the following claims should not be construed to limit the invention to the specific embodiments disclosed in the specification and claims. Instead, the scope of protection of the present invention is determined entirely by the following claims, which should be construed in accordance with the terms determined by the interpretation of the claims.

Claims (23)

1.一种方法,包括:1. A method comprising: 操作虚拟机(“VM”)解释和执行一个程序;Operate a virtual machine (“VM”) to interpret and execute a program; 在VM操作期间,将VM内部操作的状态信息存储到VM的内部存储缓冲器;及during VM operation, storing state information of the VM's internal operations to the VM's internal storage buffer; and 在VM操作期间,从所述内部存储缓冲器抽取所述状态信息,以便从VM外部监控VM的内部操作。During VM operation, the state information is fetched from the internal memory buffer to monitor the internal operation of the VM from outside the VM. 2.如权利要求1的方法,其中所述VM包括Java虚拟机(“JVM”),而所述程序包括Java字节码。2. The method of claim 1, wherein said VM comprises a Java Virtual Machine ("JVM") and said program comprises Java bytecode. 3.如权利要求2的方法,其中将所述状态信息存储到内部存储缓冲器包括,通过Java应用编程接口(“API”)访问内部存储缓冲器。3. The method of claim 2, wherein storing the state information to an internal storage buffer comprises accessing the internal storage buffer through a Java Application Programming Interface ("API"). 4.如权利要求2的方法,其中所述JVM被包括在应用服务器实例中,并且所述程序包括对客户请求进行服务的企业应用。4. The method of claim 2, wherein said JVM is included in an application server instance, and said program comprises an enterprise application that services client requests. 5.如权利要求1的方法,还包括:5. The method of claim 1, further comprising: 将执行程序的期间创建的对象存储到堆;和storing objects created during program execution to the heap; and 利用自动垃圾收集器对不再被所述程序参考的对象进行垃圾收集,using the automatic garbage collector to garbage collect objects that are no longer referenced by said program, 其中将VM的状态信息存储到内部存储缓冲器包括,将垃圾收集活动信息存储到内部存储缓冲器。The storing the state information of the VM in the internal storage buffer includes storing the garbage collection activity information in the internal storage buffer. 6.如权利要求5的方法,其中所述垃圾收集活动信息包括垃圾收集的运行时间、垃圾收集事件的数量计数、从堆收集的对象的数量、以及堆中可用存储器的量中的至少一个。6. The method of claim 5, wherein the garbage collection activity information includes at least one of runtime of garbage collection, number count of garbage collection events, number of objects collected from the heap, and amount of available memory in the heap. 7.如权利要求1的方法,其中从VM的内部存储缓冲器提取状态信息包括:7. The method of claim 1, wherein extracting state information from an internal memory buffer of the VM comprises: 执行VM外部的VM监控器来检索状态信息;Execute a VM monitor external to the VM to retrieve status information; 通过本机应用编程接口(“API”)访问VM;以及access the VM through a native application programming interface (“API”); and 通过本机API将所述状态信息检索到VM监控器。The state information is retrieved to the VM monitor through a native API. 8.如权利要求7的方法,还包括:8. The method of claim 7, further comprising: 调用VM监控器来检索状态信息,其中所述VM监控器包括不由VM解释的本机机器代码;和calling a VM monitor to retrieve state information, wherein the VM monitor includes native machine code not interpreted by the VM; and 将所述状态信息传送到监控台,用于显示在监控台上。The status information is transmitted to the monitoring platform for displaying on the monitoring platform. 9.如权利要求7的方法,还包括在VM故障之后访问所述内部存储缓冲器以便对故障进行调查。9. The method of claim 7, further comprising accessing the internal storage buffer following a VM failure to investigate the failure. 10.如权利要求1的方法,还包括在VM上解释和执行VM监控程序,所述VM监控程序专用于从VM部件搜集至少一部分状态信息,并将所述一部分状态信息存储到内部存储缓冲器。10. The method of claim 1 , further comprising interpreting and executing a VM monitor program on the VM, the VM monitor program being dedicated to gathering at least a portion of state information from VM components and storing the portion of state information to an internal memory buffer . 11.一种提供指令的机器可访问介质,如果所述指令被所述机器执行,将会使机器执行以下操作:11. A machine-accessible medium providing instructions which, if executed by said machine, will cause the machine to: 在虚拟机器(“VM”)上解释程序;interpret the program on a virtual machine (“VM”); 从VM内生成VM的状态信息;Generate VM status information from within the VM; 在解释程序的期间将VM的状态信息存储到VM的内部存储缓冲器;及storing state information of the VM to an internal memory buffer of the VM during the interpretation of the program; and 从VM外部访问存储在内部存储缓冲器中的状态信息,以便监控VM的内部操作。The state information stored in the internal storage buffer is accessed from outside the VM in order to monitor the internal operation of the VM. 12.如权利要求11的机器可访问介质,其中所述VM包括Java虚拟机(“JVM”),而所述程序包括Java字节码。12. The machine-accessible medium of claim 11, wherein said VM comprises a Java Virtual Machine ("JVM") and said program comprises Java bytecode. 13.如权利要求12的机器可访问介质,其中将状态信息存储到内部存储缓冲器包括,通过Java应用编程接口(“API”)访问内部存储缓冲器。13. The machine-accessible medium of claim 12, wherein storing the state information to the internal storage buffer comprises accessing the internal storage buffer through a Java Application Programming Interface ("API"). 14.如权利要求13的机器可访问介质,其中所述Java API在VN故障的情况下将内部存储缓冲器与损害相隔离。14. The machine-accessible medium of claim 13, wherein the Java API isolates internal storage buffers from damage in the event of a VN failure. 15.如权利要求11的机器可访问介质,其中生成VM的状态信息包括,执行嵌入在VM的子实体中的监控代码以获得状态信息,并且,其中将状态信息存储到内部存储缓冲器包括,执行监控代码来将所述状态信息存储到内部存储缓冲器。15. The machine-accessible medium of claim 11 , wherein generating the state information of the VM comprises executing monitoring code embedded in a sub-entity of the VM to obtain the state information, and wherein storing the state information to the internal storage buffer comprises, Monitoring code is executed to store the state information to an internal memory buffer. 16.如权利要求15的机器可访问介质,还提供指令,该指令在被所述机器执行时将会使机器进一步执行以下操作:16. The machine-accessible medium of claim 15 , further providing instructions which, when executed by said machine, will cause the machine to further perform the following operations: 交织地执行监控代码和子实体的程序代码,其中所述子实体包括堆管理器和输入/输出系统中的一个。The monitoring code and program code of sub-entities are interleavedly executed, wherein the sub-entities include one of a heap manager and an input/output system. 17.如权利要求11的机器可访问介质,还提供指令,该指令在被所述机器执行时将会使使机器进一步执行以下操作:17. The machine-accessible medium of claim 11 , further providing instructions which, when executed by said machine, will cause the machine to further perform the following operations: 将由程序创建的对象存储到堆;和store objects created by the program on the heap; and 利用自动垃圾收集器对不再被程序参考的那些对象进行垃圾收集,utilize the automatic garbage collector to garbage collect those objects that are no longer referenced by the program, 其中将VM的状态信息存储到内部存储缓冲器包括,将垃圾收集活动信息存储到内部存储缓冲器。The storing the state information of the VM in the internal storage buffer includes storing the garbage collection activity information in the internal storage buffer. 18.如权利要求17的机器可访问介质,其中所述垃圾收集活动信息包括垃圾收集的运行时间、垃圾收集事件的数量计数、从堆收集的对象的数量、以及堆中可用存储器的量中的至少一个。18. The machine-accessible medium of claim 17 , wherein the garbage collection activity information includes elapsed time of garbage collection, a count of the number of garbage collection events, the number of objects collected from the heap, and the amount of available memory in the heap. at least one. 19.如权利要求11的机器可访问介质,其中从VM外部访问状态信息包括:19. The machine-accessible medium of claim 11 , wherein accessing state information from outside the VM comprises: 执行在VM外部的VM监控器;和Executing a VM monitor external to the VM; and 通过对本机应用编程接口的功能调用来从内部存储缓冲器检索状态信息。Status information is retrieved from the internal memory buffer through function calls to the native application programming interface. 20.一种系统,包括:20. A system comprising: 服务器节点,执行应用服务器(“AS”)实例,该AS实例包括可由服务器节点的处理器执行以进行下列操作的逻辑:A server node that executes an application server ("AS") instance that includes logic executable by the server node's processor to: 在虚拟机器(“VM ”)上解释程序;interpret the program on a virtual machine (“VM”); 从VM内生成VM的状态信息;Generate VM status information from within the VM; 在解释程序的期间将VM的状态信息存储到VM的内部存储缓冲器;及storing state information of the VM to an internal memory buffer of the VM during the interpretation of the program; and 从VM外部访问存储在内部存储缓冲器内的状态信息,以便监控VM的内部操作。The state information stored in the internal memory buffer is accessed from outside the VM in order to monitor the internal operation of the VM. 21.如权利要求20的系统,其中所述VM包括符合Java 2企业版标准的Java虚拟机,而所述程序包括Java程序。21. The system of claim 20, wherein said VM comprises a Java Virtual Machine conforming to the Java 2 Enterprise Edition standard, and said program comprises a Java program. 22.如权利要求21的系统,其中可由服务器节点的处理器执行以生成VM的状态信息的逻辑包括,嵌入自动垃圾收集器中的监控代码,所述自动垃圾收集器被执行以回收由不再被Java程序参考的对象所消耗的堆的存储器。22. The system of claim 21 , wherein the logic executable by a processor of a server node to generate status information for a VM comprises monitoring code embedded in an automatic garbage collector executed to reclaim VMs that are no longer Heap memory consumed by objects referenced by Java programs. 23.权利要求21的系统,还包括:23. The system of claim 21, further comprising: 客户机节点,执行监控台,该监控台包括可由客户机节点的处理器执行的逻辑,包括:A client node, executing a monitoring console comprising logic executable by a processor of the client node, including: 发送状态问询到服务器节点;Send a status query to the server node; 响应于状态问询从服务器节点接收状态信息;和receiving status information from a server node in response to a status query; and 显示所述状态信息。Display the status information.
CN 200610004392 2006-02-16 2006-02-16 Virtual machine monitoring Pending CN101021800A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200610004392 CN101021800A (en) 2006-02-16 2006-02-16 Virtual machine monitoring

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200610004392 CN101021800A (en) 2006-02-16 2006-02-16 Virtual machine monitoring

Publications (1)

Publication Number Publication Date
CN101021800A true CN101021800A (en) 2007-08-22

Family

ID=38709574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200610004392 Pending CN101021800A (en) 2006-02-16 2006-02-16 Virtual machine monitoring

Country Status (1)

Country Link
CN (1) CN101021800A (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753380A (en) * 2008-12-16 2010-06-23 Sap股份公司 Monitoring memory consumption
CN101765225B (en) * 2008-12-24 2012-05-23 华为技术有限公司 Virtual cluster management method and cluster node
CN102541634A (en) * 2010-12-20 2012-07-04 微软公司 Probe insertion via background virtual machine
CN103036711A (en) * 2012-12-05 2013-04-10 中国电信股份有限公司云计算分公司 State inspection method and system and management node device
CN104380264A (en) * 2012-03-16 2015-02-25 国际商业机器公司 Run-time instrumentation reporting
CN104503891A (en) * 2014-12-10 2015-04-08 北京京东尚科信息技术有限公司 Method and device for online monitoring JVM (Java Virtual Machine) thread
US9367313B2 (en) 2012-03-16 2016-06-14 International Business Machines Corporation Run-time instrumentation directed sampling
US9367316B2 (en) 2012-03-16 2016-06-14 International Business Machines Corporation Run-time instrumentation indirect sampling by instruction operation code
US9372693B2 (en) 2012-03-16 2016-06-21 International Business Machines Corporation Run-time instrumentation sampling in transactional-execution mode
US9395989B2 (en) 2012-03-16 2016-07-19 International Business Machines Corporation Run-time-instrumentation controls emit instruction
US9400736B2 (en) 2012-03-16 2016-07-26 International Business Machines Corporation Transformation of a program-event-recording event into a run-time instrumentation event
US9405543B2 (en) 2012-03-16 2016-08-02 International Business Machines Corporation Run-time instrumentation indirect sampling by address
US9454462B2 (en) 2012-03-16 2016-09-27 International Business Machines Corporation Run-time instrumentation monitoring for processor characteristic changes
US9483268B2 (en) 2012-03-16 2016-11-01 International Business Machines Corporation Hardware based run-time instrumentation facility for managed run-times
US9489285B2 (en) 2012-03-16 2016-11-08 International Business Machines Corporation Modifying run-time-instrumentation controls from a lesser-privileged state
CN107632920A (en) * 2017-09-16 2018-01-26 广西电网有限责任公司电力科学研究院 A kind of power transmission and transforming equipment monitoring device deep monitored method
CN107729208A (en) * 2017-09-16 2018-02-23 广西电网有限责任公司电力科学研究院 A kind of power transmission and transforming equipment monitoring device deep monitored system

Cited By (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753380B (en) * 2008-12-16 2014-03-19 Sap股份公司 Monitoring memory consumption
CN101753380A (en) * 2008-12-16 2010-06-23 Sap股份公司 Monitoring memory consumption
CN101765225B (en) * 2008-12-24 2012-05-23 华为技术有限公司 Virtual cluster management method and cluster node
CN102541634B (en) * 2010-12-20 2015-10-07 微软技术许可有限责任公司 Inserted by the detection of background virtual machine
CN102541634A (en) * 2010-12-20 2012-07-04 微软公司 Probe insertion via background virtual machine
US10203974B2 (en) 2010-12-20 2019-02-12 Microsoft Technology Licensing, Llc Probe insertion via background virtual machine
US9405543B2 (en) 2012-03-16 2016-08-02 International Business Machines Corporation Run-time instrumentation indirect sampling by address
US9442728B2 (en) 2012-03-16 2016-09-13 International Business Machines Corporation Run-time instrumentation indirect sampling by instruction operation code
CN104380264B (en) * 2012-03-16 2017-06-23 国际商业机器公司 Run time examining report
US9367313B2 (en) 2012-03-16 2016-06-14 International Business Machines Corporation Run-time instrumentation directed sampling
US9367316B2 (en) 2012-03-16 2016-06-14 International Business Machines Corporation Run-time instrumentation indirect sampling by instruction operation code
US9372693B2 (en) 2012-03-16 2016-06-21 International Business Machines Corporation Run-time instrumentation sampling in transactional-execution mode
US9395989B2 (en) 2012-03-16 2016-07-19 International Business Machines Corporation Run-time-instrumentation controls emit instruction
US9400736B2 (en) 2012-03-16 2016-07-26 International Business Machines Corporation Transformation of a program-event-recording event into a run-time instrumentation event
CN104380264A (en) * 2012-03-16 2015-02-25 国际商业机器公司 Run-time instrumentation reporting
US9405541B2 (en) 2012-03-16 2016-08-02 International Business Machines Corporation Run-time instrumentation indirect sampling by address
US9411591B2 (en) 2012-03-16 2016-08-09 International Business Machines Corporation Run-time instrumentation sampling in transactional-execution mode
US9430238B2 (en) 2012-03-16 2016-08-30 International Business Machines Corporation Run-time-instrumentation controls emit instruction
US9442824B2 (en) 2012-03-16 2016-09-13 International Business Machines Corporation Transformation of a program-event-recording event into a run-time instrumentation event
US9489285B2 (en) 2012-03-16 2016-11-08 International Business Machines Corporation Modifying run-time-instrumentation controls from a lesser-privileged state
US9454462B2 (en) 2012-03-16 2016-09-27 International Business Machines Corporation Run-time instrumentation monitoring for processor characteristic changes
US9459873B2 (en) 2012-03-16 2016-10-04 International Business Machines Corporation Run-time instrumentation monitoring of processor characteristics
US9465716B2 (en) 2012-03-16 2016-10-11 International Business Machines Corporation Run-time instrumentation directed sampling
US9471315B2 (en) 2012-03-16 2016-10-18 International Business Machines Corporation Run-time instrumentation reporting
US9483268B2 (en) 2012-03-16 2016-11-01 International Business Machines Corporation Hardware based run-time instrumentation facility for managed run-times
US9483269B2 (en) 2012-03-16 2016-11-01 International Business Machines Corporation Hardware based run-time instrumentation facility for managed run-times
CN103036711B (en) * 2012-12-05 2016-03-16 中国电信股份有限公司 Condition detection method and system, management node device
CN103036711A (en) * 2012-12-05 2013-04-10 中国电信股份有限公司云计算分公司 State inspection method and system and management node device
CN104503891A (en) * 2014-12-10 2015-04-08 北京京东尚科信息技术有限公司 Method and device for online monitoring JVM (Java Virtual Machine) thread
CN107632920A (en) * 2017-09-16 2018-01-26 广西电网有限责任公司电力科学研究院 A kind of power transmission and transforming equipment monitoring device deep monitored method
CN107729208A (en) * 2017-09-16 2018-02-23 广西电网有限责任公司电力科学研究院 A kind of power transmission and transforming equipment monitoring device deep monitored system

Similar Documents

Publication Publication Date Title
US7886294B2 (en) Virtual machine monitoring
CN101021800A (en) Virtual machine monitoring
US7552153B2 (en) Virtual machine monitoring using shared memory
US7523196B2 (en) Session monitoring using shared memory
US7689989B2 (en) Thread monitoring using shared memory
EP1679602B1 (en) Shared memory based monitoring for application servers
JP5723208B2 (en) Fail-safe mechanism for dynamic software measurement using callbacks
US8458422B1 (en) Policy based creation of export sets and backup media
US7757129B2 (en) Generalized trace and log facility for first error data collection
US8095823B2 (en) Server computer component
US8601469B2 (en) Method and system for customizing allocation statistics
US11232026B2 (en) Deferred destruction for efficient resource reclamation
US8984534B2 (en) Interfacing between a receiving component of a server application and a remote application
US20060248276A1 (en) Cache monitoring using shared memory
US20160342488A1 (en) Mechanism for providing virtual machines for use by multiple users
US20090300093A1 (en) Server computer
US20090172636A1 (en) Interactive development tool and debugger for web services
US20080243970A1 (en) Method and system for providing loitering trace in virtual machines
US20040044643A1 (en) Managing multiple virtual machines
US20090276205A1 (en) Stablizing operation of an emulated system
US20080282255A1 (en) Highly-available application operation method and system, and method and system of changing application version on line
US20080155246A1 (en) System and method for synchronizing memory management functions of two disparate operating systems
WO2006128112A2 (en) Clustering server providing virtual machine data sharing
US8001339B1 (en) Storage management policies in a virtual data storage system
US20080091909A1 (en) Method and system to manage virtual machine memory

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: German Waldo

Applicant after: SAP AG

Address before: German Waldo

Applicant before: SAP AG

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: SAP AG TO: SAP EUROPE AG

RJ01 Rejection of invention patent application after publication

Application publication date: 20070822