pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bsc/+/30277 )
Change subject: paging: Introduce BTS stat paging:request_queue_length
......................................................................
paging: Introduce BTS stat paging:request_queue_length
This allows tracking each BTS active paging request queue length over
time, and evaluate CPU load based on the number of active paging
requests queued.
Related: SYS#6200
Change-Id: I6d296cdeba1392ef95fc31f6c04210c73f1b23e5
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/bts.c
M src/osmo-bsc/paging.c
3 files changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/77/30277/1
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index e191fc5..4f1abe3 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -228,6 +228,7 @@
BTS_STAT_TS_BORKEN,
BTS_STAT_NUM_TRX_RSL_CONNECTED,
BTS_STAT_NUM_TRX_TOTAL,
+ BTS_STAT_PAGING_REQ_QUEUE_LENGTH,
BTS_STAT_PAGING_T3113,
};
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 0bd5d4a..e604ce4 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -1043,6 +1043,7 @@
osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg,
BTS_STAT_CHAN_OSMO_DYN_USED), 0);
osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg,
BTS_STAT_CHAN_OSMO_DYN_TOTAL), 0);
osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg,
BTS_STAT_PAGING_T3113), 0);
+ osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg,
BTS_STAT_PAGING_REQ_QUEUE_LENGTH), paging_pending_requests_nr(bts));
}
const struct rate_ctr_desc bts_ctr_description[] = {
@@ -1694,6 +1695,10 @@
{ "num_trx:total",
"Number of configured TRX in this BTS",
"" },
+ [BTS_STAT_PAGING_REQ_QUEUE_LENGTH] = \
+ { "paging:request_queue_length",
+ "Paging Request queue length",
+ "", 60, 0 },
[BTS_STAT_PAGING_T3113] = \
{ "paging:t3113",
"T3113 paging timer",
diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c
index d7e18c7..704a795 100644
--- a/src/osmo-bsc/paging.c
+++ b/src/osmo-bsc/paging.c
@@ -89,6 +89,7 @@
osmo_timer_del(&to_be_deleted->T3113);
llist_del(&to_be_deleted->entry);
paging_bts->pending_requests_len--;
+ osmo_stat_item_dec(osmo_stat_item_group_get_item(to_be_deleted->bts->bts_statg,
BTS_STAT_PAGING_REQ_QUEUE_LENGTH), 1);
bsc_subscr_remove_active_paging_request(to_be_deleted->bsub, to_be_deleted);
talloc_free(to_be_deleted);
if (llist_empty(&paging_bts->pending_requests))
@@ -466,6 +467,7 @@
bsc_subscr_add_active_paging_request(req->bsub, req);
bts_entry->pending_requests_len++;
+ osmo_stat_item_inc(osmo_stat_item_group_get_item(bts->bts_statg,
BTS_STAT_PAGING_REQ_QUEUE_LENGTH), 1);
/* there's no initial req (attempts==0), add to the start of the list */
if (last_initial_req == NULL)
llist_add(&req->entry, &bts_entry->pending_requests);
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/30277
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I6d296cdeba1392ef95fc31f6c04210c73f1b23e5
Gerrit-Change-Number: 30277
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange