[statistics] Keep track of rf failures and rll release failures

Add two new counters to count the RF Failures and the RLL Release
failure and make them available via the vty interface.
This commit is contained in:
Holger Hans Peter Freyther
2010-04-17 06:48:29 +02:00
parent bda581963d
commit 3ba36d5b57
4 changed files with 13 additions and 1 deletions

View File

@@ -535,6 +535,10 @@ struct gsmnet_stats {
struct counter *alerted; /* we alerted the other end */ struct counter *alerted; /* we alerted the other end */
struct counter *connected;/* how many calls were accepted */ struct counter *connected;/* how many calls were accepted */
} call; } call;
struct {
struct counter *rf_fail;
struct counter *rll_err;
} chan;
}; };
enum gsm_auth_policy { enum gsm_auth_policy {

View File

@@ -810,6 +810,7 @@ static int rsl_rx_conn_fail(struct msgb *msg)
LOGPC(DRSL, LOGL_NOTICE, "\n"); LOGPC(DRSL, LOGL_NOTICE, "\n");
/* FIXME: only free it after channel release ACK */ /* FIXME: only free it after channel release ACK */
counter_inc(msg->lchan->ts->trx->bts->network->stats.chan.rf_fail);
return rsl_rf_chan_release(msg->lchan); return rsl_rf_chan_release(msg->lchan);
} }
@@ -1245,8 +1246,10 @@ static int rsl_rx_rll_err_ind(struct msgb *msg)
rll_indication(msg->lchan, rllh->link_id, BSC_RLLR_IND_ERR_IND); rll_indication(msg->lchan, rllh->link_id, BSC_RLLR_IND_ERR_IND);
if (rlm_cause[1] == RLL_CAUSE_T200_EXPIRED) if (rlm_cause[1] == RLL_CAUSE_T200_EXPIRED) {
counter_inc(msg->lchan->ts->trx->bts->network->stats.chan.rll_err);
return rsl_rf_chan_release(msg->lchan); return rsl_rf_chan_release(msg->lchan);
}
return 0; return 0;
} }

View File

@@ -280,6 +280,8 @@ struct gsm_network *gsm_network_init(u_int16_t country_code, u_int16_t network_c
net->stats.call.dialled = counter_alloc("net.call.dialled"); net->stats.call.dialled = counter_alloc("net.call.dialled");
net->stats.call.alerted = counter_alloc("net.call.alerted"); net->stats.call.alerted = counter_alloc("net.call.alerted");
net->stats.call.connected = counter_alloc("net.call.connected"); 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->mncc_recv = mncc_recv; net->mncc_recv = mncc_recv;

View File

@@ -233,6 +233,9 @@ void openbsc_vty_print_statistics(struct vty *vty, struct gsm_network *net)
vty_out(vty, "Channel Requests : %lu total, %lu no channel%s", vty_out(vty, "Channel Requests : %lu total, %lu no channel%s",
counter_get(net->stats.chreq.total), counter_get(net->stats.chreq.total),
counter_get(net->stats.chreq.no_channel), VTY_NEWLINE); counter_get(net->stats.chreq.no_channel), VTY_NEWLINE);
vty_out(vty, "Channel Failures : %lu rf_failures, %lu rll failures%s",
counter_get(net->stats.chan.rf_fail),
counter_get(net->stats.chan.rll_err), VTY_NEWLINE);
vty_out(vty, "Paging : %lu attempted, %lu complete, %lu expired%s", vty_out(vty, "Paging : %lu attempted, %lu complete, %lu expired%s",
counter_get(net->stats.paging.attempted), counter_get(net->stats.paging.attempted),
counter_get(net->stats.paging.completed), counter_get(net->stats.paging.completed),