make 'show rate-counters' show group index
Show each rate counter group's index in the output of the
'show rate-counters' command, to provide some way of telling
apart distinct instances of the same rate counter group.
This is not a very user-friendly UI because these indices are
generated internally by libosmocore and/or applications, so
users cannot easily assign meaning to these indices. However,
the current rate counter implementation doesn't allow for more.
Change-Id: Ieb151239407e4b2f8859fefec8d0670f5ddf908a
Related: OS#3674
diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c
index 62153f3..c911087 100644
--- a/src/vty/stats_vty.c
+++ b/src/vty/stats_vty.c
@@ -533,7 +533,7 @@
static int rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *sctx_)
{
struct vty *vty = sctx_;
- vty_out(vty, "%s:%s", ctrg->desc->group_description, VTY_NEWLINE);
+ vty_out(vty, "%s %u:%s", ctrg->desc->group_description, ctrg->idx, VTY_NEWLINE);
vty_out_rate_ctr_group_fmt(vty, "%25n: %10c (%S/s %M/m %H/h %D/d) %d", ctrg);
return 0;
}