blob: c713d012fd2e46aaaab71771cb14efff32ace950 [file] [log] [blame]
Georgios Katsikas83600982017-05-28 20:41:45 +02001/*
2 * Copyright 2017-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.drivers.server.stats;
18
19import org.onosproject.net.device.PortStatistics;
20
21import java.util.Collection;
22
23/**
24 * Server statistics API.
25 */
26public interface MonitoringStatistics {
27
28 /**
29 * Returns timing statistics related to
30 * tasks requested by the controller.
31 *
32 * @return timing statistics
33 */
34 TimingStatistics timingStatistics();
35
36 /**
37 * Returns the CPU statistics of a server device.
38 * Includes the statistics of all CPUs.
39 *
40 * @return CPU statistics
41 */
42 Collection<CpuStatistics> cpuStatisticsAll();
43
44 /**
45 * Returns the statistics of a particular CPU
46 * of a server device.
47 *
48 * @param cpuId ID of the CPU
49 * @return CpuStatistics object for this CPU
50 */
51 CpuStatistics cpuStatistics(int cpuId);
52
53 /**
54 * Returns the NIC statistics of a server device.
55 * Includes the statistics of all NICs.
56 *
57 * @return set of PortStatistics
58 */
59 Collection<PortStatistics> nicStatisticsAll();
60
61 /**
62 * Returns the statistics of a particular NIC
63 * of a server device.
64 *
65 * @param nicId ID of the NIC
66 * @return PortStatistics object for this NIC
67 */
68 PortStatistics nicStatistics(int nicId);
69
70 /**
71 * Returns the number of CPUs being monitored.
72 *
73 * @return number of CPUs
74 */
75 int numberOfCpus();
76
77 /**
78 * Returns the number of NICs being monitored.
79 *
80 * @return number of NICs
81 */
82 int numberOfNics();
83
84}