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/.
ipse gerrit-no-reply at lists.osmocom.orgipse has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18093 ) Change subject: stats: Export connected OML/RSL links count per BTS and BSC. ...................................................................... stats: Export connected OML/RSL links count per BTS and BSC. Change-Id: I88c8025940a0eecb034b1c70f76ea17937fa0325 --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/bsc_init.c M src/osmo-bsc/bts_ipaccess_nanobts.c M src/osmo-bsc/gsm_data.c 4 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/93/18093/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index e85796c..9a8e002 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -1464,6 +1464,8 @@ BTS_STAT_T3122, BTS_STAT_RACH_BUSY, BTS_STAT_RACH_ACCESS, + BTS_STAT_NUM_OML_CONNECTED, + BTS_STAT_NUM_RSL_CONNECTED, }; enum { @@ -1556,6 +1558,8 @@ enum { BSC_STAT_MSC_LINK, + BSC_STAT_NUM_BTS_CONNECTED, + BSC_STAT_NUM_TRX_CONNECTED, }; struct gsm_tz { diff --git a/src/osmo-bsc/bsc_init.c b/src/osmo-bsc/bsc_init.c index 9d0ee86..0d58296 100644 --- a/src/osmo-bsc/bsc_init.c +++ b/src/osmo-bsc/bsc_init.c @@ -46,6 +46,8 @@ static const struct osmo_stat_item_desc bsc_stat_desc[] = { { "msc_link", "MSC link status.", "", 16, 0 }, + { "num_bts_connected", "Number of currently connected BTS (OML links).", "", 16, 0 }, + { "num_trx_connected", "Number of currently connected TRX (RSL links).", "", 16, 0 }, }; static const struct osmo_stat_item_group_desc bsc_statg_desc = { diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c index a5e697b..8b24857 100644 --- a/src/osmo-bsc/bts_ipaccess_nanobts.c +++ b/src/osmo-bsc/bts_ipaccess_nanobts.c @@ -397,6 +397,8 @@ LOG_TRX(trx, DLINP, LOGL_NOTICE, "Dropping RSL link: %s\n", reason); e1inp_sign_link_destroy(trx->rsl_link); trx->rsl_link = NULL; + osmo_stat_item_set(trx->bts->bts_statg->items[BTS_STAT_NUM_RSL_CONNECTED], 0); + osmo_stat_item_dec(trx->bts->network->bsc_statg->items[BSC_STAT_NUM_TRX_CONNECTED], 1); if (trx->bts->c0 == trx) paging_flush_bts(trx->bts, NULL); @@ -417,6 +419,8 @@ e1inp_sign_link_destroy(bts->oml_link); bts->oml_link = NULL; bts->uptime = 0; + osmo_stat_item_set(bts->bts_statg->items[BTS_STAT_NUM_OML_CONNECTED], 0); + osmo_stat_item_dec(bts->network->bsc_statg->items[BSC_STAT_NUM_BTS_CONNECTED], 1); /* we have issues reconnecting RSL, drop everything. */ llist_for_each_entry(trx, &bts->trx_list, list) @@ -558,6 +562,8 @@ sign_link->tei, sign_link->sapi); sign_link->trx->bts->ip_access.flags |= OML_UP; } + osmo_stat_item_set(bts->bts_statg->items[BTS_STAT_NUM_OML_CONNECTED], 1); + osmo_stat_item_inc(bts->network->bsc_statg->items[BSC_STAT_NUM_BTS_CONNECTED], 1); break; case E1INP_SIGN_RSL: { struct e1inp_ts *ts; @@ -585,6 +591,8 @@ sign_link->trx->bts->ip_access.flags |= (RSL_UP << sign_link->trx->nr); } + osmo_stat_item_set(bts->bts_statg->items[BTS_STAT_NUM_RSL_CONNECTED], 1); + osmo_stat_item_inc(bts->network->bsc_statg->items[BSC_STAT_NUM_TRX_CONNECTED], 1); break; } default: diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index f61335f..fd90e3a 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -390,6 +390,8 @@ { "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 }, + { "num_oml_connected", "Number of OML links connected", "", 16, 0 }, + { "num_rsl_connected", "Number of RSL links connected", "", 16, 0 }, }; static const struct osmo_stat_item_group_desc bts_statg_desc = { -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18093 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I88c8025940a0eecb034b1c70f76ea17937fa0325 Gerrit-Change-Number: 18093 Gerrit-PatchSet: 1 Gerrit-Owner: ipse <Alexander.Chemeris at gmail.com> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200506/30cb04ea/attachment.htm>