[statistics] Keep track of OML/RSL failures of the BTS.

This commit is contained in:
Holger Hans Peter Freyther
2010-04-12 10:45:52 +02:00
parent 7b1719327d
commit b829eac9bc
4 changed files with 14 additions and 0 deletions

View File

@@ -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 {

View File

@@ -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

View File

@@ -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;

View File

@@ -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()