aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-12 10:36:06 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-13 09:47:22 +0200
commit7b1719327d4b1183c45ab076e31ccfb70436ad25 (patch)
treee4c6d184370e1261adb37ffbb71bee08fe34b2c7 /openbsc
parent493645eda95a27eebf05a594b2ead40801709404 (diff)
[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.
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/include/openbsc/gsm_data.h4
-rw-r--r--openbsc/src/abis_rsl.c5
-rw-r--r--openbsc/src/gsm_data.c2
-rw-r--r--openbsc/src/vty_interface_cmds.c3
4 files changed, 13 insertions, 1 deletions
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index 4645ecc33..d7ddca715 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -562,6 +562,10 @@ struct gsmnet_stats {
struct counter *alerted; /* we alerted the other end */
struct counter *connected;/* how many calls were accepted */
} call;
+ struct {
+ struct counter *rf_fail;
+ struct counter *rll_err;
+ } chan;
};
enum gsm_auth_policy {
diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c
index ccd272f17..efafed86a 100644
--- a/openbsc/src/abis_rsl.c
+++ b/openbsc/src/abis_rsl.c
@@ -845,6 +845,7 @@ static int rsl_rx_conn_fail(struct msgb *msg)
LOGPC(DRSL, LOGL_NOTICE, "\n");
/* 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, 1);
}
@@ -1291,8 +1292,10 @@ static int rsl_rx_rll_err_ind(struct msgb *msg)
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, 1);
+ }
return 0;
}
diff --git a/openbsc/src/gsm_data.c b/openbsc/src/gsm_data.c
index 7030f6aec..55c45cdc9 100644
--- a/openbsc/src/gsm_data.c
+++ b/openbsc/src/gsm_data.c
@@ -281,6 +281,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.alerted = counter_alloc("net.call.alerted");
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;
diff --git a/openbsc/src/vty_interface_cmds.c b/openbsc/src/vty_interface_cmds.c
index 623aa30df..8ade51851 100644
--- a/openbsc/src/vty_interface_cmds.c
+++ b/openbsc/src/vty_interface_cmds.c
@@ -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",
counter_get(net->stats.chreq.total),
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",
counter_get(net->stats.paging.attempted),
counter_get(net->stats.paging.completed),