octoi: add new counter every time a connection is accepted

This adds a new [rate] counter "e1oip:connect_accepted" that increments
every time the connection is accepted for both server and client role.

The rate is not really interesting, it's more the total absolute
quantity that's interesting.  Plotting the delta will give us spikes
whenever the connection is re-established.

Change-Id: I8baac768289f7e01d943f5205afa824f367a3a61
This commit is contained in:
Harald Welte 2022-04-20 12:26:43 +02:00
parent d13e6a5eb9
commit 916afa4476
4 changed files with 4 additions and 0 deletions

View File

@ -50,6 +50,7 @@ static const struct rate_ctr_desc iline_ctr_description[] = {
[LINE_CTR_E1oIP_E1O_OVERFLOW] = { "e1oip:e1o_overflow", "Frames overflowed in IP->E1 direction"},
[LINE_CTR_E1oIP_RX_OUT_OF_ORDER] = { "e1oip:rx:pkt_out_of_order", "Packets out-of-order in IP->E1 direction"},
[LINE_CTR_E1oIP_RX_OUT_OF_WIN] = { "e1oip:rx:pkt_out_of_win", "Packets out-of-rx-window in IP->E1 direction"},
[LINE_CTR_E1oIP_CONNECT_ACCEPT] = { "e1oip:connect_accepted", "OCTOI connections entering accepted state" },
};
static const struct rate_ctr_group_desc iline_ctrg_desc = {

View File

@ -22,6 +22,7 @@ enum e1oip_line_ctr {
LINE_CTR_E1oIP_E1O_OVERFLOW,
LINE_CTR_E1oIP_RX_OUT_OF_ORDER,
LINE_CTR_E1oIP_RX_OUT_OF_WIN,
LINE_CTR_E1oIP_CONNECT_ACCEPT,
};
enum e1oip_line_stat {

View File

@ -118,6 +118,7 @@ static void clnt_st_accepted_onenter(struct osmo_fsm_inst *fi, uint32_t prev_sta
/* reset RIFO/FIFO etc. */
e1oip_line_reset(st->peer->iline);
iline_ctr_add(st->peer->iline, LINE_CTR_E1oIP_CONNECT_ACCEPT, 1);
st->peer->tdm_permitted = true;
osmo_timer_schedule(&st->rx_alive_timer, 3, 0);

View File

@ -171,6 +171,7 @@ static void srv_st_accepted_onenter(struct osmo_fsm_inst *fi, uint32_t prev_stat
/* reset RIFO/FIFO etc. */
e1oip_line_reset(st->peer->iline);
iline_ctr_add(st->peer->iline, LINE_CTR_E1oIP_CONNECT_ACCEPT, 1);
st->peer->tdm_permitted = true;
osmo_timer_schedule(&st->rx_alive_timer, 3, 0);