path: root/src/libbsc/bsc_vty.c
diff options
authorStefan Sperling <ssperling@sysmocom.de>2018-05-17 14:38:27 +0200
committerStefan Sperling <ssperling@sysmocom.de>2018-05-18 11:38:24 +0000
commit71d524c059c5a5c90e7cb77d8a2134c1c68b9cde (patch)
tree24b4075f5f31a3fc13d451dce098fbdb1a7c8eaf /src/libbsc/bsc_vty.c
parent0b103999371e91c979ffe51723579860cbbcac2f (diff)
show all global counters of osmo-bsc in vty
The 'show statistics' VTY command was not showing all counters maintained by osmo-bsc. Instead of printing just two counters related to paging, print all available counters in a generic way. Adjust descriptions of some counters for nicer display. After startup (all counters are zero) is now looks like this: OsmoBSC# show statistics handover:attempted: 0 Received handover attempts. handover:no_channel: 0 Sent no channel available responses. handover:timeout: 0 Timeouts of timer T3103. handover:completed: 0 Received handover completed. handover:failed: 0 Received HO FAIL messages. paging:attempted: 0 Paging attempts for a subscriber. paging:detached: 0 Paging request send failures because no responsible BTS was found. paging:responded: 0 Paging attempts with successful response. OsmoBSC# Change-Id: I58ae04e1960774d760e3ebb54a4f307c9f753655 Related: OS#3245
Diffstat (limited to 'src/libbsc/bsc_vty.c')
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,
+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,
+ rate_ctr_for_each_counter(net->bsc_ctrs, print_counter, vty);