diff options
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/include/openbsc/gsm_data.h | 4 | ||||
-rw-r--r-- | openbsc/src/bsc_init.c | 5 | ||||
-rw-r--r-- | openbsc/src/gsm_data.c | 2 | ||||
-rw-r--r-- | openbsc/src/vty_interface_cmds.c | 3 |
4 files changed, 14 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 2db98de97..a2f0e406c 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -539,6 +539,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 fccdb0cd8..94576b796 100644 --- a/openbsc/src/bsc_init.c +++ b/openbsc/src/bsc_init.c @@ -918,6 +918,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 f837c2709..4af46e487 100644 --- a/openbsc/src/gsm_data.c +++ b/openbsc/src/gsm_data.c @@ -282,6 +282,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() |