stats: track TCH/SDCCH lchans reaching fully-established state

When calculating average lchan duration based on the new stats for
BTS_CTR_CHAN_{TCH,SDCCH}_ACTIVE_MILLISECONDS_TOTAL there are
discrepancies which emerge. Specificially in bandwidth-constrained
environments, there are still-unknown failure states which can
occur that cause the TCH or SDCCH activity count to increment but
zero milliseconds of activity on the lchan to accumulate. This
portrays a failure as a success.

These new fully-established stats are intended to provide a more
accurate denominator when calculating average lchan duration as
they are incremented in proximity to the duration timestamp
initialization.

Change-Id: I417940ad9479719f5324fb12d45883cd3cb2c578
This commit is contained in:
Michael Iedema 2022-06-15 12:45:34 -07:00 committed by laforge
parent 2a77f1780f
commit 0dd0f14877
3 changed files with 21 additions and 0 deletions

View File

@ -62,6 +62,8 @@ enum bts_counter_id {
BTS_CTR_CHAN_ACT_NACK,
BTS_CTR_CHAN_TCH_ACTIVE_MILLISECONDS_TOTAL,
BTS_CTR_CHAN_SDCCH_ACTIVE_MILLISECONDS_TOTAL,
BTS_CTR_CHAN_TCH_FULLY_ESTABLISHED,
BTS_CTR_CHAN_SDCCH_FULLY_ESTABLISHED,
BTS_CTR_RSL_UNKNOWN,
BTS_CTR_RSL_IPA_NACK,
BTS_CTR_RSL_DELETE_IND,

View File

@ -1155,6 +1155,12 @@ const struct rate_ctr_desc bts_ctr_description[] = {
[BTS_CTR_CHAN_SDCCH_ACTIVE_MILLISECONDS_TOTAL] = \
{ "chan_sdcch:active_milliseconds:total",
"Cumulative number of milliseconds of SDCCH channel activity" },
[BTS_CTR_CHAN_TCH_FULLY_ESTABLISHED] = \
{ "chan_tch:fully_established",
"Number of TCH channels which have reached the fully established state" },
[BTS_CTR_CHAN_SDCCH_FULLY_ESTABLISHED] = \
{ "chan_sdcch:fully_established",
"Number of SDCCH channels which have reached the fully established state" },
[BTS_CTR_RSL_UNKNOWN] = \
{ "rsl:unknown",
"Number of unknown/unsupported RSL messages received from BTS" },

View File

@ -208,6 +208,19 @@ static void lchan_on_fully_established(struct gsm_lchan *lchan)
osmo_clock_gettime(CLOCK_MONOTONIC, &lchan->active_start);
lchan->active_stored = lchan->active_start;
/* Increment rate counters tracking fully established lchans. */
switch (lchan->type) {
case GSM_LCHAN_TCH_H:
case GSM_LCHAN_TCH_F:
rate_ctr_inc(rate_ctr_group_get_ctr(lchan->ts->trx->bts->bts_ctrs, BTS_CTR_CHAN_TCH_FULLY_ESTABLISHED));
break;
case GSM_LCHAN_SDCCH:
rate_ctr_inc(rate_ctr_group_get_ctr(lchan->ts->trx->bts->bts_ctrs, BTS_CTR_CHAN_SDCCH_FULLY_ESTABLISHED));
break;
default:
break;
}
switch (lchan->activate.info.activ_for) {
case ACTIVATE_FOR_MS_CHANNEL_REQUEST:
/* No signalling to do here, MS is free to use the channel, and should go on to connect