- java.lang.Object
-
- com.ibm.virtualization.management.GuestOSMemoryUsage
-
public final class GuestOSMemoryUsage extends Object
This provides a snapshot of the Guest (Virtual Machine(VM)/Logical Partition(LPAR)) Memory usage statistics as seen 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.
- Guest Operating System memory usage statistics are not available on Linux for PowerKVM.
- Since:
- 1.7.1
-
-
Constructor Summary
Constructors Constructor Description GuestOSMemoryUsage()
Creates a newGuestOSMemoryUsage
instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GuestOSMemoryUsage
from(CompositeData cd)
Receives aCompositeData
representing aGuestOSMemoryUsage
object and attempts to return the rootGuestOSMemoryUsage
instance.long
getMaxMemLimit()
The amount of real Memory allowed to be used by the Guest as reported by the Hypervisor in MB.long
getMemUsed()
The total Memory used by the Guest as reported by the Hypervisor in MB.long
getTimestamp()
The timestamp when the usage statistics were last sampled in microseconds.String
toString()
Text description of thisGuestOSMemoryUsage
object.
-
-
-
Constructor Detail
-
GuestOSMemoryUsage
public GuestOSMemoryUsage()
Creates a newGuestOSMemoryUsage
instance.
-
-
Method Detail
-
getMemUsed
public long getMemUsed()
The total Memory used by the Guest as reported by the Hypervisor in MB.- Returns:
- Current used Memory by the Guest in MB or -1 if info not available.
-
getTimestamp
public long getTimestamp()
The timestamp when the usage statistics were last sampled in microseconds.- Returns:
- The last sampling timestamp in microseconds.
-
getMaxMemLimit
public long getMaxMemLimit()
The amount of real Memory allowed to be used by the Guest as reported by the Hypervisor in MB.- Returns:
- Max Memory that can be used by the Guest in MB or -1 if info not available or if no limit has been set.
-
from
public static GuestOSMemoryUsage from(CompositeData cd)
Receives aCompositeData
representing aGuestOSMemoryUsage
object and attempts to return the rootGuestOSMemoryUsage
instance.- Parameters:
cd
- ACompositeData
that represents aGuestOSMemoryUsage
.- Returns:
- if
cd
is non-null
, returns a new instance ofGuestOSMemoryUsage
, Ifcd
isnull
, returnsnull
. - Throws:
IllegalArgumentException
- if argumentcd
does not correspond to aGuestOSMemoryUsage
with the following attributes:memUsed
(java.lang.Long
)timestamp
(java.lang.Long
)maxMemLimit
(java.lang.Long
)
-
toString
public String toString()
Text description of thisGuestOSMemoryUsage
object.- Overrides:
toString
in classObject
- Returns:
- text description of this
GuestOSMemoryUsage
object.
-
-