Change in osmo-bsc[master]: keep per-BTS stat_items about RACH busy / RACH access percentage

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri May 24 08:50:43 UTC 2019


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14163


Change subject: keep per-BTS stat_items about RACH busy / RACH access percentage
......................................................................

keep per-BTS stat_items about RACH busy / RACH access percentage

Change-Id: I3ad0cc4866d6210181cbafbab876e8028ad27540
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/gsm_data.c
3 files changed, 12 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/63/14163/1

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 68c95e1..82bd238 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -1378,6 +1378,8 @@
 enum {
 	BTS_STAT_CHAN_LOAD_AVERAGE,
 	BTS_STAT_T3122,
+	BTS_STAT_RACH_BUSY,
+	BTS_STAT_RACH_ACCESS,
 };
 
 enum {
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 39fae50..9db2115 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -1476,9 +1476,17 @@
 		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;
diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index 88690a7..5942fba 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -380,6 +380,8 @@
 static const struct osmo_stat_item_desc bts_stat_desc[] = {
 	{ "chanloadavg", "Channel load average.", "%", 16, 0 },
 	{ "T3122", "T3122 IMMEDIATE ASSIGNMENT REJECT wait indicator.", "s", 16, GSM_T3122_DEFAULT },
+	{ "rach_busy", "RACH slots with signal above threshold", "%", 16, 0 },
+	{ "rach_access", "RACH slots with access bursts in them", "%", 16, 0 },
 };
 
 static const struct osmo_stat_item_group_desc bts_statg_desc = {

-- 
To view, visit https://gerrit.osmocom.org/14163
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ad0cc4866d6210181cbafbab876e8028ad27540
Gerrit-Change-Number: 14163
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190524/95d4cacf/attachment.htm>


More information about the gerrit-log mailing list