aboutsummaryrefslogtreecommitdiffstats
path: root/src/libbsc/bsc_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libbsc/bsc_vty.c')
-rw-r--r--src/libbsc/bsc_vty.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index ea4c8d046..e53a14fa1 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -4133,12 +4133,16 @@ DEFUN(cfg_ts_e1_subslot,
return CMD_SUCCESS;
}
+int print_counter(struct rate_ctr_group *bsc_ctrs, struct rate_ctr *ctr, const struct rate_ctr_desc *desc, void *data)
+{
+ struct vty *vty = data;
+ vty_out(vty, "%25s: %10"PRIu64" %s%s", desc->name, ctr->current, desc->description, VTY_NEWLINE);
+ return 0;
+}
+
void openbsc_vty_print_statistics(struct vty *vty, struct gsm_network *net)
{
- vty_out(vty, "Paging : %"PRIu64" attempted, %"PRIu64" responded%s",
- net->bsc_ctrs->ctr[BSC_CTR_PAGING_ATTEMPTED].current,
- net->bsc_ctrs->ctr[BSC_CTR_PAGING_RESPONDED].current,
- VTY_NEWLINE);
+ rate_ctr_for_each_counter(net->bsc_ctrs, print_counter, vty);
}
DEFUN(drop_bts,