From e9fd81a5c31782f36b512cf41ee98d0a4e4a82eb Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Sun, 6 Jun 2021 18:02:57 +0200 Subject: [PATCH] stats_vty: also show rate counter group name (if present) Change-Id: I358f52e81a85f041fc21960634d04d18e7883dd5 --- src/vty/stats_vty.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index 630ee3252..d5d32921b 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -555,7 +555,10 @@ DEFUN(show_stats_asciidoc_table, static int rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *sctx_) { struct vty *vty = sctx_; - vty_out(vty, "%s %u:%s", ctrg->desc->group_description, ctrg->idx, VTY_NEWLINE); + vty_out(vty, "%s %u", ctrg->desc->group_description, ctrg->idx); + if (ctrg->name != NULL) + vty_out(vty, " (%s)", ctrg->name); + vty_out(vty, ":%s", VTY_NEWLINE); vty_out_rate_ctr_group_fmt(vty, "%25n: %10c (%S/s %M/m %H/h %D/d) %d", ctrg); return 0; }