stat: add bts.N.num_trx:rsl_connected

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
This commit is contained in:
Neels Hofmeyr 2021-09-19 13:14:10 +02:00 committed by laforge
parent 5f1317ba91
commit 065ff875e9
3 changed files with 8 additions and 1 deletions

View File

@ -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,
};

View File

@ -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);

View File

@ -1301,7 +1301,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",
@ -1311,6 +1311,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",