corosync 3.1.7
|
#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" |
Variables | |
struct cs_stats_conv | cs_pg_stats [] |
struct cs_stats_conv | cs_srp_stats [] |
struct cs_stats_conv | cs_knet_stats [] |
struct cs_stats_conv | cs_knet_handle_stats [] |
struct cs_stats_conv | cs_ipcs_conn_stats [] |
struct cs_stats_conv | cs_ipcs_global_stats [] |
struct cs_stats_conv | cs_schedmiss_stats [] |
#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" | ) |
QB_LIST_DECLARE | ( | stats_tracker_list_head | ) |
void stats_add_schedmiss_event | ( | uint64_t | timestamp, |
float | delay | ||
) |
Definition at line 447 of file stats.c.
References ICMAP_KEYNAME_MAXLEN, MAX_SCHEDMISS_EVENTS, and param.
void stats_ipcs_add_connection | ( | int | service_id, |
uint32_t | pid, | ||
void * | ptr | ||
) |
Definition at line 765 of file stats.c.
References cs_ipcs_conn_stats, ICMAP_KEYNAME_MAXLEN, NUM_IPCSC_STATS, and param.
void stats_ipcs_del_connection | ( | int | service_id, |
uint32_t | pid, | ||
void * | ptr | ||
) |
Definition at line 775 of file stats.c.
References cs_ipcs_conn_stats, ICMAP_KEYNAME_MAXLEN, NUM_IPCSC_STATS, and param.
void stats_knet_add_handle | ( | void | ) |
Definition at line 753 of file stats.c.
References cs_knet_handle_stats, ICMAP_KEYNAME_MAXLEN, NUM_KNET_HANDLE_STATS, and param.
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_NOT_EXIST, nodeid, stats_map, and cs_stats_conv::type.
Referenced by stats_map_track_add(), and stats_trigger_trackers().
cs_error_t stats_map_init | ( | const struct corosync_api_v1 * | corosync_api | ) |
int stats_map_is_key_ro | ( | const char * | key_name | ) |
Definition at line 525 of file stats.c.
References 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_ipcs_clear_stats(), 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, cs_stats_tracker::events, ICMAP_TRACK_ADD, ICMAP_TRACK_DELETE, ICMAP_TRACK_PREFIX, cs_stats_tracker::key_name, cs_stats_tracker::notify_fn, cs_stats_tracker::old_value, stats_map, stats_map_get(), type, cs_stats_tracker::user_data, 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_stats_tracker::events, ICMAP_TRACK_ADD, ICMAP_TRACK_DELETE, cs_stats_tracker::key_name, and stats_map.
void * stats_map_track_get_user_data | ( | icmap_track_t | icmap_track | ) |
Definition at line 722 of file stats.c.
References cs_stats_tracker::user_data.
void stats_trigger_trackers | ( | void | ) |
Definition at line 561 of file stats.c.
References CS_OK, icmap_notify_value::data, cs_stats_tracker::events, ICMAP_TRACK_MODIFY, ICMAP_TRACK_PREFIX, cs_stats_tracker::key_name, icmap_notify_value::len, cs_stats_tracker::notify_fn, cs_stats_tracker::old_value, stats_map_get(), icmap_notify_value::type, type, cs_stats_tracker::user_data, 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[] |
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[] |
struct cs_stats_conv cs_schedmiss_stats[] |
struct cs_stats_conv cs_srp_stats[] |