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;
58 rpc want_udp_encap_stats
59 returns want_udp_encap_stats_reply
60 events vnet_udp_encap_counters;
62 returns map_stats_segment_reply;
65 /** \brief Want Stats, enable/disable ALL stats updates
66 @param client_index - opaque cookie to identify the sender
67 @param context - sender context, to match reply w/ request
68 @param enable_disable - 1 = enable stats, 0 = disable
69 @param pid - pid of process requesting stats updates
71 autoreply define want_stats
79 /** \brief Want Interface Simple Stats, register for detailed interface stats
80 @param client_index - opaque cookie to identify the sender
81 @param context - sender context, to match reply w/ request
82 @param enable_disable - 1 = enable stats, 0 = disable
83 @param pid - pid of process requesting stats updates
85 Please consider using want_per_interface_simple_stats with sw_if_index=~0
87 autoreply define want_interface_simple_stats
95 /** \brief Want Per Interface simple Stats, register for continuous stats
96 @param client_index - opaque cookie to identify the sender
97 @param context - sender context, to match reply w/ request
98 @param enable_disable - 1 = enable stats, 0 = disable
99 @param pid - pid of process requesting stats updates
100 @param num - number of sw_if_indexes
101 @param sw_ifs - array of sw_if_index
103 autoreply define want_per_interface_simple_stats
114 /** \brief Want Interface Combined Stats, register for continuous stats
115 @param client_index - opaque cookie to identify the sender
116 @param context - sender context, to match reply w/ request
117 @param enable_disable - 1 = enable stats, 0 = disable
118 @param pid - pid of process requesting stats updates
120 Please consider using want_per_interface_combined_stats with sw_if_index=~0
123 autoreply define want_interface_combined_stats
131 /** \brief Want Per Interface Combined Stats, register for continuous stats
132 @param client_index - opaque cookie to identify the sender
133 @param context - sender context, to match reply w/ request
134 @param enable_disable - 1 = enable stats, 0 = disable
135 @param pid - pid of process requesting stats updates
136 @param num - number of sw_if_indexes
137 @param sw_ifs - array of sw_if_index
139 autoreply define want_per_interface_combined_stats
150 /** \brief Want IP4 FIB Stats, register for continuous stats
151 @param client_index - opaque cookie to identify the sender
152 @param context - sender context, to match reply w/ request
153 @param enable_disable - 1 = enable stats, 0 = disable
154 @param pid - pid of process requesting stats updates
156 autoreply define want_ip4_fib_stats
164 /** \brief Want IP6 FIB Stats, register for continuous stats
165 @param client_index - opaque cookie to identify the sender
166 @param context - sender context, to match reply w/ request
167 @param enable_disable - 1 = enable stats, 0 = disable
168 @param pid - pid of process requesting stats updates
170 autoreply define want_ip6_fib_stats
178 /** \brief Want IP4 muilticast FIB Stats, register for continuous stats
179 @param client_index - opaque cookie to identify the sender
180 @param context - sender context, to match reply w/ request
181 @param enable_disable - 1 = enable stats, 0 = disable
182 @param pid - pid of process requesting stats updates
184 autoreply define want_ip4_mfib_stats
192 /** \brief Want IP6 multicast FIB Stats, register for continuous stats
193 @param client_index - opaque cookie to identify the sender
194 @param context - sender context, to match reply w/ request
195 @param enable_disable - 1 = enable stats, 0 = disable
196 @param pid - pid of process requesting stats updates
198 autoreply define want_ip6_mfib_stats
206 /** \brief Want IP4 NBR Stats, register for continuous stats
207 @param client_index - opaque cookie to identify the sender
208 @param context - sender context, to match reply w/ request
209 @param enable_disable - 1 = enable stats, 0 = disable
210 @param pid - pid of process requesting stats updates
212 autoreply define want_ip4_nbr_stats
220 /** \brief Want IP6 NBR Stats, register for continuous stats
221 @param client_index - opaque cookie to identify the sender
222 @param context - sender context, to match reply w/ request
223 @param enable_disable - 1 = enable stats, 0 = disable
224 @param pid - pid of process requesting stats updates
226 autoreply define want_ip6_nbr_stats
234 typeonly manual_print manual_endian define ip4_fib_counter
242 manual_print manual_endian define vnet_ip4_fib_counters
246 vl_api_ip4_fib_counter_t c[count];
249 typeonly manual_print manual_endian define ip4_mfib_counter
258 manual_print manual_endian define vnet_ip4_mfib_counters
262 vl_api_ip4_mfib_counter_t c[count];
265 typeonly manual_print manual_endian define ip4_nbr_counter
274 * @brief Per-neighbour (i.e. per-adjacency) coutners
275 * @param count The size of the array of counters
276 * @param sw_if_index The interface the adjacency is on
277 * @param begin Flag to indicate this is the first set of stats for this
278 * interface. If this flag is not set the it is a continuation of
279 * stats for this interface
282 manual_print manual_endian define vnet_ip4_nbr_counters
287 vl_api_ip4_nbr_counter_t c[count];
290 typeonly manual_print manual_endian define ip6_fib_counter
298 manual_print manual_endian define vnet_ip6_fib_counters
302 vl_api_ip6_fib_counter_t c[count];
305 typeonly manual_print manual_endian define ip6_mfib_counter
314 manual_print manual_endian define vnet_ip6_mfib_counters
318 vl_api_ip6_mfib_counter_t c[count];
321 typeonly manual_print manual_endian define ip6_nbr_counter
329 manual_print manual_endian define vnet_ip6_nbr_counters
334 vl_api_ip6_nbr_counter_t c[count];
337 /** \brief Simple stats counters structure
338 @param vnet_counter_type- such as ip4, ip6, punts, etc
339 @param first_sw_if_index - first sw index in block of index, counts
340 @param count - number of counters, equal to the number of interfaces in
342 @param data - contiguous block of u64 counters
344 vnet_counter_type defined in enums - plural - in vnet/interface.h
346 manual_print manual_endian define vnet_interface_simple_counters
348 u8 vnet_counter_type;
349 u32 first_sw_if_index;
354 /** \brief Combined stats counters structure
355 @param vnet_counter_type- such as ip4, ip6, punts, etc
356 @param first_sw_if_index - first sw index in block of index, counts
357 @param count - number of counters, equal to the number of interfaces in
359 @param data - contiguous block of vlib_counter_t structures
361 vnet_counter_type defined in enums - plural - in vnet/interface.h
363 manual_print manual_endian define vnet_interface_combined_counters
365 u8 vnet_counter_type;
366 u32 first_sw_if_index;
368 vl_api_vlib_counter_t data[count];
371 /** \brief Simple per interface stats counters structure
372 @param count - number of elements in message
373 @param timestamp - u32 vlib timestamp for control plane
374 @param data[count] - vl_api_vnet_simple_counter_t
377 manual_print manual_endian define vnet_per_interface_simple_counters
381 vl_api_vnet_simple_counter_t data[count];
384 /** \brief Combined stats counters structure per interface
385 @param count - number of elements in message
386 @param timestamp - u32 vlib timestamp for control plane
387 @param data[count] - vl_api_vnet_combined_counter_t
389 manual_print manual_endian define vnet_per_interface_combined_counters
393 vl_api_vnet_combined_counter_t data[count];
396 /** \brief Request for a single block of summary stats
397 @param client_index - opaque cookie to identify the sender
398 @param context - sender context, to match reply w/ request
400 define vnet_get_summary_stats
406 /** \brief Reply for vnet_get_summary_stats request
407 @param context - sender context, to match reply w/ request
408 @param retval - return code for request
413 define vnet_get_summary_stats_reply
422 /** \brief Get delay between polling statistics
423 @param client_index - opaque cookie to identify the sender
424 @param context - sender context, to match reply w/ request
426 define stats_get_poller_delay
432 /** \brief Get delay between polling statistics reply
433 @param context - sender context, to match reply w/ request
434 @param retval - return code for request
435 @param delay - poller delay
437 define stats_get_poller_delay_reply
444 /** \brief Want UDP encap Stats, register for continuous stats
445 @param client_index - opaque cookie to identify the sender
446 @param context - sender context, to match reply w/ request
447 @param enable - 1 = enable stats, 0 = disable
448 @param pid - pid of process requesting stats updates
450 autoreply define want_udp_encap_stats
458 /** \brief Stat for one UDP encap object
459 @param id - The ID of the object, same as passed for the create
460 @param packets - number of packets sent
461 @param bytes - number of bytes sent
463 typeonly manual_print manual_endian define udp_encap_counter
470 manual_print manual_endian define vnet_udp_encap_counters
474 vl_api_udp_encap_counter_t c[count];
477 autoreply define map_stats_segment
486 * eval: (c-set-style "gnu")