Change in libosmocore[master]: ns2: Use NSVC bufid in stats report

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/.

laforge gerrit-no-reply at lists.osmocom.org
Sat Jun 5 15:46:29 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/24468 )

Change subject: ns2: Use NSVC bufid in stats report
......................................................................

ns2: Use NSVC bufid in stats report

Use the new stats API to set a meaningful name for its stats group too,
so that they are easily to identify when reported.

Example on VTY "show stats":
"""
NSVC Peer Statistics (0)('UDP-NSE01800-NSVC01800'):
 ALIVE response time        :        0 ms
NS Bind Statistics:
 Transmit backlog length:        0 packets
"""

Example reporting to statsd:
"""
my-stats-reporter-prefix.ns.nsvc.UDP-NSE01800-NSVC01800.alive.delay:0|g
"""

Related: SYS#5456
Change-Id: I4c696c615ba3416f8524d0797ce06c0ecd3a18f2
---
M src/gb/gprs_ns2.c
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve
  osmith: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index 975909b..a57f577 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -606,6 +606,8 @@
 
 	bind->nsi->nsvc_rate_ctr_idx++;
 
+	osmo_stat_item_group_set_name(nsvc->statg, id);
+
 	llist_add(&nsvc->list, &nse->nsvc);
 	llist_add(&nsvc->blist, &bind->nsvc);
 	ns2_nse_update_mtu(nse);

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I4c696c615ba3416f8524d0797ce06c0ecd3a18f2
Gerrit-Change-Number: 24468
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210605/c5c0600d/attachment.htm>


More information about the gerrit-log mailing list