aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/abis_rsl.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-05-24 09:30:28 +0200
committerHarald Welte <laforge@gnumonks.org>2019-05-24 09:12:57 +0000
commitbe86caacdfba412e60e2441e8a98fb4bd5c36e4e (patch)
tree7fb35cbd2cfcf72fc63693b7e62755b62f10c3f8 /src/osmo-bsc/abis_rsl.c
parent744886ae96d74cb60ef03bb209d46b250af54612 (diff)
keep per-BTS stat_items about RACH busy / RACH access percentage
Diffstat (limited to 'src/osmo-bsc/abis_rsl.c')
-rw-r--r--src/osmo-bsc/abis_rsl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 39fae505c..9db2115e5 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -1476,9 +1476,17 @@ static int rsl_rx_ccch_load(struct msgb *msg)
break;
case RSL_IE_RACH_LOAD:
if (msg->data_len >= 7) {
+ int32_t busy_percent, access_percent;
+ /* build data for signal */
sd.rach_slot_count = rslh->data[2] << 8 | rslh->data[3];
sd.rach_busy_count = rslh->data[4] << 8 | rslh->data[5];
sd.rach_access_count = rslh->data[6] << 8 | rslh->data[7];
+ /* update stats group */
+ busy_percent = (int32_t) sd.rach_busy_count * 100 / (int32_t) sd.rach_slot_count;
+ access_percent = (int32_t) sd.rach_access_count * 100 / (int32_t) sd.rach_slot_count;
+ osmo_stat_item_set(sd.bts->bts_statg->items[BTS_STAT_RACH_BUSY], busy_percent);
+ osmo_stat_item_set(sd.bts->bts_statg->items[BTS_STAT_RACH_ACCESS], access_percent);
+ /* dispatch signal */
osmo_signal_dispatch(SS_CCCH, S_CCCH_RACH_LOAD, &sd);
}
break;