aboutsummaryrefslogtreecommitdiffstats
path: root/src/libbsc
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-02-05 17:34:36 +0100
committerHarald Welte <laforge@gnumonks.org>2018-02-05 22:36:54 +0000
commit81dc9e74558ac9c62ce9a17c415963cdcaf1ecec (patch)
treee44bfc37fb4114d85b7d55cd8ab8c32729d10b56 /src/libbsc
parent5f45a4a825317d673111914860606882bada5660 (diff)
Add stat items for the BTS's channel load average and T3122.
In addition to logging the current values of a BTS's channel load average and T3122 override, maintain stat items for these values. This allows for plotting these values over time, for instance. These values show up in the VTY under 'show stats' like this: base transceiver station: Channel load average.: 25 % T3122 IMMEDIATE ASSIGNMENT REJECT wait indicator.: 32 s Change-Id: Icace0176e8b1d23d7c7b4816f7c67c65312844fa Suggested-by: laforge
Diffstat (limited to 'src/libbsc')
-rw-r--r--src/libbsc/chan_alloc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c
index 5e2c0ee22..500ad5958 100644
--- a/src/libbsc/chan_alloc.c
+++ b/src/libbsc/chan_alloc.c
@@ -656,6 +656,8 @@ bts_update_t3122_chan_load(struct gsm_bts *bts)
load = ((used / total) * 100);
LOGP(DRLL, LOGL_DEBUG, "(bts=%d) channel load average is %lu.%.2lu%%\n",
bts->nr, (load & 0xffffff00) >> 8, (load & 0xff) / 10);
+ osmo_stat_item_set(bts->bts_statg->items[BTS_STAT_CHAN_LOAD_AVERAGE],
+ (load & 0xffffff00) >> 8);
/* Calculate new T3122 wait indicator. */
wait_ind = ((used / total) * max_wait_ind);
@@ -667,4 +669,5 @@ bts_update_t3122_chan_load(struct gsm_bts *bts)
LOGP(DRLL, LOGL_DEBUG, "(bts=%d) T3122 wait indicator set to %lu seconds\n", bts->nr, wait_ind);
bts->T3122 = (uint8_t)wait_ind;
+ osmo_stat_item_set(bts->bts_statg->items[BTS_STAT_T3122], wait_ind);
}