Package org.openspaces.admin.internal.os
Class DefaultOperatingSystemStatistics
java.lang.Object
org.openspaces.admin.internal.os.DefaultOperatingSystemStatistics
- All Implemented Interfaces:
OperatingSystemStatistics
- Author:
- kimchy
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openspaces.admin.os.OperatingSystemStatistics
OperatingSystemStatistics.NetworkStatistics -
Constructor Summary
ConstructorsConstructorDescriptionDefaultOperatingSystemStatistics(OSStatistics stats, OperatingSystemDetails details, OperatingSystemStatistics previousStats, int historySize, long timeDelta) -
Method Summary
Modifier and TypeMethodDescriptionlongdoubledoublelongdoubleReturns the percentage used of the actual physical memory out of the total physical memory.longReturns a timestamp that is in sync with where the admin API is running.doubleReturns the combined cpu perc (User + Sys + Nice + Wait)Returns the operating system details.longdoubledoublelongdoubledoubleReturns the network statistics per network device.doubleReturns the percentage used of physical memory out of the total physical memory space.Returns the previous statistics taken.doubleReturns the percentage used of swap space out of the total swap space.Returns the timeline (from newest to oldest) history statistics, including this one.longReturns the timestamp when the statistics were take.booleanisNA()Returnstrueif the statistics are not available.voidsetPreviousStats(OperatingSystemStatistics previosStats)
-
Constructor Details
-
DefaultOperatingSystemStatistics
public DefaultOperatingSystemStatistics() -
DefaultOperatingSystemStatistics
public DefaultOperatingSystemStatistics(OSStatistics stats, OperatingSystemDetails details, OperatingSystemStatistics previousStats, int historySize, long timeDelta)
-
-
Method Details
-
isNA
public boolean isNA()Description copied from interface:OperatingSystemStatisticsReturnstrueif the statistics are not available.- Specified by:
isNAin interfaceOperatingSystemStatistics
-
getTimeline
Description copied from interface:OperatingSystemStatisticsReturns the timeline (from newest to oldest) history statistics, including this one.- Specified by:
getTimelinein interfaceOperatingSystemStatistics
-
getTimestamp
public long getTimestamp()Description copied from interface:OperatingSystemStatisticsReturns the timestamp when the statistics were take.- Specified by:
getTimestampin interfaceOperatingSystemStatistics
-
getAdminTimestamp
public long getAdminTimestamp()Description copied from interface:OperatingSystemStatisticsReturns a timestamp that is in sync with where the admin API is running. Can return -1 if the clocks have are not sync yet.- Specified by:
getAdminTimestampin interfaceOperatingSystemStatistics
-
getDetails
Description copied from interface:OperatingSystemStatisticsReturns the operating system details.- Specified by:
getDetailsin interfaceOperatingSystemStatistics
-
getPrevious
Description copied from interface:OperatingSystemStatisticsReturns the previous statistics taken. Returnsnullif this is the fist one.- Specified by:
getPreviousin interfaceOperatingSystemStatistics
-
setPreviousStats
-
getFreeSwapSpaceSizeInBytes
public long getFreeSwapSpaceSizeInBytes()- Specified by:
getFreeSwapSpaceSizeInBytesin interfaceOperatingSystemStatistics
-
getFreeSwapSpaceSizeInMB
public double getFreeSwapSpaceSizeInMB()- Specified by:
getFreeSwapSpaceSizeInMBin interfaceOperatingSystemStatistics
-
getFreeSwapSpaceSizeInGB
public double getFreeSwapSpaceSizeInGB()- Specified by:
getFreeSwapSpaceSizeInGBin interfaceOperatingSystemStatistics
-
getSwapSpaceUsedPerc
public double getSwapSpaceUsedPerc()Description copied from interface:OperatingSystemStatisticsReturns the percentage used of swap space out of the total swap space.- Specified by:
getSwapSpaceUsedPercin interfaceOperatingSystemStatistics
-
getFreePhysicalMemorySizeInBytes
public long getFreePhysicalMemorySizeInBytes()- Specified by:
getFreePhysicalMemorySizeInBytesin interfaceOperatingSystemStatistics
-
getFreePhysicalMemorySizeInMB
public double getFreePhysicalMemorySizeInMB()- Specified by:
getFreePhysicalMemorySizeInMBin interfaceOperatingSystemStatistics
-
getFreePhysicalMemorySizeInGB
public double getFreePhysicalMemorySizeInGB()- Specified by:
getFreePhysicalMemorySizeInGBin interfaceOperatingSystemStatistics
-
getActualFreePhysicalMemorySizeInBytes
public long getActualFreePhysicalMemorySizeInBytes()- Specified by:
getActualFreePhysicalMemorySizeInBytesin interfaceOperatingSystemStatistics
-
getActualFreePhysicalMemorySizeInMB
public double getActualFreePhysicalMemorySizeInMB()- Specified by:
getActualFreePhysicalMemorySizeInMBin interfaceOperatingSystemStatistics
-
getActualFreePhysicalMemorySizeInGB
public double getActualFreePhysicalMemorySizeInGB()- Specified by:
getActualFreePhysicalMemorySizeInGBin interfaceOperatingSystemStatistics
-
getPhysicalMemoryUsedPerc
public double getPhysicalMemoryUsedPerc()Description copied from interface:OperatingSystemStatisticsReturns the percentage used of physical memory out of the total physical memory space. Uses the total free memory e.g. e.g. Linux plus cached.- Specified by:
getPhysicalMemoryUsedPercin interfaceOperatingSystemStatistics
-
getActualPhysicalMemoryUsedPerc
public double getActualPhysicalMemoryUsedPerc()Description copied from interface:OperatingSystemStatisticsReturns the percentage used of the actual physical memory out of the total physical memory.- Specified by:
getActualPhysicalMemoryUsedPercin interfaceOperatingSystemStatistics
-
getCpuPerc
public double getCpuPerc()Description copied from interface:OperatingSystemStatisticsReturns the combined cpu perc (User + Sys + Nice + Wait)- Specified by:
getCpuPercin interfaceOperatingSystemStatistics
-
getCpuPercFormatted
- Specified by:
getCpuPercFormattedin interfaceOperatingSystemStatistics
-
getActualMemoryUsed
public long getActualMemoryUsed()- Specified by:
getActualMemoryUsedin interfaceOperatingSystemStatistics- Returns:
- Actual Memory Used, in bytes
-
getNetworkStats
Description copied from interface:OperatingSystemStatisticsReturns the network statistics per network device.- Specified by:
getNetworkStatsin interfaceOperatingSystemStatistics
-