aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Iedema <michael@kapsulate.com>2021-01-28 18:45:01 +0000
committerlaforge <laforge@osmocom.org>2021-01-30 14:15:16 +0000
commite3d0b939864ea75d3d15169d36cab6a952bb4f42 (patch)
treee8dd63be0dd930686eb81672b478167790201e0f
parent5e01039d79674171d20c5ea40266635a576eee56 (diff)
stats: Add granularity to chan:rf_fail stat.
Add additional counters to track TCH and SDCCH RF failures in separate subcategories. Change-Id: I91fe6659fe9df33763f4070b4f505561b2005d38
-rw-r--r--include/osmocom/bsc/bts.h2
-rw-r--r--src/osmo-bsc/abis_rsl.c11
-rw-r--r--src/osmo-bsc/bts.c6
3 files changed, 19 insertions, 0 deletions
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" },