Interface GuestOSMXBean
- All Superinterfaces:
PlatformManagedObject
- All Known Implementing Classes:
GuestOS
This interface provides Processor and Memory usage statistics of the
Guest (Virtual Machine(VM)/Logical Partition(LPAR)) as seen by the Hypervisor Host.
Where there are multiple levels of Hypervisor, only the top level Hypervisor information is returned.
These are the supported Hypervisor and Guest Operating System combinations:
Usage example for the
- Windows and Linux on VMWare ESXi (IBM Java 8 only).
- VMware GuestSDK (Generally packaged with VMWare tools) must be installed in the Guest Operating System.
- AIX and Linux on PowerVM.
- Linux on PowerKVM.
- Guest Operating System memory usage statistics are not available on Linux for PowerKVM.
- z/OS and Linux on z/VM.
- hypfs filesystem (s390_hypfs) must be mounted on Linux on z/VM. The userid that runs the Java process must have read and write access.
Usage example for the
GuestOSMXBean
...
try {
mxbeanName = new ObjectName("com.ibm.virtualization.management:type=GuestOS");
} catch (MalformedObjectNameException e) {
// Exception Handling
}
try {
MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();
if (true != mbeanServer.isRegistered(mxbeanName)) {
// GuestOSMXBean not registered
}
GuestOSMXBean guestBean = JMX.newMXBeanProxy(mbeanServer, mxbeanName, GuestOSMXBean.class);
} catch (Exception e) {
// Exception Handling
}
- Since:
- 1.7.1
-
Method Summary
Modifier and TypeMethodDescriptionFunction instantiates aGuestOSMemoryUsage
object and populates it with the current snapshot of Memory Usage statistics of the Guest as seen by the Hypervisor.retrieveMemoryUsage
(GuestOSMemoryUsage gmUsage) Snapshot of the Guest Memory usage statistics as seen by the Hypervisor, returned as aGuestOSMemoryUsage
object.Function instantiates aGuestOSProcessorUsage
object and populates it with the current snapshot of Processor Usage statistics of the Guest as seen by the Hypervisor.Snapshot of the Guest Processor usage statistics as seen by the Hypervisor, returned as aGuestOSProcessorUsage
object.Methods declared in interface java.lang.management.PlatformManagedObject
getObjectName
-
Method Details
-
retrieveProcessorUsage
GuestOSProcessorUsage retrieveProcessorUsage(GuestOSProcessorUsage gpUsage) throws NullPointerException, GuestOSInfoRetrievalException Snapshot of the Guest Processor usage statistics as seen by the Hypervisor, returned as aGuestOSProcessorUsage
object. The statistics are an aggregate across all physical CPUs assigned to the Guest by the Hypervisor.- Parameters:
gpUsage
- User providedGuestOSProcessorUsage
object.- Returns:
- The updated
GuestOSProcessorUsage
object. - Throws:
NullPointerException
- if a null reference is passed.GuestOSInfoRetrievalException
- if it failed to obtain usage statistics.In case of an exception, the handler code can use toString() on the exception code to obtain a description of the exception.
-
retrieveProcessorUsage
Function instantiates aGuestOSProcessorUsage
object and populates it with the current snapshot of Processor Usage statistics of the Guest as seen by the Hypervisor. The statistics are an aggregate across all physical CPUs assigned to the Guest by the Hypervisor.- Returns:
- The new
GuestOSProcessorUsage
object. - Throws:
GuestOSInfoRetrievalException
- if it failed to obtain usage statistics.In case of an exception, the handler code can use toString() on the exception code to obtain a description of the exception.
-
retrieveMemoryUsage
GuestOSMemoryUsage retrieveMemoryUsage(GuestOSMemoryUsage gmUsage) throws NullPointerException, GuestOSInfoRetrievalException Snapshot of the Guest Memory usage statistics as seen by the Hypervisor, returned as aGuestOSMemoryUsage
object.- Parameters:
gmUsage
- User providedGuestOSMemoryUsage
object.- Returns:
- The updated
GuestOSMemoryUsage
object. - Throws:
NullPointerException
- if a null reference is passed.GuestOSInfoRetrievalException
- if it failed to obtain usage statistics.In case of an exception, the handler code can use toString() on the exception code to obtain a description of the exception.
-
retrieveMemoryUsage
Function instantiates aGuestOSMemoryUsage
object and populates it with the current snapshot of Memory Usage statistics of the Guest as seen by the Hypervisor.- Returns:
- The new
GuestOSMemoryUsage
object. - Throws:
GuestOSInfoRetrievalException
- if it failed to obtain usage statistics.In case of an exception, the handler code can use toString() on the exception code to obtain a description of the exception.
-