corosync 3.1.7
totemstats.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017 Red Hat, Inc.
3 *
4 * Author: Christine Caulfield (ccaulfie@redhat.com)
5 *
6 * All rights reserved.
7 *
8 * This software licensed under BSD license, the text of which follows:
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions are met:
12 *
13 * - Redistributions of source code must retain the above copyright notice,
14 * this list of conditions and the following disclaimer.
15 * - Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 * - Neither the name of the MontaVista Software, Inc. nor the names of its
19 * contributors may be used to endorse or promote products derived from this
20 * software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
32 * THE POSSIBILITY OF SUCH DAMAGE.
33 */
34#ifndef TOTEMSTATS_H_DEFINED
35#define TOTEMSTATS_H_DEFINED
36
37typedef struct {
41
42typedef struct {
44 uint32_t iface_changes;
46
47typedef struct {
48 uint32_t rx;
49 uint32_t tx;
52
53typedef struct {
55 uint64_t orf_token_tx;
56 uint64_t orf_token_rx;
59 uint64_t memb_join_tx;
60 uint64_t memb_join_rx;
61 uint64_t mcast_tx;
62 uint64_t mcast_retx;
63 uint64_t mcast_rx;
80 uint64_t time_since_token_last_received; // relative time
81
83 uint32_t mtt_rx_token;
86
89#define TOTEM_TOKEN_STATS_MAX 100
91
93
94typedef struct {
97 uint32_t msg_reserved;
100
101
102extern int totemknet_link_get_status (
103 knet_node_id_t node, uint8_t link,
104 struct knet_link_status *status);
105
107 struct knet_handle_stats *stats);
108
109void stats_knet_add_member(knet_node_id_t nodeid, uint8_t link);
110
111void stats_knet_del_member(knet_node_id_t nodeid, uint8_t link);
112
113void stats_knet_add_handle(void);
114
115#define TOTEMPG_STATS_CLEAR_TOTEM 1
116#define TOTEMPG_STATS_CLEAR_TRANSPORT 2
117
118extern void totempg_stats_clear (int flags);
119
120#endif /* TOTEMSTATS_H_DEFINED */
unsigned int nodeid
Definition: coroapi.h:0
uint32_t flags
uint32_t iface_changes
Definition: totemstats.h:44
totem_stats_header_t hdr
Definition: totemstats.h:43
uint32_t msg_queue_avail
Definition: totemstats.h:98
totem_stats_header_t hdr
Definition: totemstats.h:95
totemsrp_stats_t * srp
Definition: totemstats.h:96
uint32_t msg_reserved
Definition: totemstats.h:97
uint64_t memb_join_tx
Definition: totemstats.h:59
uint32_t continuous_gather
Definition: totemstats.h:78
uint64_t recovery_entered
Definition: totemstats.h:74
totem_stats_header_t hdr
Definition: totemstats.h:54
uint64_t rx_msg_dropped
Definition: totemstats.h:77
uint64_t gather_entered
Definition: totemstats.h:70
uint64_t memb_commit_token_rx
Definition: totemstats.h:65
uint32_t avg_backlog_calc
Definition: totemstats.h:85
uint64_t mcast_retx
Definition: totemstats.h:62
uint64_t mcast_tx
Definition: totemstats.h:61
uint64_t memb_commit_token_tx
Definition: totemstats.h:64
uint64_t operational_token_lost
Definition: totemstats.h:69
uint64_t operational_entered
Definition: totemstats.h:68
uint64_t gather_token_lost
Definition: totemstats.h:71
uint64_t commit_token_lost
Definition: totemstats.h:73
uint64_t token_hold_cancel_tx
Definition: totemstats.h:66
uint64_t orf_token_rx
Definition: totemstats.h:56
uint32_t continuous_sendmsg_failures
Definition: totemstats.h:79
uint64_t recovery_token_lost
Definition: totemstats.h:75
uint64_t commit_entered
Definition: totemstats.h:72
uint64_t memb_merge_detect_rx
Definition: totemstats.h:58
uint8_t firewall_enabled_or_nic_failure
Definition: totemstats.h:82
uint32_t avg_token_workload
Definition: totemstats.h:84
uint64_t memb_join_rx
Definition: totemstats.h:60
uint64_t orf_token_tx
Definition: totemstats.h:55
uint32_t mtt_rx_token
Definition: totemstats.h:83
uint64_t memb_merge_detect_tx
Definition: totemstats.h:57
uint64_t mcast_rx
Definition: totemstats.h:63
uint64_t time_since_token_last_received
Definition: totemstats.h:80
uint64_t token_hold_cancel_rx
Definition: totemstats.h:67
uint64_t consensus_timeouts
Definition: totemstats.h:76
void stats_knet_add_handle(void)
Definition: stats.c:753
int totemknet_handle_get_stats(struct knet_handle_stats *stats)
Definition: totemknet.c:1855
#define TOTEM_TOKEN_STATS_MAX
Definition: totemstats.h:89
void stats_knet_del_member(knet_node_id_t nodeid, uint8_t link)
Definition: stats.c:740
int totemknet_link_get_status(knet_node_id_t node, uint8_t link, struct knet_link_status *status)
Definition: totemknet.c:1818
void totempg_stats_clear(int flags)
Definition: totempg.c:1576
void stats_knet_add_member(knet_node_id_t nodeid, uint8_t link)
Definition: stats.c:730