laforge has uploaded this change for review.

View Change

Add stat_item for per-bts [dynamic] T3113 timer

This allows external monitoring to see where the T3113 timer has been
adjusted to, in case it is set dynamically.

Change-Id: I533f2ca3c8e66c143154cbf03b827c9cbbacccdf
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/bts.c
M src/osmo-bsc/paging.c
3 files changed, 12 insertions(+), 2 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/60/28060/1
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 9e50e2d..c5a09f2 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -224,6 +224,7 @@
BTS_STAT_TS_BORKEN,
BTS_STAT_NUM_TRX_RSL_CONNECTED,
BTS_STAT_NUM_TRX_TOTAL,
+ BTS_STAT_T3113,
};

extern const struct osmo_stat_item_desc bts_stat_desc[];
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 5786833..8be4190 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -975,6 +975,7 @@
osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_CHAN_SDCCH8_CBCH_TOTAL), 0);
osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_CHAN_OSMO_DYN_USED), 0);
osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_CHAN_OSMO_DYN_TOTAL), 0);
+ osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_T3113), 0);
}

const struct rate_ctr_desc bts_ctr_description[] = {
@@ -1617,6 +1618,10 @@
{ "num_trx:total",
"Number of configured TRX in this BTS",
"" },
+ [BTS_STAT_T3113] = \
+ { "t3113",
+ "T3113 paging timer",
+ "s", 60, 0 },
};

const struct osmo_stat_item_group_desc bts_statg_desc = {
diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c
index a6908a6..c38d5c5 100644
--- a/src/osmo-bsc/paging.c
+++ b/src/osmo-bsc/paging.c
@@ -360,8 +360,10 @@
* struct osmo_tdef gsm_network_T_defs. */
OSMO_ASSERT(d);

- if (!bts->T3113_dynamic)
- return d->val;
+ if (!bts->T3113_dynamic) {
+ to = d->val;
+ goto ret;
+ }

/* MFRMS defines repeat interval of paging messages for MSs that belong
* to same paging group across multiple 51 frame multiframes.
@@ -385,6 +387,8 @@
to = 60;

LOG_PAGING_BTS(req, bts, DPAG, LOGL_DEBUG, "Paging request: T3113 expires in %u seconds\n", to);
+ret:
+ osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_T3113), to);
return to;
}


To view, visit change 28060. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I533f2ca3c8e66c143154cbf03b827c9cbbacccdf
Gerrit-Change-Number: 28060
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge@osmocom.org>
Gerrit-MessageType: newchange