| Constructor and Description |
|---|
OshiPlatformCache(String feedId,
String machineId)
Creates the cache of OSHi platform data.
|
| Modifier and Type | Method and Description |
|---|---|
Map<PlatformPath,PlatformResourceNode> |
discoverResources(PlatformPath platformPath)
Helps with discovery of platform resources by obtaining all the resources of the given path.
|
Double |
getFileStoreMetric(String fileStoreNameName,
Name metricToCollect)
Returns the given metric's value, or null if there is no file store with the given name.
|
Map<String,oshi.software.os.OSFileStore> |
getFileStores() |
String |
getMachineId() |
oshi.hardware.GlobalMemory |
getMemory() |
Double |
getMemoryMetric(Name metricToCollect)
Returns the given memory metric's value.
|
Double |
getMetric(PlatformResourceNode node,
Name metricToCollect)
Given a platform resource node and a metric name, this will return that metric's value,
or null if there is no resource that can be identified by the node.
|
oshi.software.os.OperatingSystem |
getOperatingSystem() |
Double |
getOperatingSystemMetric(Name metricToCollect)
Returns the given OS metric's value.
|
Double |
getPowerSourceMetric(String powerSourceName,
Name metricToCollect)
Returns the given metric's value, or null if there is no power source with the given name.
|
Map<String,oshi.hardware.PowerSource> |
getPowerSources() |
oshi.hardware.CentralProcessor |
getProcessor() |
Double |
getProcessorMetric(String processorNumber,
Name metricToCollect)
Returns the given metric's value, or null if there is no processor with the given number.
|
void |
refresh()
Clears the cache of all OSHI data.
|
public OshiPlatformCache(String feedId, String machineId)
feedId - he feed IDmachineId - the machine ID - if null, one will be attempted to be discoveredUtil.getSystemId()public void refresh()
public oshi.software.os.OperatingSystem getOperatingSystem()
public Map<String,oshi.software.os.OSFileStore> getFileStores()
public oshi.hardware.GlobalMemory getMemory()
public oshi.hardware.CentralProcessor getProcessor()
public Map<String,oshi.hardware.PowerSource> getPowerSources()
public Double getPowerSourceMetric(String powerSourceName, Name metricToCollect)
powerSourceName - name of power sourcemetricToCollect - the metric to collectpublic Double getProcessorMetric(String processorNumber, Name metricToCollect)
processorNumber - number of the processor, as a StringmetricToCollect - the metric to collectpublic Double getFileStoreMetric(String fileStoreNameName, Name metricToCollect)
fileStoreNameName - name of file storemetricToCollect - the metric to collectpublic Double getMemoryMetric(Name metricToCollect)
metricToCollect - the metric to collectpublic Double getOperatingSystemMetric(Name metricToCollect)
metricToCollect - the metric to collectpublic Double getMetric(PlatformResourceNode node, Name metricToCollect)
node - identifies the platform resource whose metric is to be collectedmetricToCollect - the metric to collectpublic Map<PlatformPath,PlatformResourceNode> discoverResources(PlatformPath platformPath)
platformPath - the path of the resources to find.public String getMachineId()
Copyright © 2015–2016 Red Hat, Inc.. All rights reserved.