Change in osmo-bsc[master]: stats: add bsc.paging:expired

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/.

osmith gerrit-no-reply at lists.osmocom.org
Mon Nov 29 13:02:59 UTC 2021


osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/26384 )

Change subject: stats: add bsc.paging:expired
......................................................................

stats: add bsc.paging:expired

Similar to paging:attempted, count paging:expired not only per BTS, but
also for the whole BSC. Add active_paging_requests to struct bsc_subscr,
to increase the counter only once if paging expires, and not once per
BTS where paging expired.

Related: SYS#4878
Change-Id: I9c118e7e3d61ed8c9f1951111255b196905eba4d
---
M include/osmocom/bsc/bsc_stats.h
M include/osmocom/bsc/bsc_subscriber.h
M src/osmo-bsc/bsc_stats.c
M src/osmo-bsc/paging.c
4 files changed, 11 insertions(+), 0 deletions(-)

Approvals:
  pespin: Looks good to me, but someone else must approve
  fixeria: Looks good to me, but someone else must approve
  osmith: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/bsc/bsc_stats.h b/include/osmocom/bsc/bsc_stats.h
index 9140f85..801a2c1 100644
--- a/include/osmocom/bsc/bsc_stats.h
+++ b/include/osmocom/bsc/bsc_stats.h
@@ -76,6 +76,7 @@
 	BSC_CTR_PAGING_ATTEMPTED,
 	BSC_CTR_PAGING_DETACHED,
 	BSC_CTR_PAGING_RESPONDED,
+	BSC_CTR_PAGING_EXPIRED,
 	BSC_CTR_PAGING_NO_ACTIVE_PAGING,
 	BSC_CTR_UNKNOWN_UNIT_ID,
 	BSC_CTR_MSCPOOL_SUBSCR_NO_MSC,
diff --git a/include/osmocom/bsc/bsc_subscriber.h b/include/osmocom/bsc/bsc_subscriber.h
index 6fffafd..f9e8eb2 100644
--- a/include/osmocom/bsc/bsc_subscriber.h
+++ b/include/osmocom/bsc/bsc_subscriber.h
@@ -17,6 +17,8 @@
 
 	char imsi[GSM23003_IMSI_MAX_DIGITS+1];
 	uint32_t tmsi;
+
+	uint32_t active_paging_requests;
 };
 
 const char *bsc_subscr_name(struct bsc_subscr *bsub);
diff --git a/src/osmo-bsc/bsc_stats.c b/src/osmo-bsc/bsc_stats.c
index c789aea..b48c90a 100644
--- a/src/osmo-bsc/bsc_stats.c
+++ b/src/osmo-bsc/bsc_stats.c
@@ -93,6 +93,7 @@
 	[BSC_CTR_PAGING_ATTEMPTED] =		{"paging:attempted", "Paging attempts for a subscriber"},
 	[BSC_CTR_PAGING_DETACHED] =		{"paging:detached", "Paging request send failures because no responsible BTS was found"},
 	[BSC_CTR_PAGING_RESPONDED] =		{"paging:responded", "Paging attempts with successful response"},
+	[BSC_CTR_PAGING_EXPIRED] =		{"paging:expired", "Paging Request expired because of timeout T3113"},
 	[BSC_CTR_PAGING_NO_ACTIVE_PAGING] =	{"paging:no_active_paging", "Paging response without an active paging request (arrived after paging expiration?)"},
 
 	[BSC_CTR_UNKNOWN_UNIT_ID] =		{"abis:unknown_unit_id", "Connection attempts from unknown IPA CCM Unit ID"},
diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c
index 04512be..721ea31 100644
--- a/src/osmo-bsc/paging.c
+++ b/src/osmo-bsc/paging.c
@@ -66,6 +66,7 @@
 static void paging_remove_request(struct gsm_bts_paging_state *paging_bts,
 				  struct gsm_paging_request *to_be_deleted)
 {
+	to_be_deleted->bsub->active_paging_requests--;
 	osmo_timer_del(&to_be_deleted->T3113);
 	llist_del(&to_be_deleted->entry);
 	bsc_subscr_put(to_be_deleted->bsub, BSUB_USE_PAGING_REQUEST);
@@ -284,6 +285,11 @@
 	/* must be destroyed before calling cbfn, to prevent double free */
 	rate_ctr_inc(rate_ctr_group_get_ctr(req->bts->bts_ctrs, BTS_CTR_PAGING_EXPIRED));
 
+	/* If last BTS paging times out (active_paging_requests will be
+	 * decremented in paging_remove_request below): */
+	if (req->bsub->active_paging_requests == 1)
+		rate_ctr_inc(rate_ctr_group_get_ctr(bsc_gsmnet->bsc_ctrs, BSC_CTR_PAGING_EXPIRED));
+
 	/* destroy it now. Do not access req afterwards */
 	paging_remove_request(&req->bts->paging, req);
 
@@ -341,6 +347,7 @@
 	}
 
 	LOG_PAGING_BTS(params, bts, DPAG, LOGL_DEBUG, "Start paging\n");
+	params->bsub->active_paging_requests++;
 	req = talloc_zero(tall_paging_ctx, struct gsm_paging_request);
 	OSMO_ASSERT(req);
 	req->reason = params->reason;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/26384
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9c118e7e3d61ed8c9f1951111255b196905eba4d
Gerrit-Change-Number: 26384
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211129/b496ef13/attachment.htm>


More information about the gerrit-log mailing list