public class LoadMeasureOSHI
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
LoadMeasureOSHI()
Instantiates this class.
|
Modifier and Type | Method and Description |
---|---|
protected LoadMeasureOSHI |
clone()
Returns a copy of the current object.
|
double |
getCPU_Usage()
Gets the CPU usage.
|
long |
getFreeMemory()
Gets the free memory in MB.
|
long |
getFreeMemorySwap()
Gets the free memory swap.
|
long |
getMhz()
Gets the mhz.
|
int |
getNumberOfLogicalCPU()
Gets the number of logical CPUs.
|
int |
getNumberOfPhysicalCPU()
Gets the number of physical CPUs.
|
java.lang.String |
getProcessorName()
Gets the processorName.
|
long |
getTotalMemory()
Gets the total memory in MB.
|
long |
getTotalMemorySwap()
Gets the total memory swap.
|
long |
getUsedMemory()
Gets the used memory.
|
double |
getUsedMemoryPercentage()
Returns the used memory in %.
|
long |
getUsedMemorySwap()
Gets the use memory swap.
|
void |
measureLoadOfSystem()
Measures load of the system, by using the OSHI functionalities.
|
void |
setCPU_Usage(double cpuUsage)
Sets the CPU usage.
|
void |
setFreeMemory(long freeMemory)
Sets the free memory.
|
void |
setFreeMemorySwap(long freeMemorySwap)
Sets the free memory swap.
|
void |
setMhz(long mhz)
Sets the mhz.
|
void |
setNumberOfLogicalCPU(int totalCpu)
Sets the number of logical CPUs.
|
void |
setNumberOfPhysicalCPU(int totalCpu)
Sets the number of physical CPUs.
|
void |
setProcessorInformation()
Will set up the CPU information.
|
void |
setProcessorName(java.lang.String processorName)
Sets the processorName.
|
void |
setTotalMemory(long totalMemory)
Sets the total memory.
|
void |
setTotalMemorySwap(long totalMemorySwap)
Sets the total memory swap.
|
void |
setUsedMemory(long usedMemory)
Sets the used memory.
|
void |
setUsedMemorySwap(long usedMemorySwap)
Sets the use memory swap.
|
protected LoadMeasureOSHI clone()
clone
in class java.lang.Object
public void measureLoadOfSystem() throws java.lang.Exception
java.lang.Exception
- the exceptionpublic void setProcessorInformation()
SigarException
public void setProcessorName(java.lang.String processorName)
processorName
- the processorName to setpublic java.lang.String getProcessorName()
public void setMhz(long mhz)
mhz
- the mhz to setpublic long getMhz()
public void setNumberOfPhysicalCPU(int totalCpu)
totalCpu
- the new number of physical CPUspublic int getNumberOfPhysicalCPU()
public void setNumberOfLogicalCPU(int totalCpu)
totalCpu
- the new number of logical CPUspublic int getNumberOfLogicalCPU()
public void setCPU_Usage(double cpuUsage)
cpuUsage
- the new CPU usagepublic double getCPU_Usage()
public void setTotalMemory(long totalMemory)
totalMemory
- the totalMemory to setpublic long getTotalMemory()
public void setFreeMemory(long freeMemory)
freeMemory
- the freeMemory to setpublic long getFreeMemory()
public void setUsedMemory(long usedMemory)
usedMemory
- the usedMemory to setpublic long getUsedMemory()
public double getUsedMemoryPercentage()
public long getTotalMemorySwap()
public void setTotalMemorySwap(long totalMemorySwap)
totalMemorySwap
- the totalMemorySwap to setpublic long getFreeMemorySwap()
public void setFreeMemorySwap(long freeMemorySwap)
freeMemorySwap
- the freeMemorySwap to setpublic long getUsedMemorySwap()
public void setUsedMemorySwap(long usedMemorySwap)
usedMemorySwap
- the usedMemorySwap to set