diff --git a/include/osmocom/hnbgw/hnbgw.h b/include/osmocom/hnbgw/hnbgw.h index f2982de..bd8a853 100644 --- a/include/osmocom/hnbgw/hnbgw.h +++ b/include/osmocom/hnbgw/hnbgw.h @@ -98,6 +98,9 @@ enum hnb_rate_ctr { HNB_CTR_RUA_UDT_UL, HNB_CTR_RUA_UDT_DL, + HNB_CTR_PS_PAGING_ATTEMPTED, + HNB_CTR_CS_PAGING_ATTEMPTED, + HNB_CTR_RAB_ACTIVE_MILLISECONDS_TOTAL, }; diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c index 055b438..e1bac5f 100644 --- a/src/osmo-hnbgw/hnbgw.c +++ b/src/osmo-hnbgw/hnbgw.c @@ -395,6 +395,11 @@ const struct rate_ctr_desc hnb_ctr_description[] = { [HNB_CTR_RUA_UDT_DL] = { "rua:unit_data:dl", "Transmitted RUA UnitData (UDT) in downlink" }, + [HNB_CTR_PS_PAGING_ATTEMPTED] = { + "paging:ps:attempted", "Transmitted PS Paging requests" }, + [HNB_CTR_CS_PAGING_ATTEMPTED] = { + "paging:cs:attempted", "Transmitted CS Paging requests" }, + [HNB_CTR_RAB_ACTIVE_MILLISECONDS_TOTAL] = { "rab:cs:active_milliseconds:total", "Cumulative number of milliseconds of CS RAB activity" }, }; diff --git a/src/osmo-hnbgw/hnbgw_cn.c b/src/osmo-hnbgw/hnbgw_cn.c index 9da8377..f9f147b 100644 --- a/src/osmo-hnbgw/hnbgw_cn.c +++ b/src/osmo-hnbgw/hnbgw_cn.c @@ -293,6 +293,7 @@ static int cn_ranap_rx_paging_cmd(struct hnbgw_cnlink *cnlink, { const char *errmsg; struct hnb_context *hnb; + bool is_ps = cnlink->pool->domain == DOMAIN_PS; errmsg = cnlink_paging_add_ranap(cnlink, imsg); if (errmsg) { @@ -307,6 +308,10 @@ static int cn_ranap_rx_paging_cmd(struct hnbgw_cnlink *cnlink, llist_for_each_entry(hnb, &g_hnbgw->hnb_list, list) { if (!hnb->hnb_registered) continue; + if (is_ps) + HNBP_CTR_INC(hnb->persistent, HNB_CTR_PS_PAGING_ATTEMPTED); + else + HNBP_CTR_INC(hnb->persistent, HNB_CTR_CS_PAGING_ATTEMPTED); rua_tx_udt(hnb, data, len); }