Change in libosmocore[master]: make 'show rate-counters' show group index

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Stefan Sperling gerrit-no-reply at lists.osmocom.org
Mon Oct 29 16:56:05 UTC 2018


Stefan Sperling has uploaded this change for review. ( https://gerrit.osmocom.org/11503


Change subject: make 'show rate-counters' show group index
......................................................................

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
---
M src/vty/stats_vty.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/03/11503/1

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;
 }

-- 
To view, visit https://gerrit.osmocom.org/11503
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb151239407e4b2f8859fefec8d0670f5ddf908a
Gerrit-Change-Number: 11503
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181029/bc3270ea/attachment.htm>


More information about the gerrit-log mailing list