diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index e6a7708b0..07a0c9d8a 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -1409,6 +1409,7 @@ enum bts_counter_id { BTS_CTR_PAGING_RESPONDED, BTS_CTR_PAGING_EXPIRED, BTS_CTR_PAGING_NO_ACTIVE_PAGING, + BTS_CTR_PAGING_MSC_FLUSH, BTS_CTR_CHAN_ACT_TOTAL, BTS_CTR_CHAN_ACT_NACK, BTS_CTR_RSL_UNKNOWN, @@ -1455,6 +1456,7 @@ static const struct rate_ctr_desc bts_ctr_description[] = { [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."}, [BTS_CTR_PAGING_NO_ACTIVE_PAGING] = {"paging:no_active_paging", "Paging response without an active paging request (arrived after paging expiration?)."}, + [BTS_CTR_PAGING_MSC_FLUSH] = {"paging:msc_flush", "Paging flushed due to MSC Reset BSSMAP message."}, [BTS_CTR_CHAN_ACT_TOTAL] = {"chan_act:total", "Total number of Channel Activations."}, [BTS_CTR_CHAN_ACT_NACK] = {"chan_act:nack", "Number of Channel Activations that the BTS NACKed"}, [BTS_CTR_RSL_UNKNOWN] = {"rsl:unknown", "Number of unknown/unsupported RSL messages received from BTS"}, diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c index d32cded54..7b89dad9b 100644 --- a/src/osmo-bsc/paging.c +++ b/src/osmo-bsc/paging.c @@ -487,6 +487,7 @@ struct bsc_msc_data *paging_get_msc(struct gsm_bts *bts, struct bsc_subscr *bsub void paging_flush_bts(struct gsm_bts *bts, struct bsc_msc_data *msc) { struct gsm_paging_request *req, *req2; + int num_cancelled = 0; paging_init_if_needed(bts); @@ -496,7 +497,10 @@ void paging_flush_bts(struct gsm_bts *bts, struct bsc_msc_data *msc) /* now give up the data structure */ LOG_BTS(bts, DPAG, LOGL_DEBUG, "Stop paging %s (flush)\n", bsc_subscr_name(req->bsub)); paging_remove_request(&bts->paging, req); + num_cancelled++; } + + rate_ctr_add(&bts->bts_ctrs->ctr[BTS_CTR_PAGING_MSC_FLUSH], num_cancelled); } /*! Flush all paging requests issued by \a msc on any BTS in \a net */