[MERGED] osmo-bsc[master]: libbsc: paging: more reasonable (and detailed) paging statis...

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
Thu Dec 14 12:25:35 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: libbsc: paging: more reasonable (and detailed) paging statistics
......................................................................


libbsc: paging: more reasonable (and detailed) paging statistics

Counting the number of T3113 expirations (one per subscriber per BTS)
vs the number of paging attempts (Bsc global) is a ueseless figure,
as you cannot relate each other.

We count on the BSC level:
	* how many PAGING we received from the MSC (total)
	* how many of those were for cells/LACs we don't serve
	* how many of those resulted in PAGING RESPONSE

We count on the BTS leve:
	* how many PAGING CMD we sent to the BTS (total)
	* how many of those we ignored as we were already paging
	* how many of those resulted in PAGING RESPONSE
	* how many were expired due to T3113 expiring

Change-Id: I410bbcbb2621f95f11238f7a5da01ab438f5fee1
---
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_vty.c
M src/libbsc/paging.c
3 files changed, 23 insertions(+), 10 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index a6c8198..3fdc826 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -197,6 +197,10 @@
 	BTS_CTR_CODEC_EFR,
 	BTS_CTR_CODEC_V1_FR,
 	BTS_CTR_CODEC_V1_HR,
+	BTS_CTR_PAGING_ATTEMPTED,
+	BTS_CTR_PAGING_ALREADY,
+	BTS_CTR_PAGING_RESPONDED,
+	BTS_CTR_PAGING_EXPIRED,
 };
 
 static const struct rate_ctr_desc bts_ctr_description[] = {
@@ -211,6 +215,11 @@
 	[BTS_CTR_CODEC_EFR] = 			{"codec:efr", "Count the usage of EFR codec by channel mode requested."},
 	[BTS_CTR_CODEC_V1_FR] =			{"codec:fr", "Count the usage of FR codec by channel mode requested."},
 	[BTS_CTR_CODEC_V1_HR] =			{"codec:hr", "Count the usage of HR codec by channel mode requested."},
+
+	[BTS_CTR_PAGING_ATTEMPTED] = 		{"paging:attempted", "Paging attempts for a subscriber."},
+	[BTS_CTR_PAGING_ALREADY] = 		{"paging:already", "Paging attempts ignored as subsciber was already being paged."},
+	[BTS_CTR_PAGING_RESPONDED] = 		{"paging:responded", "Paging attempts with successful paging response."},
+	[BTS_CTR_PAGING_EXPIRED] = 		{"paging:expired", "Paging Request expired because of timeout T3113."},
 };
 
 static const struct rate_ctr_group_desc bts_ctrg_desc = {
@@ -229,8 +238,7 @@
 	BSC_CTR_HANDOVER_FAILED,
 	BSC_CTR_PAGING_ATTEMPTED,
 	BSC_CTR_PAGING_DETACHED,
-	BSC_CTR_PAGING_COMPLETED,
-	BSC_CTR_PAGING_EXPIRED,
+	BSC_CTR_PAGING_RESPONDED,
 };
 
 static const struct rate_ctr_desc bsc_ctr_description[] = {
@@ -239,10 +247,10 @@
 	[BSC_CTR_HANDOVER_TIMEOUT] = 		{"handover:timeout", "Count the amount of timeouts of timer T3103."},
 	[BSC_CTR_HANDOVER_COMPLETED] = 		{"handover:completed", "Received handover completed."},
 	[BSC_CTR_HANDOVER_FAILED] = 		{"handover:failed", "Receive HO FAIL messages."},
-	[BSC_CTR_PAGING_ATTEMPTED] = 		{"paging:attempted", "Paging attempts for a MS."},
+
+	[BSC_CTR_PAGING_ATTEMPTED] = 		{"paging:attempted", "Paging attempts for a subscriber."},
 	[BSC_CTR_PAGING_DETACHED] = 		{"paging:detached", "Counts the amount of paging attempts which couldn't sent out any paging request because no responsible bts found."},
-	[BSC_CTR_PAGING_COMPLETED] = 		{"paging:completed", "Paging successful completed."},
-	[BSC_CTR_PAGING_EXPIRED] = 		{"paging:expired", "Paging Request expired because of timeout T3113."},
+	[BSC_CTR_PAGING_RESPONDED] = 		{"paging:responded", "Paging attempts with successful response."},
 };
 
 
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 42b7165..9500645 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -3794,10 +3794,9 @@
 
 void openbsc_vty_print_statistics(struct vty *vty, struct gsm_network *net)
 {
-	vty_out(vty, "Paging                  : %"PRIu64" attempted, %"PRIu64" complete, %"PRIu64" expired%s",
+	vty_out(vty, "Paging                  : %"PRIu64" attempted, %"PRIu64" responded%s",
 		net->bsc_ctrs->ctr[BSC_CTR_PAGING_ATTEMPTED].current,
-		net->bsc_ctrs->ctr[BSC_CTR_PAGING_COMPLETED].current,
-		net->bsc_ctrs->ctr[BSC_CTR_PAGING_EXPIRED].current,
+		net->bsc_ctrs->ctr[BSC_CTR_PAGING_RESPONDED].current,
 		VTY_NEWLINE);
 }
 
diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c
index 42ecdcf..314dfdd 100644
--- a/src/libbsc/paging.c
+++ b/src/libbsc/paging.c
@@ -277,7 +277,7 @@
 	     req, bsc_subscr_name(req->bsub));
 
 	/* must be destroyed before calling cbfn, to prevent double free */
-	rate_ctr_inc(&req->bts->network->bsc_ctrs->ctr[BSC_CTR_PAGING_EXPIRED]);
+	rate_ctr_inc(&req->bts->bts_ctrs->ctr[BTS_CTR_PAGING_EXPIRED]);
 
 	/* destroy it now. Do not access req afterwards */
 	paging_remove_request(&req->bts->paging, req);
@@ -295,9 +295,12 @@
 	struct gsm_bts_paging_state *bts_entry = &bts->paging;
 	struct gsm_paging_request *req;
 
+	rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_PAGING_ATTEMPTED]);
+
 	if (paging_pending_request(bts_entry, bsub)) {
 		LOGP(DPAG, LOGL_INFO, "Paging request already pending for %s\n",
 		     bsc_subscr_name(bsub));
+		rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_PAGING_ALREADY]);
 		return -EEXIST;
 	}
 
@@ -423,8 +426,11 @@
 	log_set_context(LOG_CTX_BSC_SUBSCR, bsub);
 
 	/* Stop this first and dispatch the request */
-	if (_bts)
+	if (_bts) {
 		_paging_request_stop(_bts, bsub, conn, msg);
+		rate_ctr_inc(&_bts->bts_ctrs->ctr[BTS_CTR_PAGING_RESPONDED]);
+		rate_ctr_inc(&_bts->network->bsc_ctrs->ctr[BSC_CTR_PAGING_RESPONDED]);
+	}
 
 	/* Make sure to cancel this everywhere else */
 	llist_for_each_entry(bts, bts_list, list) {

-- 
To view, visit https://gerrit.osmocom.org/5342
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I410bbcbb2621f95f11238f7a5da01ab438f5fee1
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list