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/.
sivasankari gerrit-no-reply at lists.osmocom.orgHello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/1345
to look at the new patch set (#2).
Add statistics in the ms and tbf level.
Adds DL throughput in show ms imsi <imsi_value>.
Adds the number of coding schemes counter and rlc nacked counter at TBf level.
Change-Id: Ia95b0404989b00db0e7ba416bc40d09ef41fde1c
---
M src/gprs_rlcmac_meas.cpp
M src/pcu_vty_functions.cpp
M src/tbf.cpp
M src/tbf.h
M src/tbf_dl.cpp
5 files changed, 84 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/45/1345/2
diff --git a/src/gprs_rlcmac_meas.cpp b/src/gprs_rlcmac_meas.cpp
index 5a2e38e..d6bbc19 100644
--- a/src/gprs_rlcmac_meas.cpp
+++ b/src/gprs_rlcmac_meas.cpp
@@ -179,6 +179,8 @@
if (elapsed < 128)
return 0;
+ tbf->m_bw.dl_throughput = (tbf->m_bw.dl_bw_octets/elapsed);
+
LOGP(DRLCMACMEAS, LOGL_INFO, "DL Bandwitdh of IMSI=%s / TLLI=0x%08x: "
"%d KBits/s\n", tbf->imsi(), tbf->tlli(),
tbf->m_bw.dl_bw_octets / elapsed);
diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp
index ca7f7ad..8fe7999 100644
--- a/src/pcu_vty_functions.cpp
+++ b/src/pcu_vty_functions.cpp
@@ -76,6 +76,27 @@
vty_out(vty, " V(A)=%d V(S)=%d nBSN=%d%s",
win->v_a(), win->v_s(), win->resend_needed(),
win->window_stalled() ? " STALLED" : "");
+ vty_out(vty, "%s", VTY_NEWLINE);
+ vty_out(vty, " RLC Nacked=%d", dl_tbf->m_rlc_nacked);
+ if (tbf->ms()->mode() == GprsCodingScheme::GPRS) {
+ vty_out(vty, " CS1=%d CS2=%d CS3=%d CS4=%d",
+ dl_tbf->statistics.cs1,
+ dl_tbf->statistics.cs2,
+ dl_tbf->statistics.cs3,
+ dl_tbf->statistics.cs4);
+ } else {
+ vty_out(vty, " MCS1=%d MCS2=%d MCS3=%d MCS4=%d MCS5=%d",
+ dl_tbf->statistics.mcs1,
+ dl_tbf->statistics.mcs2,
+ dl_tbf->statistics.mcs3,
+ dl_tbf->statistics.mcs4,
+ dl_tbf->statistics.mcs5);
+ vty_out(vty, " MCS6=%d MCS7=%d MCS8=%d MCS9=%d",
+ dl_tbf->statistics.mcs6,
+ dl_tbf->statistics.mcs7,
+ dl_tbf->statistics.mcs8,
+ dl_tbf->statistics.mcs9);
+ }
}
vty_out(vty, "%s%s", VTY_NEWLINE, VTY_NEWLINE);
}
@@ -176,11 +197,15 @@
ms->ul_tbf()->tfi(),
ms->ul_tbf()->state_name(),
VTY_NEWLINE);
- if (ms->dl_tbf())
+ if (ms->dl_tbf()) {
vty_out(vty, " Downlink TBF: TFI=%d, state=%s%s",
ms->dl_tbf()->tfi(),
ms->dl_tbf()->state_name(),
VTY_NEWLINE);
+ vty_out(vty, " Current DL Throughput: %d Kbps %s",
+ ms->dl_tbf()->m_bw.dl_throughput,
+ VTY_NEWLINE);
+ }
llist_for_each(i_tbf, &ms->old_tbfs())
vty_out(vty, " Old %-19s TFI=%d, state=%s%s",
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 25209e4..b75e682 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -49,6 +49,23 @@
timerclear(&rssi_tv);
}
+gprs_rlcmac_tbf::Statistics::Statistics() :
+ cs1(0),
+ cs2(0),
+ cs3(0),
+ cs4(0),
+ mcs1(0),
+ mcs2(0),
+ mcs3(0),
+ mcs4(0),
+ mcs5(0),
+ mcs6(0),
+ mcs7(0),
+ mcs8(0),
+ mcs9(0)
+{
+}
+
gprs_rlcmac_tbf::gprs_rlcmac_tbf(BTS *bts_, gprs_rlcmac_tbf_direction dir) :
state_flags(0),
direction(dir),
@@ -732,7 +749,8 @@
gprs_rlcmac_dl_tbf::BandWidth::BandWidth() :
dl_bw_octets(0),
dl_loss_lost(0),
- dl_loss_received(0)
+ dl_loss_received(0),
+ dl_throughput(0)
{
timerclear(&dl_bw_tv);
timerclear(&dl_loss_tv);
@@ -744,7 +762,8 @@
m_wait_confirm(0),
m_dl_ack_requested(false),
m_last_dl_poll_fn(0),
- m_last_dl_drained_fn(0)
+ m_last_dl_drained_fn(0),
+ m_rlc_nacked(0)
{
memset(&m_llc_timer, 0, sizeof(m_llc_timer));
}
diff --git a/src/tbf.h b/src/tbf.h
index 1e98a24..97bad1d 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -225,6 +225,24 @@
uint8_t m_tfi;
time_t m_created_ts;
+ struct Statistics {
+ uint32_t cs1;
+ uint32_t cs2;
+ uint32_t cs3;
+ uint32_t cs4;
+ uint32_t mcs1;
+ uint32_t mcs2;
+ uint32_t mcs3;
+ uint32_t mcs4;
+ uint32_t mcs5;
+ uint32_t mcs6;
+ uint32_t mcs7;
+ uint32_t mcs8;
+ uint32_t mcs9;
+
+ Statistics();
+ } statistics;
+
protected:
gprs_rlcmac_bts *bts_data() const;
@@ -395,10 +413,12 @@
bool m_dl_ack_requested;
int32_t m_last_dl_poll_fn;
int32_t m_last_dl_drained_fn;
+ int32_t m_rlc_nacked;
struct BandWidth {
struct timeval dl_bw_tv; /* timestamp for dl bw calculation */
uint32_t dl_bw_octets; /* number of octets since bw_tv */
+ uint32_t dl_throughput; /* throughput to be displayed in stats */
struct timeval dl_loss_tv; /* timestamp for loss calculation */
uint16_t dl_loss_lost; /* sum of lost packets */
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index c6f3945..96262b2 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -949,6 +949,7 @@
ms()->update_error_rate(this, error_rate);
m_window.update(bts, rbb, first_bsn, &lost, &received);
+ m_rlc_nacked += lost;
/* report lost and received packets */
gprs_rlcmac_received_lost(this, received, lost);
@@ -1007,6 +1008,7 @@
m_window.update(bts, show_rbb, ssn,
&lost, &received);
+ m_rlc_nacked += lost;
/* report lost and received packets */
gprs_rlcmac_received_lost(this, received, lost);
@@ -1342,45 +1344,58 @@
switch (coding_scheme) {
case GprsCodingScheme::CS1 :
bts->gprs_dl_cs1();
+ statistics.cs1++;
break;
case GprsCodingScheme::CS2 :
bts->gprs_dl_cs2();
+ statistics.cs2++;
break;
case GprsCodingScheme::CS3 :
bts->gprs_dl_cs3();
+ statistics.cs3++;
break;
case GprsCodingScheme::CS4 :
bts->gprs_dl_cs4();
+ statistics.cs4++;
break;
}
} else {
switch (coding_scheme) {
case GprsCodingScheme::MCS1 :
bts->egprs_dl_mcs1();
+ statistics.mcs1++;
break;
case GprsCodingScheme::MCS2 :
bts->egprs_dl_mcs2();
+ statistics.mcs2++;
break;
case GprsCodingScheme::MCS3 :
bts->egprs_dl_mcs3();
+ statistics.mcs3++;
break;
case GprsCodingScheme::MCS4 :
bts->egprs_dl_mcs4();
+ statistics.mcs4++;
break;
case GprsCodingScheme::MCS5 :
bts->egprs_dl_mcs5();
+ statistics.mcs5++;
break;
case GprsCodingScheme::MCS6 :
bts->egprs_dl_mcs6();
+ statistics.mcs6++;
break;
case GprsCodingScheme::MCS7 :
bts->egprs_dl_mcs7();
+ statistics.mcs7++;
break;
case GprsCodingScheme::MCS8 :
bts->egprs_dl_mcs8();
+ statistics.mcs8++;
break;
case GprsCodingScheme::MCS9 :
bts->egprs_dl_mcs9();
+ statistics.mcs9++;
break;
}
}
--
To view, visit https://gerrit.osmocom.org/1345
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia95b0404989b00db0e7ba416bc40d09ef41fde1c
Gerrit-PatchSet: 2
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: sivasankari <Sivasankari.Theerthagiri at radisys.com>
Gerrit-Reviewer: Jenkins Builder