From 732021070fa0c731896ab3e29f802d3834c72ab7 Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Fri, 31 Aug 2018 00:29:48 +0200 Subject: STATS: Python binding to access VPP statistics and counters. from vpp_papi.vpp_stats import VPPStats s = VPPStats(socketname='/var/run/stats.sock') c = s.ls('/if/rx') counters = s.dump(c) print(s.set_error_str()) Change-Id: I203ebe60b0c9ee5742aadc737c0f29051757959d Signed-off-by: Ole Troan --- src/vpp-api/client/stat_client.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/vpp-api/client/stat_client.h') diff --git a/src/vpp-api/client/stat_client.h b/src/vpp-api/client/stat_client.h index 5f076686fdd..73e91b1881b 100644 --- a/src/vpp-api/client/stat_client.h +++ b/src/vpp-api/client/stat_client.h @@ -42,16 +42,15 @@ typedef struct int stat_segment_connect (char *socket_name); void stat_segment_disconnect (void); - u8 **stat_segment_ls (u8 ** pattern); stat_segment_data_t *stat_segment_dump (u8 ** counter_vec); - stat_segment_cached_pointer_t *stat_segment_register (u8 ** counter_vec); -stat_segment_data_t *stat_segment_collect (stat_segment_cached_pointer_t *); /* Collects registered counters */ - +/* Collects registered counters */ +stat_segment_data_t *stat_segment_collect (stat_segment_cached_pointer_t *); void stat_segment_data_free (stat_segment_data_t * res); - f64 stat_segment_heartbeat (void); +u8 **stat_segment_string_vector (u8 ** string_vector, char *string); +int stat_segment_vec_len (void *vec); #endif /* included_stat_client_h */ -- cgit 1.2.3-korg