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
This commit is contained in:
parent
61e041d92a
commit
2df65db3da
|
@ -76,6 +76,7 @@ enum {
|
|||
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,
|
||||
|
|
|
@ -17,6 +17,8 @@ struct bsc_subscr {
|
|||
|
||||
char imsi[GSM23003_IMSI_MAX_DIGITS+1];
|
||||
uint32_t tmsi;
|
||||
|
||||
uint32_t active_paging_requests;
|
||||
};
|
||||
|
||||
const char *bsc_subscr_name(struct bsc_subscr *bsub);
|
||||
|
|
|
@ -93,6 +93,7 @@ const struct rate_ctr_desc bsc_ctr_description[] = {
|
|||
[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"},
|
||||
|
|
|
@ -66,6 +66,7 @@ void *tall_paging_ctx = NULL;
|
|||
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 @@ static void paging_T3113_expired(void *data)
|
|||
/* 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 @@ static int _paging_request(const struct bsc_paging_params *params, struct gsm_bt
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue