iedemam has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/28295 )


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

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
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/bts.c
M src/osmo-bsc/lchan_fsm.c
3 files changed, 21 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/95/28295/1

diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 66cf68f..13e10e3 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -62,6 +62,8 @@
        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,
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index d0adb2a..6d88ebc 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -1160,6 +1160,12 @@
        [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" },
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 2d566b6..41b7ae7 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -208,6 +208,19 @@
        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

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28295
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I417940ad9479719f5324fb12d45883cd3cb2c578
Gerrit-Change-Number: 28295
Gerrit-PatchSet: 1
Gerrit-Owner: iedemam <[email protected]>
Gerrit-MessageType: newchange

Reply via email to