aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-12 10:45:52 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-13 09:47:22 +0200
commitb829eac9bc6c6dddcc0814d85ac560c6c48c36e1 (patch)
treefb221a11be427430f93839ed9459b04282bfbc4f
parent7b1719327d4b1183c45ab076e31ccfb70436ad25 (diff)
[statistics] Keep track of OML/RSL failures of the BTS.
-rw-r--r--openbsc/include/openbsc/gsm_data.h4
-rw-r--r--openbsc/src/bsc_init.c5
-rw-r--r--openbsc/src/gsm_data.c2
-rw-r--r--openbsc/src/vty_interface_cmds.c3
4 files changed, 14 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index d7ddca715..50a172042 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -566,6 +566,10 @@ struct gsmnet_stats {
struct counter *rf_fail;
struct counter *rll_err;
} chan;
+ struct {
+ struct counter *oml_fail;
+ struct counter *rsl_fail;
+ } bts;
};
enum gsm_auth_policy {
diff --git a/openbsc/src/bsc_init.c b/openbsc/src/bsc_init.c
index 78b575302..dc1ab07da 100644
--- a/openbsc/src/bsc_init.c
+++ b/openbsc/src/bsc_init.c
@@ -920,6 +920,11 @@ void input_event(int event, enum e1inp_sign_type type, struct gsm_bts_trx *trx)
case EVT_E1_TEI_DN:
LOGP(DMI, LOGL_ERROR, "Lost some E1 TEI link: %d %p\n", type, trx);
+ if (type == E1INP_SIGN_OML)
+ counter_inc(trx->bts->network->stats.bts.oml_fail);
+ else if (type == E1INP_SIGN_RSL)
+ counter_inc(trx->bts->network->stats.bts.rsl_fail);
+
/*
* free all allocated channels. change the nm_state so the
* trx and trx_ts becomes unusable and chan_alloc.c can not
diff --git a/openbsc/src/gsm_data.c b/openbsc/src/gsm_data.c
index 55c45cdc9..e817a5dd7 100644
--- a/openbsc/src/gsm_data.c
+++ b/openbsc/src/gsm_data.c
@@ -283,6 +283,8 @@ struct gsm_network *gsm_network_init(u_int16_t country_code, u_int16_t network_c
net->stats.call.connected = counter_alloc("net.call.connected");
net->stats.chan.rf_fail = counter_alloc("net.chan.rf_fail");
net->stats.chan.rll_err = counter_alloc("net.chan.rll_err");
+ net->stats.bts.oml_fail = counter_alloc("net.bts.oml_fail");
+ net->stats.bts.rsl_fail = counter_alloc("net.bts.rsl_fail");
net->mncc_recv = mncc_recv;
diff --git a/openbsc/src/vty_interface_cmds.c b/openbsc/src/vty_interface_cmds.c
index 8ade51851..671351e1c 100644
--- a/openbsc/src/vty_interface_cmds.c
+++ b/openbsc/src/vty_interface_cmds.c
@@ -240,6 +240,9 @@ void openbsc_vty_print_statistics(struct vty *vty, struct gsm_network *net)
counter_get(net->stats.paging.attempted),
counter_get(net->stats.paging.completed),
counter_get(net->stats.paging.expired), VTY_NEWLINE);
+ vty_out(vty, "BTS failures : %lu OML, %lu RSL%s",
+ counter_get(net->stats.bts.oml_fail),
+ counter_get(net->stats.bts.rsl_fail), VTY_NEWLINE);
}
void openbsc_vty_add_cmds()