aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2021-09-19 13:14:10 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2021-09-20 15:04:11 +0200
commit4d336b9eeab18f59ff4ec4489b22d91ffe2d9a65 (patch)
treea0a57fea16d5064adafb095614038862aa562999
parent49c810cac823954a0312a74e7f636197fcca9486 (diff)
stat: add bts.N.num_trx:rsl_connectedneels/conn_stats
Controversy: this duplicates bts.N.rsl_connected. I would like to add this duplication for consistency, since we now have these counters: bsc.0.num_trx:rsl_connected bsc.0.num_trx:total bts.N.num_trx:total and the old bts.N.rsl_connected which does not fit well with above naming scheme. Any user will be justified to expect a stat named bts.N.num_trx:rsl_connected as well. Determine bts.N.num_trx:rsl_connected in the new function bsc_update_connection_stats(), where the other num_trx:* are set. Related: SYS#5542 Related: I5be1cb470930354c4561cbed301bc50a32484ed9 (osmo-ttcn3-hacks) Depends: I137992a5479fc39bbceb6c6c2af9c227bd33b39b (libosmocore) Change-Id: I55b55159fe13d937e441d8c2ed915734463e1154
-rw-r--r--include/osmocom/bsc/bts.h1
-rw-r--r--src/osmo-bsc/bsc_stats.c2
-rw-r--r--src/osmo-bsc/bts.c6
3 files changed, 8 insertions, 1 deletions
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index f09d06848..68654f2cc 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -175,6 +175,7 @@ enum {
BTS_STAT_RSL_CONNECTED,
BTS_STAT_LCHAN_BORKEN,
BTS_STAT_TS_BORKEN,
+ BTS_STAT_NUM_TRX_RSL_CONNECTED,
BTS_STAT_NUM_TRX_TOTAL,
};
diff --git a/src/osmo-bsc/bsc_stats.c b/src/osmo-bsc/bsc_stats.c
index 3b96fedf2..717680956 100644
--- a/src/osmo-bsc/bsc_stats.c
+++ b/src/osmo-bsc/bsc_stats.c
@@ -162,6 +162,8 @@ void bsc_update_connection_stats(struct gsm_network *net)
trx_rsl_connected++;
}
+ osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_NUM_TRX_RSL_CONNECTED),
+ trx_rsl_connected);
osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_NUM_TRX_TOTAL),
num_trx);
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 86fa82330..1b80ef6f6 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -1303,7 +1303,7 @@ const struct osmo_stat_item_desc bts_stat_desc[] = {
"", 16, 0 },
[BTS_STAT_RSL_CONNECTED] = \
{ "rsl_connected",
- "Number of RSL links connected",
+ "Number of RSL links connected (same as num_trx:rsl_connected)",
"", 16, 0 },
[BTS_STAT_LCHAN_BORKEN] = \
{ "lchan_borken",
@@ -1313,6 +1313,10 @@ const struct osmo_stat_item_desc bts_stat_desc[] = {
{ "ts_borken",
"Number of timeslots in the BORKEN state",
"", 16, 0 },
+ [BTS_STAT_NUM_TRX_RSL_CONNECTED] =
+ { "num_trx:rsl_connected",
+ "Number of TRX in this BTS where RSL is up",
+ "" },
[BTS_STAT_NUM_TRX_TOTAL] =
{ "num_trx:total",
"Number of configured TRX in this BTS",