public final class ControlMetricsFactory extends Object
| Constructor and Description |
|---|
ControlMetricsFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAllControlMessageMetrics(Set<org.onosproject.net.DeviceId> deviceIds)
Adds control metrics for all devices.
|
void |
addControlMessageMetricsByDeviceId(org.onosproject.net.DeviceId deviceId)
Adds control metrics of a new device.
|
void |
addDiskMetricsByPartition(String partitionName)
Adds control metrics of a disk.
|
void |
addNetworkMetricsByInterface(String interfaceName)
Adds control metrics of a ethernet interface.
|
MetricsAggregator |
cpuIdleTime()
Returns CPU idle time metric aggregator.
|
MetricsAggregator |
cpuLoadMetric()
Returns CPU load metric aggregator.
|
MetricsAggregator |
diskReadBytes(String resourceName)
Returns disk read bytes metric aggregator.
|
MetricsAggregator |
diskWriteBytes(String resourceName)
Returns disk write bytes metric aggregator.
|
Map<org.onosproject.net.DeviceId,MetricsAggregator> |
flowmodPacket()
Returns flow-mod packet metric aggregator of all devices.
|
MetricsAggregator |
flowmodPacket(org.onosproject.net.DeviceId deviceId)
Returns flow-mod packet metric aggregator of a specified device.
|
Map<org.onosproject.net.DeviceId,MetricsAggregator> |
flowrmvPacket()
Returns flow-removed packet metric aggregator of all devices.
|
MetricsAggregator |
flowrmvPacket(org.onosproject.net.DeviceId deviceId)
Returns flow-removed packet metric aggregator of a specified device.
|
Set<org.onosproject.net.DeviceId> |
getDeviceIds()
Returns all device identifiers.
|
Set<String> |
getDiskPartitions()
Returns all disk partition names.
|
static ControlMetricsFactory |
getInstance()
Returns an instance of control metrics factory.
|
Set<String> |
getNetworkInterfaces()
Returns all network interface names.
|
Map<org.onosproject.net.DeviceId,MetricsAggregator> |
inboundPacket()
Returns inbound packet metric aggregator of all devices.
|
MetricsAggregator |
inboundPacket(org.onosproject.net.DeviceId deviceId)
Returns inbound packet metric aggregator of a specified device.
|
void |
initialization(org.onlab.metrics.MetricsService metricsService,
org.onosproject.net.device.DeviceService deviceService)
Initializes the control metrics factory instance using the given
metric service and device service.
|
boolean |
isMonitor()
Returns monitoring status.
|
MetricsAggregator |
memoryFreeRatio()
Returns free memory ratio metric aggregator.
|
MetricsAggregator |
memoryUsedRatio()
Returns used memory ratio metric aggregator.
|
MetricsAggregator |
nwIncomingBytes(String interfaceName)
Returns incoming bytes metric aggregator.
|
MetricsAggregator |
nwIncomingPackets(String interfaceName)
Returns incoming packets metric aggregator.
|
MetricsAggregator |
nwOutgoingBytes(String interfaceName)
Returns outgoing bytes metric aggregator.
|
MetricsAggregator |
nwOutgoingPackets(String interfaceName)
Returns outgoing packets metric aggregator.
|
Map<org.onosproject.net.DeviceId,MetricsAggregator> |
outboundPacket()
Returns outgoing packet metric aggregator of all devices.
|
MetricsAggregator |
outboundPacket(org.onosproject.net.DeviceId deviceId)
Returns outbound packet metric aggregator of a specified device.
|
protected void |
registerMetrics()
Registers new control metrics.
|
void |
removeControlMessageMetricsByDeviceId(org.onosproject.net.DeviceId deviceId)
Removes control metrics of an existing device.
|
void |
removeDiskMetricsByResourceName(String partitionName)
Removes control metrics of a disk.
|
void |
removeNetworkInterfacesByResourceName(String interfaceName)
Removes control metrics of a network interface.
|
Map<org.onosproject.net.DeviceId,MetricsAggregator> |
replyPacket()
Returns reply packet metric aggregator of all devices.
|
MetricsAggregator |
replyPacket(org.onosproject.net.DeviceId deviceId)
Returns reply packet metric aggregator of a specified device.
|
Map<org.onosproject.net.DeviceId,MetricsAggregator> |
requestPacket()
Returns request packet metric aggregator of all devices.
|
MetricsAggregator |
requestPacket(org.onosproject.net.DeviceId deviceId)
Returns request packet metric aggregator of a specified device.
|
protected void |
startMonitor()
Enable control plane monitoring.
|
protected void |
stopMonitor()
Disable control plane monitoring.
|
MetricsAggregator |
sysCpuTimeMetric()
Returns system CPU time metric aggregator.
|
MetricsAggregator |
totalCpuTimeMetric()
Returns total CPU time metric aggregator.
|
protected void |
unregisterMetrics()
Unregisters all control metrics.
|
MetricsAggregator |
userCpuTime()
Returns user CPU time metric aggregator.
|
public void initialization(org.onlab.metrics.MetricsService metricsService,
org.onosproject.net.device.DeviceService deviceService)
metricsService - metric servicedeviceService - device servicepublic void addControlMessageMetricsByDeviceId(org.onosproject.net.DeviceId deviceId)
deviceId - device identifierpublic void addDiskMetricsByPartition(String partitionName)
partitionName - disk partition namepublic void addNetworkMetricsByInterface(String interfaceName)
interfaceName - network interface namepublic void removeControlMessageMetricsByDeviceId(org.onosproject.net.DeviceId deviceId)
deviceId - device identifierpublic void removeDiskMetricsByResourceName(String partitionName)
partitionName - disk partition namepublic void removeNetworkInterfacesByResourceName(String interfaceName)
interfaceName - network interface namepublic Set<org.onosproject.net.DeviceId> getDeviceIds()
public Set<String> getDiskPartitions()
public Set<String> getNetworkInterfaces()
public void addAllControlMessageMetrics(Set<org.onosproject.net.DeviceId> deviceIds)
deviceIds - a set of device identifierspublic boolean isMonitor()
protected void startMonitor()
protected void stopMonitor()
protected void registerMetrics()
protected void unregisterMetrics()
public MetricsAggregator cpuLoadMetric()
public MetricsAggregator totalCpuTimeMetric()
public MetricsAggregator sysCpuTimeMetric()
public MetricsAggregator userCpuTime()
public MetricsAggregator cpuIdleTime()
public MetricsAggregator memoryFreeRatio()
public MetricsAggregator memoryUsedRatio()
public MetricsAggregator diskReadBytes(String resourceName)
resourceName - name of disk resourcepublic MetricsAggregator diskWriteBytes(String resourceName)
resourceName - name of disk resourcepublic MetricsAggregator nwIncomingBytes(String interfaceName)
interfaceName - name of network interfacepublic MetricsAggregator nwOutgoingBytes(String interfaceName)
interfaceName - name of network interfacepublic MetricsAggregator nwIncomingPackets(String interfaceName)
interfaceName - name of network interfacepublic MetricsAggregator nwOutgoingPackets(String interfaceName)
interfaceName - name of network interfacepublic Map<org.onosproject.net.DeviceId,MetricsAggregator> inboundPacket()
public Map<org.onosproject.net.DeviceId,MetricsAggregator> outboundPacket()
public Map<org.onosproject.net.DeviceId,MetricsAggregator> flowmodPacket()
public Map<org.onosproject.net.DeviceId,MetricsAggregator> flowrmvPacket()
public Map<org.onosproject.net.DeviceId,MetricsAggregator> requestPacket()
public Map<org.onosproject.net.DeviceId,MetricsAggregator> replyPacket()
public MetricsAggregator inboundPacket(org.onosproject.net.DeviceId deviceId)
deviceId - device identifierpublic MetricsAggregator outboundPacket(org.onosproject.net.DeviceId deviceId)
deviceId - device identifierpublic MetricsAggregator flowmodPacket(org.onosproject.net.DeviceId deviceId)
deviceId - device identifierpublic MetricsAggregator flowrmvPacket(org.onosproject.net.DeviceId deviceId)
deviceId - device identifierpublic MetricsAggregator requestPacket(org.onosproject.net.DeviceId deviceId)
deviceId - device identifierpublic MetricsAggregator replyPacket(org.onosproject.net.DeviceId deviceId)
deviceId - device identifierpublic static ControlMetricsFactory getInstance()
Copyright © 2016. All rights reserved.