2 * Copyright (c) 2015-2016 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
18 This file defines the stats API
21 option version = "1.0.0";
23 import "vnet/interface.api";
27 returns want_stats_reply;
28 rpc want_interface_simple_stats
29 returns want_interface_simple_stats_reply
30 events vnet_interface_simple_counters;
31 rpc want_per_interface_simple_stats
32 returns want_per_interface_simple_stats_reply
33 events vnet_per_interface_simple_counters;
34 rpc want_interface_combined_stats
35 returns want_interface_combined_stats_reply
36 events vnet_interface_combined_counters;
37 rpc want_per_interface_combined_stats
38 returns want_per_interface_combined_stats_reply
39 events vnet_per_interface_combined_counters;
40 rpc want_ip4_fib_stats
41 returns want_ip4_fib_stats_reply
42 events vnet_ip4_fib_counters;
43 rpc want_ip6_fib_stats
44 returns want_ip6_fib_stats_reply
45 events vnet_ip6_fib_counters;
46 rpc want_ip4_mfib_stats
47 returns want_ip4_mfib_stats_reply
48 events vnet_ip4_mfib_counters;
49 rpc want_ip6_mfib_stats
50 returns want_ip6_mfib_stats_reply
51 events vnet_ip6_mfib_counters;
52 rpc want_ip4_nbr_stats
53 returns want_ip4_nbr_stats_reply
54 events vnet_ip4_nbr_counters;
55 rpc want_ip6_nbr_stats
56 returns want_ip6_nbr_stats_reply
57 events vnet_ip6_nbr_counters;
60 /** \brief Want Stats, enable/disable ALL stats updates
61 @param client_index - opaque cookie to identify the sender
62 @param context - sender context, to match reply w/ request
63 @param enable_disable - 1 = enable stats, 0 = disable
64 @param pid - pid of process requesting stats updates
66 autoreply define want_stats
74 /** \brief Want Interface Simple Stats, register for detailed interface stats
75 @param client_index - opaque cookie to identify the sender
76 @param context - sender context, to match reply w/ request
77 @param enable_disable - 1 = enable stats, 0 = disable
78 @param pid - pid of process requesting stats updates
80 Please consider using want_per_interface_simple_stats with sw_if_index=~0
82 autoreply define want_interface_simple_stats
90 /** \brief Want Per Interface simple Stats, register for continuous stats
91 @param client_index - opaque cookie to identify the sender
92 @param context - sender context, to match reply w/ request
93 @param enable_disable - 1 = enable stats, 0 = disable
94 @param pid - pid of process requesting stats updates
95 @param num - number of sw_if_indexes
96 @param sw_ifs - array of sw_if_index
98 autoreply define want_per_interface_simple_stats
109 /** \brief Want Interface Combined Stats, register for continuous stats
110 @param client_index - opaque cookie to identify the sender
111 @param context - sender context, to match reply w/ request
112 @param enable_disable - 1 = enable stats, 0 = disable
113 @param pid - pid of process requesting stats updates
115 Please consider using want_per_interface_combined_stats with sw_if_index=~0
118 autoreply define want_interface_combined_stats
126 /** \brief Want Per Interface Combined Stats, register for continuous stats
127 @param client_index - opaque cookie to identify the sender
128 @param context - sender context, to match reply w/ request
129 @param enable_disable - 1 = enable stats, 0 = disable
130 @param pid - pid of process requesting stats updates
131 @param num - number of sw_if_indexes
132 @param sw_ifs - array of sw_if_index
134 autoreply define want_per_interface_combined_stats
145 /** \brief Want IP4 FIB Stats, register for continuous stats
146 @param client_index - opaque cookie to identify the sender
147 @param context - sender context, to match reply w/ request
148 @param enable_disable - 1 = enable stats, 0 = disable
149 @param pid - pid of process requesting stats updates
151 autoreply define want_ip4_fib_stats
159 /** \brief Want IP6 FIB Stats, register for continuous stats
160 @param client_index - opaque cookie to identify the sender
161 @param context - sender context, to match reply w/ request
162 @param enable_disable - 1 = enable stats, 0 = disable
163 @param pid - pid of process requesting stats updates
165 autoreply define want_ip6_fib_stats
173 /** \brief Want IP4 muilticast FIB Stats, register for continuous stats
174 @param client_index - opaque cookie to identify the sender
175 @param context - sender context, to match reply w/ request
176 @param enable_disable - 1 = enable stats, 0 = disable
177 @param pid - pid of process requesting stats updates
179 autoreply define want_ip4_mfib_stats
187 /** \brief Want IP6 multicast FIB Stats, register for continuous stats
188 @param client_index - opaque cookie to identify the sender
189 @param context - sender context, to match reply w/ request
190 @param enable_disable - 1 = enable stats, 0 = disable
191 @param pid - pid of process requesting stats updates
193 autoreply define want_ip6_mfib_stats
201 /** \brief Want IP4 NBR Stats, register for continuous stats
202 @param client_index - opaque cookie to identify the sender
203 @param context - sender context, to match reply w/ request
204 @param enable_disable - 1 = enable stats, 0 = disable
205 @param pid - pid of process requesting stats updates
207 autoreply define want_ip4_nbr_stats
215 /** \brief Want IP6 NBR Stats, register for continuous stats
216 @param client_index - opaque cookie to identify the sender
217 @param context - sender context, to match reply w/ request
218 @param enable_disable - 1 = enable stats, 0 = disable
219 @param pid - pid of process requesting stats updates
221 autoreply define want_ip6_nbr_stats
229 typeonly manual_print manual_endian define ip4_fib_counter
237 manual_print manual_endian define vnet_ip4_fib_counters
241 vl_api_ip4_fib_counter_t c[count];
244 typeonly manual_print manual_endian define ip4_mfib_counter
253 manual_print manual_endian define vnet_ip4_mfib_counters
257 vl_api_ip4_mfib_counter_t c[count];
260 typeonly manual_print manual_endian define ip4_nbr_counter
269 * @brief Per-neighbour (i.e. per-adjacency) coutners
270 * @param count The size of the array of counters
271 * @param sw_if_index The interface the adjacency is on
272 * @param begin Flag to indicate this is the first set of stats for this
273 * interface. If this flag is not set the it is a continuation of
274 * stats for this interface
277 manual_print manual_endian define vnet_ip4_nbr_counters
282 vl_api_ip4_nbr_counter_t c[count];
285 typeonly manual_print manual_endian define ip6_fib_counter
293 manual_print manual_endian define vnet_ip6_fib_counters
297 vl_api_ip6_fib_counter_t c[count];
300 typeonly manual_print manual_endian define ip6_mfib_counter
309 manual_print manual_endian define vnet_ip6_mfib_counters
313 vl_api_ip6_mfib_counter_t c[count];
316 typeonly manual_print manual_endian define ip6_nbr_counter
324 manual_print manual_endian define vnet_ip6_nbr_counters
329 vl_api_ip6_nbr_counter_t c[count];
332 /** \brief Simple stats counters structure
333 @param vnet_counter_type- such as ip4, ip6, punts, etc
334 @param first_sw_if_index - first sw index in block of index, counts
335 @param count - number of counters, equal to the number of interfaces in
337 @param data - contiguous block of u64 counters
339 vnet_counter_type defined in enums - plural - in vnet/interface.h
341 manual_print manual_endian define vnet_interface_simple_counters
343 u8 vnet_counter_type;
344 u32 first_sw_if_index;
349 /** \brief Combined stats counters structure
350 @param vnet_counter_type- such as ip4, ip6, punts, etc
351 @param first_sw_if_index - first sw index in block of index, counts
352 @param count - number of counters, equal to the number of interfaces in
354 @param data - contiguous block of vlib_counter_t structures
356 vnet_counter_type defined in enums - plural - in vnet/interface.h
358 manual_print manual_endian define vnet_interface_combined_counters
360 u8 vnet_counter_type;
361 u32 first_sw_if_index;
363 vl_api_vlib_counter_t data[count];
366 /** \brief Simple per interface stats counters structure
367 @param count - number of elements in message
368 @param timestamp - u32 vlib timestamp for control plane
369 @param data[count] - vl_api_vnet_simple_counter_t
372 manual_print manual_endian define vnet_per_interface_simple_counters
376 vl_api_vnet_simple_counter_t data[count];
379 /** \brief Combined stats counters structure per interface
380 @param count - number of elements in message
381 @param timestamp - u32 vlib timestamp for control plane
382 @param data[count] - vl_api_vnet_combined_counter_t
384 manual_print manual_endian define vnet_per_interface_combined_counters
388 vl_api_vnet_combined_counter_t data[count];
391 /** \brief Request for a single block of summary stats
392 @param client_index - opaque cookie to identify the sender
393 @param context - sender context, to match reply w/ request
395 define vnet_get_summary_stats
401 /** \brief Reply for vnet_get_summary_stats request
402 @param context - sender context, to match reply w/ request
403 @param retval - return code for request
408 define vnet_get_summary_stats_reply
417 /** \brief Get delay between polling statistics
418 @param client_index - opaque cookie to identify the sender
419 @param context - sender context, to match reply w/ request
421 define stats_get_poller_delay
427 /** \brief Get delay between polling statistics reply
428 @param context - sender context, to match reply w/ request
429 @param retval - return code for request
430 @param delay - poller delay
432 define stats_get_poller_delay_reply
441 * eval: (c-set-style "gnu")