From e3d0b939864ea75d3d15169d36cab6a952bb4f42 Mon Sep 17 00:00:00 2001 From: Michael Iedema Date: Thu, 28 Jan 2021 18:45:01 +0000 Subject: stats: Add granularity to chan:rf_fail stat. Add additional counters to track TCH and SDCCH RF failures in separate subcategories. Change-Id: I91fe6659fe9df33763f4070b4f505561b2005d38 --- include/osmocom/bsc/bts.h | 2 ++ src/osmo-bsc/abis_rsl.c | 11 +++++++++++ src/osmo-bsc/bts.c | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index 8f3e05bdd..b81f45fb2 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -28,6 +28,8 @@ enum bts_counter_id { BTS_CTR_CHREQ_SUCCESSFUL, BTS_CTR_CHREQ_NO_CHANNEL, BTS_CTR_CHAN_RF_FAIL, + BTS_CTR_CHAN_RF_FAIL_TCH, + BTS_CTR_CHAN_RF_FAIL_SDCCH, BTS_CTR_CHAN_RLL_ERR, BTS_CTR_BTS_OML_FAIL, BTS_CTR_BTS_RSL_FAIL, diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 388e2fc2a..9e00fe77a 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -982,6 +982,17 @@ static int rsl_rx_conn_fail(struct msgb *msg) LOG_LCHAN(lchan, LOGL_ERROR, "CONNECTION FAIL%s\n", rsl_cause_name(&tp)); rate_ctr_inc(&lchan->ts->trx->bts->bts_ctrs->ctr[BTS_CTR_CHAN_RF_FAIL]); + switch (lchan->type) { + case GSM_LCHAN_SDCCH: + rate_ctr_inc(&lchan->ts->trx->bts->bts_ctrs->ctr[BTS_CTR_CHAN_RF_FAIL_SDCCH]); + break; + case GSM_LCHAN_TCH_H: + case GSM_LCHAN_TCH_F: + rate_ctr_inc(&lchan->ts->trx->bts->bts_ctrs->ctr[BTS_CTR_CHAN_RF_FAIL_TCH]); + break; + default: + break; + } /* If the lchan is associated with a conn, we shall notify the MSC of the RSL Conn Failure, and * the connection will presumably be torn down and lead to an lchan release. During initial diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index 3fa4f24bc..ac0e2af35 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -791,6 +791,12 @@ const struct rate_ctr_desc bts_ctr_description[] = { [BTS_CTR_CHAN_RF_FAIL] = \ { "chan:rf_fail", "Received a RF failure indication from BTS" }, + [BTS_CTR_CHAN_RF_FAIL_TCH] = \ + { "chan:rf_fail_tch", + "Received a RF failure indication from BTS on a TCH channel" }, + [BTS_CTR_CHAN_RF_FAIL_SDCCH] = \ + { "chan:rf_fail_sdcch", + "Received a RF failure indication from BTS on an SDCCH channel" }, [BTS_CTR_CHAN_RLL_ERR] = \ { "chan:rll_err", "Received a RLL failure with T200 cause from BTS" }, -- cgit v1.2.3