aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichael Iedema <michael@kapsulate.com>2022-02-07 01:27:45 -0800
committerpespin <pespin@sysmocom.de>2022-05-03 11:03:28 +0000
commit5e2ac29703b4b05f202734698fecdb04b4461bd8 (patch)
tree7c2b0c9756060606f38e09ee1b6cb16a0ea0f436 /include
parent7048fc66bfd88989375056733dbe1b30abcac909 (diff)
stats: new trackers for lchan life duration
This patch adds two stats which track cummulative lchan lifetime by type TCH and SDCCH. These new counters will accomplish two things: 1) Provide a glanceable way to see if lchan durations look healthy. When examining a site, short-lived (<5s) and long-lived (>30s) TCH lchans are difficult to tell apart. If we only see short-lived TCH lchans, there is most likely an RF or signaling problem to investigate. This new counter will expose channel ages in the VTY output 2) Provide a more accurate count for Erlangs per site. Currently, we are basing Erlangs on active TCH channel counts per stats period. This method skews high very quickly. Each active TCH in that period translates into the full 10s of activity. This counter should improve accuracy by two orders of magnitude. Change-Id: I1b0670c47cb5e0b7776eda89d1e71545ba0e3347
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/bsc/bts.h2
-rw-r--r--include/osmocom/bsc/gsm_data.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 008eee524..9e50e2de1 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -59,6 +59,8 @@ enum bts_counter_id {
BTS_CTR_CHAN_ACT_SDCCH,
BTS_CTR_CHAN_ACT_TCH,
BTS_CTR_CHAN_ACT_NACK,
+ BTS_CTR_CHAN_TCH_ACTIVE_DECISECONDS_TOTAL,
+ BTS_CTR_CHAN_SDCCH_ACTIVE_DECISECONDS_TOTAL,
BTS_CTR_RSL_UNKNOWN,
BTS_CTR_RSL_IPA_NACK,
BTS_CTR_RSL_DELETE_IND,
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index cb20b9ed3..4babe5eb0 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -888,6 +888,8 @@ struct gsm_lchan {
uint8_t interf_band;
/* MS power control state */
struct lchan_power_ctrl_state ms_power_ctrl;
+ /* Interval timing to capture duration per activation and cumulative active time */
+ struct osmo_time_cc active_cc;
};
/* One Timeslot in a TRX */
@@ -1146,6 +1148,7 @@ const char *gsm_chreq_name(enum gsm_chreq_reason_t c);
char *gsm_ts_name(const struct gsm_bts_trx_ts *ts);
char *gsm_ts_and_pchan_name(const struct gsm_bts_trx_ts *ts);
void lchan_update_name(struct gsm_lchan *lchan);
+uint64_t gsm_lchan_active_duration_ms(const struct gsm_lchan *lchan);
static inline char *gsm_lchan_name(const struct gsm_lchan *lchan)
{