totemstats.h
Go to the documentation of this file.
/*
* Copyright (c) 2017 Red Hat, Inc.
*
* Author: Christine Caulfield (ccaulfie@redhat.com)
*
* All rights reserved.
*
* This software licensed under BSD license, the text of which follows:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither the name of the MontaVista Software, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef TOTEMSTATS_H_DEFINED
#define TOTEMSTATS_H_DEFINED
typedef struct {
int is_dirty;
time_t last_updated;
} totem_stats_header_t;
typedef struct {
totem_stats_header_t hdr;
uint32_t iface_changes;
} totemnet_stats_t;
typedef struct {
uint32_t rx;
uint32_t tx;
int backlog_calc;
} totemsrp_token_stats_t;
typedef struct {
totem_stats_header_t hdr;
uint64_t orf_token_tx;
uint64_t orf_token_rx;
uint64_t memb_merge_detect_tx;
uint64_t memb_merge_detect_rx;
uint64_t memb_join_tx;
uint64_t memb_join_rx;
uint64_t mcast_tx;
uint64_t mcast_retx;
uint64_t mcast_rx;
uint64_t memb_commit_token_tx;
uint64_t memb_commit_token_rx;
uint64_t token_hold_cancel_tx;
uint64_t token_hold_cancel_rx;
uint64_t operational_entered;
uint64_t operational_token_lost;
uint64_t gather_entered;
uint64_t gather_token_lost;
uint64_t commit_entered;
uint64_t commit_token_lost;
uint64_t recovery_entered;
uint64_t recovery_token_lost;
uint64_t consensus_timeouts;
uint64_t rx_msg_dropped;
uint32_t continuous_gather;
uint32_t continuous_sendmsg_failures;
uint64_t time_since_token_last_received; // relative time
uint8_t firewall_enabled_or_nic_failure;
uint32_t mtt_rx_token;
uint32_t avg_token_workload;
uint32_t avg_backlog_calc;
int earliest_token;
int latest_token;
#define TOTEM_TOKEN_STATS_MAX 100
totemsrp_token_stats_t token[TOTEM_TOKEN_STATS_MAX];
} totemsrp_stats_t;
typedef struct {
totem_stats_header_t hdr;
totemsrp_stats_t *srp;
uint32_t msg_reserved;
uint32_t msg_queue_avail;
} totempg_stats_t;
extern int totemknet_link_get_status (
knet_node_id_t node, uint8_t link,
struct knet_link_status *status);
int totemknet_handle_get_stats (
struct knet_handle_stats *stats);
void stats_knet_add_member(knet_node_id_t nodeid, uint8_t link);
void stats_knet_del_member(knet_node_id_t nodeid, uint8_t link);
void stats_knet_add_handle(void);
#define TOTEMPG_STATS_CLEAR_TOTEM 1
#define TOTEMPG_STATS_CLEAR_TRANSPORT 2
extern void totempg_stats_clear (int flags);
#endif /* TOTEMSTATS_H_DEFINED */
nodeid
unsigned int nodeid
Definition coroapi.h:0
flags
uint32_t flags
Definition exec/votequorum.c:4
totem_stats_header_t
Definition totemstats.h:37
totem_stats_header_t::is_dirty
int is_dirty
Definition totemstats.h:38
totem_stats_header_t::last_updated
time_t last_updated
Definition totemstats.h:39
totemnet_stats_t
Definition totemstats.h:42
totemnet_stats_t::iface_changes
uint32_t iface_changes
Definition totemstats.h:44
totemnet_stats_t::hdr
totem_stats_header_t hdr
Definition totemstats.h:43
totempg_stats_t
Definition totemstats.h:94
totempg_stats_t::msg_queue_avail
uint32_t msg_queue_avail
Definition totemstats.h:98
totempg_stats_t::hdr
totem_stats_header_t hdr
Definition totemstats.h:95
totempg_stats_t::srp
totemsrp_stats_t * srp
Definition totemstats.h:96
totempg_stats_t::msg_reserved
uint32_t msg_reserved
Definition totemstats.h:97
totemsrp_stats_t
Definition totemstats.h:53
totemsrp_stats_t::memb_join_tx
uint64_t memb_join_tx
Definition totemstats.h:59
totemsrp_stats_t::continuous_gather
uint32_t continuous_gather
Definition totemstats.h:78
totemsrp_stats_t::recovery_entered
uint64_t recovery_entered
Definition totemstats.h:74
totemsrp_stats_t::hdr
totem_stats_header_t hdr
Definition totemstats.h:54
totemsrp_stats_t::rx_msg_dropped
uint64_t rx_msg_dropped
Definition totemstats.h:77
totemsrp_stats_t::gather_entered
uint64_t gather_entered
Definition totemstats.h:70
totemsrp_stats_t::memb_commit_token_rx
uint64_t memb_commit_token_rx
Definition totemstats.h:65
totemsrp_stats_t::avg_backlog_calc
uint32_t avg_backlog_calc
Definition totemstats.h:85
totemsrp_stats_t::mcast_retx
uint64_t mcast_retx
Definition totemstats.h:62
totemsrp_stats_t::mcast_tx
uint64_t mcast_tx
Definition totemstats.h:61
totemsrp_stats_t::memb_commit_token_tx
uint64_t memb_commit_token_tx
Definition totemstats.h:64
totemsrp_stats_t::operational_token_lost
uint64_t operational_token_lost
Definition totemstats.h:69
totemsrp_stats_t::operational_entered
uint64_t operational_entered
Definition totemstats.h:68
totemsrp_stats_t::gather_token_lost
uint64_t gather_token_lost
Definition totemstats.h:71
totemsrp_stats_t::commit_token_lost
uint64_t commit_token_lost
Definition totemstats.h:73
totemsrp_stats_t::token_hold_cancel_tx
uint64_t token_hold_cancel_tx
Definition totemstats.h:66
totemsrp_stats_t::orf_token_rx
uint64_t orf_token_rx
Definition totemstats.h:56
totemsrp_stats_t::continuous_sendmsg_failures
uint32_t continuous_sendmsg_failures
Definition totemstats.h:79
totemsrp_stats_t::recovery_token_lost
uint64_t recovery_token_lost
Definition totemstats.h:75
totemsrp_stats_t::commit_entered
uint64_t commit_entered
Definition totemstats.h:72
totemsrp_stats_t::memb_merge_detect_rx
uint64_t memb_merge_detect_rx
Definition totemstats.h:58
totemsrp_stats_t::earliest_token
int earliest_token
Definition totemstats.h:87
totemsrp_stats_t::firewall_enabled_or_nic_failure
uint8_t firewall_enabled_or_nic_failure
Definition totemstats.h:82
totemsrp_stats_t::avg_token_workload
uint32_t avg_token_workload
Definition totemstats.h:84
totemsrp_stats_t::memb_join_rx
uint64_t memb_join_rx
Definition totemstats.h:60
totemsrp_stats_t::orf_token_tx
uint64_t orf_token_tx
Definition totemstats.h:55
totemsrp_stats_t::mtt_rx_token
uint32_t mtt_rx_token
Definition totemstats.h:83
totemsrp_stats_t::memb_merge_detect_tx
uint64_t memb_merge_detect_tx
Definition totemstats.h:57
totemsrp_stats_t::latest_token
int latest_token
Definition totemstats.h:88
totemsrp_stats_t::mcast_rx
uint64_t mcast_rx
Definition totemstats.h:63
totemsrp_stats_t::time_since_token_last_received
uint64_t time_since_token_last_received
Definition totemstats.h:80
totemsrp_stats_t::token_hold_cancel_rx
uint64_t token_hold_cancel_rx
Definition totemstats.h:67
totemsrp_stats_t::consensus_timeouts
uint64_t consensus_timeouts
Definition totemstats.h:76
totemsrp_token_stats_t
Definition totemstats.h:47
totemsrp_token_stats_t::tx
uint32_t tx
Definition totemstats.h:49
totemsrp_token_stats_t::rx
uint32_t rx
Definition totemstats.h:48
totemsrp_token_stats_t::backlog_calc
int backlog_calc
Definition totemstats.h:50
stats_knet_add_handle
void stats_knet_add_handle(void)
Definition stats.c:753
totemknet_handle_get_stats
int totemknet_handle_get_stats(struct knet_handle_stats *stats)
Definition totemknet.c:1855
TOTEM_TOKEN_STATS_MAX
#define TOTEM_TOKEN_STATS_MAX
Definition totemstats.h:89
stats_knet_del_member
void stats_knet_del_member(knet_node_id_t nodeid, uint8_t link)
Definition stats.c:740
totemknet_link_get_status
int totemknet_link_get_status(knet_node_id_t node, uint8_t link, struct knet_link_status *status)
Definition totemknet.c:1818
totempg_stats_clear
void totempg_stats_clear(int flags)
Definition totempg.c:1576
stats_knet_add_member
void stats_knet_add_member(knet_node_id_t nodeid, uint8_t link)
Definition stats.c:730