- java.lang.Object
- 
- com.ibm.virtualization.management.GuestOSProcessorUsage
 
- 
 public final class GuestOSProcessorUsage extends Object This provides a snapshot of the Guest (Virtual Machine(VM)/Logical Partition(LPAR)) Processor usage statistics as seen by the Hypervisor Host. The statistics are an aggregate across all physical CPUs assigned to the Guest by the Hypervisor Host. The supported Operating System and Hypervisor combinations are:- Linux and Windows on VMWare (IBM Java 8 only).
- AIX and Linux on PowerVM.
- Linux and z/OS on z/VM.
- Linux on PowerKVM.
 - Since:
- 1.7.1
 
- 
- 
Constructor SummaryConstructors Constructor Description GuestOSProcessorUsage()Creates a newGuestOSProcessorUsageinstance.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GuestOSProcessorUsagefrom(CompositeData cd)Receives aCompositeDatarepresenting aGuestOSProcessorUsageobject and attempts to return the rootGuestOSProcessorUsageinstance.floatgetCpuEntitlement()The total CPU Entitlement assigned to this Guest by the Hypervisor.longgetCpuTime()The total used time of the Guest as reported by the Hypervisor in microseconds.longgetHostCpuClockSpeed()The the clock speed of the Host Processor in platform-dependent units.longgetTimestamp()The timestamp when the usage statistics were last sampled in microseconds.StringtoString()Text description of thisGuestOSProcessorUsageobject.
 
- 
- 
- 
Constructor Detail- 
GuestOSProcessorUsagepublic GuestOSProcessorUsage() Creates a newGuestOSProcessorUsageinstance.
 
- 
 - 
Method Detail- 
getCpuTimepublic long getCpuTime() The total used time of the Guest as reported by the Hypervisor in microseconds.- z/OS maintains CPU usage history only for the last 4 hours. The value might not be monotonically increasing.
 - Returns:
- used time in microseconds or -1 if info not available.
 
 - 
getHostCpuClockSpeedpublic long getHostCpuClockSpeed() The the clock speed of the Host Processor in platform-dependent units.- z/OS: Millions of Service Units (MSUs).
- Linux, AIX, and Windows: MegaHertz (MHz).
 - Returns:
- Host CPU clock speed or -1 if not available.
 
 - 
getTimestamppublic long getTimestamp() The timestamp when the usage statistics were last sampled in microseconds.- Returns:
- The last sampling timestamp in microseconds.
 
 - 
getCpuEntitlementpublic float getCpuEntitlement() The total CPU Entitlement assigned to this Guest by the Hypervisor. The value is in Processor units and could be a fraction.- VMWare: CpuLimitMHz,CpuReservationMHz,CpuSharesandHostProcessorSpeedare used to arrive at the Entitlement.- See the VMware GuestSDK for more on what these mean.
 
- PowerVM: entitled_proc_capacity/100on AIX andpartition_entitled_capacity/100on Linux represents the Entitlement.- See perfstat_partition_total interface on AIX.
- See lparcfg documentation on Linux.
 
- z/VM: CPU Entitlement is unavailable.
 - Returns:
- CPU Entitlement assigned for this Guest or -1 if not available.
 
- VMWare: 
 - 
frompublic static GuestOSProcessorUsage from(CompositeData cd) Receives aCompositeDatarepresenting aGuestOSProcessorUsageobject and attempts to return the rootGuestOSProcessorUsageinstance.- Parameters:
- cd- A- CompositeDatathat represents a- GuestOSProcessorUsage.
- Returns:
- if cdis non-null, returns a new instance ofGuestOSProcessorUsage, Ifcdisnull, returnsnull.
- Throws:
- IllegalArgumentException- if argument- cddoes not correspond to a- GuestOSProcessorUsagewith the following attributes:- cpuTime(- java.lang.Long)
- timestamp(- java.lang.Long)
- cpuEntitlement(- java.lang.Float)
- hostCpuClockSpeed(- java.lang.Long)
 
 
 - 
toStringpublic String toString() Text description of thisGuestOSProcessorUsageobject.- Overrides:
- toStringin class- Object
- Returns:
- Text description of this GuestOSProcessorUsageobject.
 
 
- 
 
-