corosync 3.1.9
|
#include <config.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdint.h>
#include <stddef.h>
#include <unistd.h>
#include <libknet.h>
#include <qb/qblist.h>
#include <qb/qbipcs.h>
#include <qb/qbipc_common.h>
#include <corosync/corodefs.h>
#include <corosync/coroapi.h>
#include <corosync/logsys.h>
#include <corosync/icmap.h>
#include <corosync/totem/totemstats.h>
#include "util.h"
#include "ipcs_stats.h"
#include "stats.h"
Go to the source code of this file.
Data Structures | |
struct | schedmiss_entry |
struct | cs_stats_conv |
struct | stats_item |
struct | cs_stats_tracker |
Macros | |
#define | MAX_SCHEDMISS_EVENTS 10 |
#define | SCHEDMISS_PREFIX "stats.schedmiss" |
#define | NUM_PG_STATS (sizeof(cs_pg_stats) / sizeof(struct cs_stats_conv)) |
#define | NUM_SRP_STATS (sizeof(cs_srp_stats) / sizeof(struct cs_stats_conv)) |
#define | NUM_KNET_STATS (sizeof(cs_knet_stats) / sizeof(struct cs_stats_conv)) |
#define | NUM_KNET_HANDLE_STATS (sizeof(cs_knet_handle_stats) / sizeof(struct cs_stats_conv)) |
#define | NUM_IPCSC_STATS (sizeof(cs_ipcs_conn_stats) / sizeof(struct cs_stats_conv)) |
#define | NUM_IPCSG_STATS (sizeof(cs_ipcs_global_stats) / sizeof(struct cs_stats_conv)) |
#define | STATS_CLEAR "stats.clear." |
#define | STATS_CLEAR_KNET "stats.clear.knet" |
#define | STATS_CLEAR_IPC "stats.clear.ipc" |
#define | STATS_CLEAR_TOTEM "stats.clear.totem" |
#define | STATS_CLEAR_ALL "stats.clear.all" |
#define | STATS_CLEAR_SCHEDMISS "stats.clear.schedmiss" |
#define NUM_IPCSC_STATS (sizeof(cs_ipcs_conn_stats) / sizeof(struct cs_stats_conv)) |
#define NUM_IPCSG_STATS (sizeof(cs_ipcs_global_stats) / sizeof(struct cs_stats_conv)) |
#define NUM_KNET_HANDLE_STATS (sizeof(cs_knet_handle_stats) / sizeof(struct cs_stats_conv)) |
#define NUM_KNET_STATS (sizeof(cs_knet_stats) / sizeof(struct cs_stats_conv)) |
#define NUM_PG_STATS (sizeof(cs_pg_stats) / sizeof(struct cs_stats_conv)) |
#define NUM_SRP_STATS (sizeof(cs_srp_stats) / sizeof(struct cs_stats_conv)) |
LOGSYS_DECLARE_SUBSYS | ( | "STATS" | ) |
References stats_map.
QB_LIST_DECLARE | ( | stats_tracker_list_head | ) |
Definition at line 447 of file stats.c.
References cs_schedmiss_stats, schedmiss_entry::delay, ICMAP_KEYNAME_MAXLEN, MAX_SCHEDMISS_EVENTS, nodeid, param, SCHEDMISS_PREFIX, and schedmiss_entry::timestamp.
Definition at line 765 of file stats.c.
References cs_ipcs_conn_stats, ICMAP_KEYNAME_MAXLEN, nodeid, NUM_IPCSC_STATS, and param.
Definition at line 775 of file stats.c.
References cs_ipcs_conn_stats, ICMAP_KEYNAME_MAXLEN, nodeid, NUM_IPCSC_STATS, and param.
Definition at line 753 of file stats.c.
References cs_knet_handle_stats, ICMAP_KEYNAME_MAXLEN, nodeid, NUM_KNET_HANDLE_STATS, and param.
Referenced by totemknet_initialize().
void stats_knet_add_member | ( | knet_node_id_t | nodeid, |
uint8_t | link_no | ||
) |
Definition at line 730 of file stats.c.
References cs_knet_stats, ICMAP_KEYNAME_MAXLEN, nodeid, NUM_KNET_STATS, and param.
Referenced by totemknet_member_add().
void stats_knet_del_member | ( | knet_node_id_t | nodeid, |
uint8_t | link_no | ||
) |
Definition at line 740 of file stats.c.
References cs_knet_stats, ICMAP_KEYNAME_MAXLEN, nodeid, NUM_KNET_STATS, and param.
Referenced by totemknet_member_remove().
cs_error_t stats_map_adjust_int | ( | const char * | key_name, |
int32_t | step | ||
) |
Definition at line 515 of file stats.c.
References CS_ERR_NOT_SUPPORTED.
cs_error_t stats_map_delete | ( | const char * | key_name | ) |
Definition at line 520 of file stats.c.
References CS_ERR_NOT_SUPPORTED.
cs_error_t stats_map_get | ( | const char * | key_name, |
void * | value, | ||
size_t * | value_len, | ||
icmap_value_types_t * | type | ||
) |
Definition at line 325 of file stats.c.
References stats_item::cs_conv, CS_ERR_LIBRARY, CS_ERR_NOT_EXIST, cs_ipcs_get_conn_stats(), cs_ipcs_get_global_stats(), CS_OK, ICMAP_VALUETYPE_FLOAT, ICMAP_VALUETYPE_UINT64, nodeid, SCHEDMISS_PREFIX, totempg_stats_t::srp, stats_map, corosync_api_v1::totem_get_stats, totemknet_handle_get_stats(), totemknet_link_get_status(), cs_stats_conv::type, type, and value.
Referenced by stats_map_track_add(), and stats_trigger_trackers().
cs_error_t stats_map_init | ( | const struct corosync_api_v1 * | corosync_api | ) |
Definition at line 289 of file stats.c.
References CS_ERR_INIT, cs_ipcs_global_stats, cs_pg_stats, cs_srp_stats, ICMAP_KEYNAME_MAXLEN, NUM_IPCSG_STATS, NUM_PG_STATS, NUM_SRP_STATS, param, qb_to_cs_error(), and stats_map.
Referenced by main().
Definition at line 525 of file stats.c.
References nodeid, and STATS_CLEAR.
void stats_map_iter_finalize | ( | icmap_iter_t | iter | ) |
icmap_iter_t stats_map_iter_init | ( | const char * | prefix | ) |
const char * stats_map_iter_next | ( | icmap_iter_t | iter, |
size_t * | value_len, | ||
icmap_value_types_t * | type | ||
) |
cs_error_t stats_map_set | ( | const char * | key_name, |
const void * | value, | ||
size_t | value_len, | ||
icmap_value_types_t | type | ||
) |
Definition at line 480 of file stats.c.
References CS_ERR_NOT_SUPPORTED, cs_ipcs_clear_stats(), CS_OK, nodeid, STATS_CLEAR_ALL, STATS_CLEAR_IPC, STATS_CLEAR_KNET, STATS_CLEAR_SCHEDMISS, STATS_CLEAR_TOTEM, totempg_stats_clear(), TOTEMPG_STATS_CLEAR_TOTEM, and TOTEMPG_STATS_CLEAR_TRANSPORT.
cs_error_t stats_map_track_add | ( | const char * | key_name, |
int32_t | track_type, | ||
icmap_notify_fn_t | notify_fn, | ||
void * | user_data, | ||
icmap_track_t * | icmap_track | ||
) |
Definition at line 637 of file stats.c.
References CS_ERR_NO_MEMORY, CS_ERR_NOT_SUPPORTED, CS_OK, ICMAP_TRACK_ADD, ICMAP_TRACK_DELETE, ICMAP_TRACK_PREFIX, icmap_tt_to_qbtt(), cs_stats_tracker::key_name, log_printf, LOGSYS_LEVEL_ERROR, nodeid, cs_stats_tracker::notify_fn, qb_to_cs_error(), stats_map, stats_map_get(), type, and user_data.
cs_error_t stats_map_track_delete | ( | icmap_track_t | icmap_track | ) |
Definition at line 700 of file stats.c.
References CS_OK, ICMAP_TRACK_ADD, ICMAP_TRACK_DELETE, icmap_tt_to_qbtt(), log_printf, LOGSYS_LEVEL_ERROR, nodeid, and stats_map.
void * stats_map_track_get_user_data | ( | icmap_track_t | icmap_track | ) |
Definition at line 722 of file stats.c.
References nodeid, and icmap_track::user_data.
Definition at line 561 of file stats.c.
References CS_OK, ICMAP_TRACK_MODIFY, ICMAP_TRACK_PREFIX, nodeid, stats_map_get(), type, and value.
struct cs_stats_conv cs_ipcs_conn_stats[] |
Definition at line 185 of file stats.c.
Referenced by stats_ipcs_add_connection(), and stats_ipcs_del_connection().
struct cs_stats_conv cs_ipcs_global_stats[] |
Definition at line 200 of file stats.c.
Referenced by stats_map_init().
struct cs_stats_conv cs_knet_handle_stats[] |
Definition at line 160 of file stats.c.
Referenced by stats_knet_add_handle().
struct cs_stats_conv cs_knet_stats[] |
Definition at line 119 of file stats.c.
Referenced by stats_knet_add_member(), and stats_knet_del_member().
struct cs_stats_conv cs_pg_stats[] |
Definition at line 82 of file stats.c.
Referenced by stats_map_init().
struct cs_stats_conv cs_schedmiss_stats[] |
Definition at line 204 of file stats.c.
Referenced by stats_add_schedmiss_event().
struct cs_stats_conv cs_srp_stats[] |
Definition at line 86 of file stats.c.
Referenced by stats_map_init().