laforge has submitted this change. (
https://gerrit.osmocom.org/c/osmo-e1d/+/27844 )
Change subject: e1oip: Add stat items for number of timeslots
......................................................................
e1oip: Add stat items for number of timeslots
This adds "e1oip:e1t_ts_active" and "e1oip:e1o_ts_active" to show
which timeslots are active (i.e. which are transmitting data in the
IP protocol).
Change-Id: I6858e0773a348193bb4839c247294cef5ab4df5f
---
M src/octoi/e1oip.c
M src/octoi/e1oip.h
2 files changed, 6 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
tnt: Looks good to me, but someone else must approve
diff --git a/src/octoi/e1oip.c b/src/octoi/e1oip.c
index cf04c9a..87457db 100644
--- a/src/octoi/e1oip.c
+++ b/src/octoi/e1oip.c
@@ -65,6 +65,8 @@
[LINE_STAT_E1oIP_RTT] = { "e1oip:rtt", "Round Trip Time (in ms)" },
[LINE_STAT_E1oIP_E1O_FIFO] = { "e1oip:e1o_fifo_level", "E1 originated
FIFO level" },
[LINE_STAT_E1oIP_E1T_FIFO] = { "e1oip:e1t_fifo_level", "E1 terminated
FIFO level" },
+ [LINE_STAT_E1oIP_E1O_TS] = { "e1oip:e1o_ts_active", "E1 timeslots active
in E1->IP direction" },
+ [LINE_STAT_E1oIP_E1T_TS] = { "e1oip:e1t_ts_active", "E1 timeslots active
in IP->E1 direction" },
};
static const struct osmo_stat_item_group_desc iline_stats_desc = {
@@ -126,6 +128,7 @@
if (ts_mask & (1U << i))
num_ts++;
}
+ iline_stat_set(iline, LINE_STAT_E1oIP_E1O_TS, num_ts);
/* finally, encode the payload */
if (num_ts == 0) {
@@ -228,6 +231,7 @@
/* compute E1oIP idx to timeslot table */
num_ts = ts_mask2idx(idx2ts, ts_mask);
+ iline_stat_set(iline, LINE_STAT_E1oIP_E1T_TS, num_ts);
if (num_ts > 0) {
n_frames = msgb_l3len(msg) / num_ts;
if (msgb_l3len(msg) % num_ts) {
diff --git a/src/octoi/e1oip.h b/src/octoi/e1oip.h
index b643b5a..3c5a478 100644
--- a/src/octoi/e1oip.h
+++ b/src/octoi/e1oip.h
@@ -29,6 +29,8 @@
LINE_STAT_E1oIP_RTT,
LINE_STAT_E1oIP_E1O_FIFO,
LINE_STAT_E1oIP_E1T_FIFO,
+ LINE_STAT_E1oIP_E1O_TS,
+ LINE_STAT_E1oIP_E1T_TS,
};
struct octoi_peer;
--
To view, visit
https://gerrit.osmocom.org/c/osmo-e1d/+/27844
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I6858e0773a348193bb4839c247294cef5ab4df5f
Gerrit-Change-Number: 27844
Gerrit-PatchSet: 8
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: manawyrm <osmocom.account(a)tbspace.de>
Gerrit-Reviewer: roox <mardnh(a)gmx.de>
Gerrit-Reviewer: tnt <tnt(a)246tNt.com>
Gerrit-MessageType: merged