FD.io VPP  v18.04-17-g3a0d853
Vector Packet Processing
stats.api
Go to the documentation of this file.
1 /*
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:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
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.
14  */
15 
16 /** \file
17 
18  This file defines the stats API
19 */
20 
21 option version = "1.0.0";
22 
23 import "vnet/interface.api";
24 
26  rpc want_stats
27  returns want_stats_reply;
28  rpc want_interface_simple_stats
29  returns want_interface_simple_stats_reply
31  rpc want_per_interface_simple_stats
32  returns want_per_interface_simple_stats_reply
34  rpc want_interface_combined_stats
35  returns want_interface_combined_stats_reply
37  rpc want_per_interface_combined_stats
38  returns want_per_interface_combined_stats_reply
40  rpc want_ip4_fib_stats
41  returns want_ip4_fib_stats_reply
43  rpc want_ip6_fib_stats
44  returns want_ip6_fib_stats_reply
46  rpc want_ip4_mfib_stats
47  returns want_ip4_mfib_stats_reply
49  rpc want_ip6_mfib_stats
50  returns want_ip6_mfib_stats_reply
52  rpc want_ip4_nbr_stats
53  returns want_ip4_nbr_stats_reply
55  rpc want_ip6_nbr_stats
56  returns want_ip6_nbr_stats_reply
58  rpc want_udp_encap_stats
59  returns want_udp_encap_stats_reply
61 };
62 
63 /** \brief Want Stats, enable/disable ALL stats updates
64  @param client_index - opaque cookie to identify the sender
65  @param context - sender context, to match reply w/ request
66  @param enable_disable - 1 = enable stats, 0 = disable
67  @param pid - pid of process requesting stats updates
68 */
69 autoreply define want_stats
70 {
75 };
76 
77 /** \brief Want Interface Simple Stats, register for detailed interface stats
78  @param client_index - opaque cookie to identify the sender
79  @param context - sender context, to match reply w/ request
80  @param enable_disable - 1 = enable stats, 0 = disable
81  @param pid - pid of process requesting stats updates
82 
83  Please consider using want_per_interface_simple_stats with sw_if_index=~0
84 */
85 autoreply define want_interface_simple_stats
86 {
91 };
92 
93 /** \brief Want Per Interface simple Stats, register for continuous stats
94  @param client_index - opaque cookie to identify the sender
95  @param context - sender context, to match reply w/ request
96  @param enable_disable - 1 = enable stats, 0 = disable
97  @param pid - pid of process requesting stats updates
98  @param num - number of sw_if_indexes
99  @param sw_ifs - array of sw_if_index
100 */
101 autoreply define want_per_interface_simple_stats
102 {
108  u32 sw_ifs[num];
109 
110 };
111 
112 /** \brief Want Interface Combined Stats, register for continuous stats
113  @param client_index - opaque cookie to identify the sender
114  @param context - sender context, to match reply w/ request
115  @param enable_disable - 1 = enable stats, 0 = disable
116  @param pid - pid of process requesting stats updates
117 
118  Please consider using want_per_interface_combined_stats with sw_if_index=~0
119 
120 */
121 autoreply define want_interface_combined_stats
122 {
127 };
128 
129 /** \brief Want Per Interface Combined Stats, register for continuous stats
130  @param client_index - opaque cookie to identify the sender
131  @param context - sender context, to match reply w/ request
132  @param enable_disable - 1 = enable stats, 0 = disable
133  @param pid - pid of process requesting stats updates
134  @param num - number of sw_if_indexes
135  @param sw_ifs - array of sw_if_index
136 */
137 autoreply define want_per_interface_combined_stats
138 {
144  u32 sw_ifs[num];
145 
146 };
147 
148 /** \brief Want IP4 FIB Stats, register for continuous stats
149  @param client_index - opaque cookie to identify the sender
150  @param context - sender context, to match reply w/ request
151  @param enable_disable - 1 = enable stats, 0 = disable
152  @param pid - pid of process requesting stats updates
153 */
154 autoreply define want_ip4_fib_stats
155 {
160 };
161 
162 /** \brief Want IP6 FIB Stats, register for continuous stats
163  @param client_index - opaque cookie to identify the sender
164  @param context - sender context, to match reply w/ request
165  @param enable_disable - 1 = enable stats, 0 = disable
166  @param pid - pid of process requesting stats updates
167 */
168 autoreply define want_ip6_fib_stats
169 {
174 };
175 
176 /** \brief Want IP4 muilticast FIB Stats, register for continuous stats
177  @param client_index - opaque cookie to identify the sender
178  @param context - sender context, to match reply w/ request
179  @param enable_disable - 1 = enable stats, 0 = disable
180  @param pid - pid of process requesting stats updates
181 */
182 autoreply define want_ip4_mfib_stats
183 {
188 };
189 
190 /** \brief Want IP6 multicast FIB Stats, register for continuous stats
191  @param client_index - opaque cookie to identify the sender
192  @param context - sender context, to match reply w/ request
193  @param enable_disable - 1 = enable stats, 0 = disable
194  @param pid - pid of process requesting stats updates
195 */
196 autoreply define want_ip6_mfib_stats
197 {
202 };
203 
204 /** \brief Want IP4 NBR Stats, register for continuous stats
205  @param client_index - opaque cookie to identify the sender
206  @param context - sender context, to match reply w/ request
207  @param enable_disable - 1 = enable stats, 0 = disable
208  @param pid - pid of process requesting stats updates
209 */
210 autoreply define want_ip4_nbr_stats
211 {
216 };
217 
218 /** \brief Want IP6 NBR Stats, register for continuous stats
219  @param client_index - opaque cookie to identify the sender
220  @param context - sender context, to match reply w/ request
221  @param enable_disable - 1 = enable stats, 0 = disable
222  @param pid - pid of process requesting stats updates
223 */
224 autoreply define want_ip6_nbr_stats
225 {
230 };
231 
232 typeonly manual_print manual_endian define ip4_fib_counter
233 {
238 };
239 
240 manual_print manual_endian define vnet_ip4_fib_counters
241 {
245 };
246 
247 typeonly manual_print manual_endian define ip4_mfib_counter
248 {
249  u8 source[4];
250  u8 group[4];
254 };
255 
256 manual_print manual_endian define vnet_ip4_mfib_counters
257 {
261 };
262 
263 typeonly manual_print manual_endian define ip4_nbr_counter
264 {
269 };
270 
271 /**
272  * @brief Per-neighbour (i.e. per-adjacency) coutners
273  * @param count The size of the array of counters
274  * @param sw_if_index The interface the adjacency is on
275  * @param begin Flag to indicate this is the first set of stats for this
276  * interface. If this flag is not set the it is a continuation of
277  * stats for this interface
278  * @param c counters
279  */
280 manual_print manual_endian define vnet_ip4_nbr_counters
281 {
286 };
287 
288 typeonly manual_print manual_endian define ip6_fib_counter
289 {
290  u64 address[2];
294 };
295 
296 manual_print manual_endian define vnet_ip6_fib_counters
297 {
301 };
302 
303 typeonly manual_print manual_endian define ip6_mfib_counter
304 {
305  u8 source[16];
306  u8 group[16];
310 };
311 
312 manual_print manual_endian define vnet_ip6_mfib_counters
313 {
317 };
318 
319 typeonly manual_print manual_endian define ip6_nbr_counter
320 {
321  u64 address[2];
325 };
326 
327 manual_print manual_endian define vnet_ip6_nbr_counters
328 {
333 };
334 
335 /** \brief Simple stats counters structure
336  @param vnet_counter_type- such as ip4, ip6, punts, etc
337  @param first_sw_if_index - first sw index in block of index, counts
338  @param count - number of counters, equal to the number of interfaces in
339  this stats block
340  @param data - contiguous block of u64 counters
341 
342  vnet_counter_type defined in enums - plural - in vnet/interface.h
343 */
344 manual_print manual_endian define vnet_interface_simple_counters
345 {
349  u64 data[count];
350 };
351 
352 /** \brief Combined stats counters structure
353  @param vnet_counter_type- such as ip4, ip6, punts, etc
354  @param first_sw_if_index - first sw index in block of index, counts
355  @param count - number of counters, equal to the number of interfaces in
356  this stats block
357  @param data - contiguous block of vlib_counter_t structures
358 
359  vnet_counter_type defined in enums - plural - in vnet/interface.h
360 */
361 manual_print manual_endian define vnet_interface_combined_counters
362 {
367 };
368 
369 /** \brief Simple per interface stats counters structure
370  @param count - number of elements in message
371  @param timestamp - u32 vlib timestamp for control plane
372  @param data[count] - vl_api_vnet_simple_counter_t
373 
374 */
375 manual_print manual_endian define vnet_per_interface_simple_counters
376 {
380 };
381 
382 /** \brief Combined stats counters structure per interface
383  @param count - number of elements in message
384  @param timestamp - u32 vlib timestamp for control plane
385  @param data[count] - vl_api_vnet_combined_counter_t
386 */
387 manual_print manual_endian define vnet_per_interface_combined_counters
388 {
392 };
393 
394 /** \brief Request for a single block of summary stats
395  @param client_index - opaque cookie to identify the sender
396  @param context - sender context, to match reply w/ request
397 */
398 define vnet_get_summary_stats
399 {
402 };
403 
404 /** \brief Reply for vnet_get_summary_stats request
405  @param context - sender context, to match reply w/ request
406  @param retval - return code for request
407  @param total_pkts -
408  @param total_bytes -
409  @param vector_rate -
410 */
411 define vnet_get_summary_stats_reply
412 {
415  u64 total_pkts[2];
416  u64 total_bytes[2];
418 };
419 
420 /** \brief Get delay between polling statistics
421  @param client_index - opaque cookie to identify the sender
422  @param context - sender context, to match reply w/ request
423 */
424 define stats_get_poller_delay
425 {
428 };
429 
430 /** \brief Get delay between polling statistics reply
431  @param context - sender context, to match reply w/ request
432  @param retval - return code for request
433  @param delay - poller delay
434 */
435 define stats_get_poller_delay_reply
436 {
440 };
441 
442 /** \brief Want UDP encap Stats, register for continuous stats
443  @param client_index - opaque cookie to identify the sender
444  @param context - sender context, to match reply w/ request
445  @param enable - 1 = enable stats, 0 = disable
446  @param pid - pid of process requesting stats updates
447 */
448 autoreply define want_udp_encap_stats
449 {
454 };
455 
456 /** \brief Stat for one UDP encap object
457  @param id - The ID of the object, same as passed for the create
458  @param packets - number of packets sent
459  @param bytes - number of bytes sent
460 */
461 typeonly manual_print manual_endian define udp_encap_counter
462 {
466 };
467 
468 manual_print manual_endian define vnet_udp_encap_counters
469 {
473 };
474 
475 /*
476  * Local Variables:
477  * eval: (c-set-style "gnu")
478  * End:
479  */
rpc want_per_interface_combined_stats returns want_per_interface_combined_stats_reply events vnet_per_interface_combined_counters
Definition: stats.api:39
rpc want_ip4_nbr_stats returns want_ip4_nbr_stats_reply events vnet_ip4_nbr_counters
Definition: stats.api:54
rpc want_per_interface_simple_stats returns want_per_interface_simple_stats_reply events vnet_per_interface_simple_counters
Definition: stats.api:33
int i32
Definition: types.h:81
unsigned long u64
Definition: types.h:89
rpc want_ip4_mfib_stats returns want_ip4_mfib_stats_reply events vnet_ip4_mfib_counters
Definition: stats.api:48
rpc want_ip4_fib_stats returns want_ip4_fib_stats_reply events vnet_ip4_fib_counters
Definition: stats.api:42
Stat for one UDP encap object.
Definition: stats.api:461
rpc want_ip6_nbr_stats returns want_ip6_nbr_stats_reply events vnet_ip6_nbr_counters
Definition: stats.api:57
rpc want_ip6_mfib_stats returns want_ip6_mfib_stats_reply events vnet_ip6_mfib_counters
Definition: stats.api:51
svmdb_client_t * c
option version
Definition: stats.api:21
unsigned int u32
Definition: types.h:88
Combined interface counter data type for vnet_interface_combined_counters.
Definition: interface.api:257
size_t count
Definition: vapi.c:42
double f64
Definition: types.h:142
unsigned char u8
Definition: types.h:56
service
Definition: stats.api:25
rpc want_interface_simple_stats returns want_interface_simple_stats_reply events vnet_interface_simple_counters
Definition: stats.api:30
rpc want_interface_combined_stats returns want_interface_combined_stats_reply events vnet_interface_combined_counters
Definition: stats.api:36
rpc want_udp_encap_stats returns want_udp_encap_stats_reply events vnet_udp_encap_counters
Definition: stats.api:60
Simple interface counter data type for vnet_interface_simple_counters.
Definition: interface.api:291
rpc want_ip6_fib_stats returns want_ip6_fib_stats_reply events vnet_ip6_fib_counters
Definition: stats.api:45