|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
17 #ifndef included_stat_client_h
18 #define included_stat_client_h
20 #define STAT_VERSION_MAJOR 1
21 #define STAT_VERSION_MINOR 2
32 #define STAT_SEGMENT_SOCKET_FILE "/run/vpp/stats.sock"
33 #define STAT_SEGMENT_SOCKET_FILENAME "stats.sock"
93 static inline uint64_t
97 clock_gettime (CLOCK_REALTIME, &ts);
98 return 1e9 * ts.tv_sec + ts.tv_nsec;
106 if (p > csh && p +
sizeof (p) < csh + sm->
memory_size)
124 max_time = _time_now_nsec () + sm->
timeout;
125 while (shared_header->
in_progress != 0 && _time_now_nsec () < max_time)
138 return _time_now_nsec () < max_time ? 0 : -1;
char * stat_segment_index_to_name(uint32_t index)
stat_segment_directory_entry_t * directory_vector
stat_segment_data_t * stat_segment_dump_entry_r(uint32_t index, stat_client_main_t *sm)
counter_t ** simple_counter_vec
uint64_t stat_segment_version_r(stat_client_main_t *sm)
uint64_t stat_segment_version(void)
stat_client_main_t stat_client_main
int stat_segment_vec_len(void *vec)
void stat_segment_vec_free(void *vec)
stat_segment_data_t * stat_segment_dump(uint32_t *counter_vec)
vl_api_ikev2_sa_stats_t stats
void stat_segment_data_free(stat_segment_data_t *res)
static int stat_segment_access_start(stat_segment_access_t *sa, stat_client_main_t *sm)
static void stat_segment_set_timeout(uint64_t timeout)
static bool stat_segment_access_end(stat_segment_access_t *sa, stat_client_main_t *sm)
int stat_segment_connect(const char *socket_name)
Combined counter to hold both packets and byte differences.
stat_client_main_t * stat_client_get(void)
uint64_t counter_t
64bit counters
stat_segment_shared_header_t * shared_header
int stat_segment_connect_r(const char *socket_name, stat_client_main_t *sm)
stat_segment_data_t * stat_segment_dump_r(uint32_t *stats, stat_client_main_t *sm)
stat_segment_data_t * stat_segment_dump_entry(uint32_t index)
void stat_segment_disconnect(void)
double stat_segment_heartbeat(void)
uint32_t * stat_segment_ls_r(uint8_t **patterns, stat_client_main_t *sm)
double stat_segment_heartbeat_r(stat_client_main_t *sm)
uint32_t * stat_segment_ls(uint8_t **pattern)
char * stat_segment_index_to_name_r(uint32_t index, stat_client_main_t *sm)
static void stat_segment_set_timeout_nsec(stat_client_main_t *sm, uint64_t timeout)
vlib_counter_t ** combined_counter_vec
stat_directory_type_t type
static void * stat_segment_adjust(stat_client_main_t *sm, void *data)
void stat_segment_disconnect_r(stat_client_main_t *sm)
void stat_client_free(stat_client_main_t *sm)
uint8_t ** stat_segment_string_vector(uint8_t **string_vector, const char *string)