[PATCH] osmo-gsm-manuals[master]: CTRL: add rate counter dumper to examples

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

Max gerrit-no-reply at lists.osmocom.org
Thu Dec 7 15:50:26 UTC 2017


Review at  https://gerrit.osmocom.org/5221

CTRL: add rate counter dumper to examples

This describe rate counter dumper added to osmo-python-tests in
I12b369434e4ee9b38f92872f297e1f3d4f0698c2

Change-Id: I52d735f373f2e7aa1f12941fc450c0e9740ccdeb
Related: OS#2550
---
M common/chapters/control_if.adoc
1 file changed, 31 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/21/5221/1

diff --git a/common/chapters/control_if.adoc b/common/chapters/control_if.adoc
index 682483a..dd6938a 100644
--- a/common/chapters/control_if.adoc
+++ b/common/chapters/control_if.adoc
@@ -173,7 +173,7 @@
 so its use is discouraged.
 There might still be some applications not yet converted to rate_ctr.
 
-=== Control Interface python example: `osmo_ctrl.py`
+=== Control Interface python examples
 
 In the `osmo-python-tests` repository, there is an example python script
 called `osmopy/osmo_ctrl.py` which implements the Osmocom
@@ -184,6 +184,36 @@
 for developing your own python software talking to the control
 interface.
 
+Another implementation is in `osmopy/rate_ctr2csv.py` which will retrieve performance counters
+for a given Osmocom program and output it in csv format. This can be used to periodically (using systemd timer
+for example) retrieve data to build KPI and evaluate how it changes over time.
+
+Internally it uses "+rate_ctr.*+" variable described in <<ctrl_common_var>> to get the list of counter groups
+and than request all the counters in each group. Applications interested in individual metrics can request it
+directly using `rate_ctr2csv.py` as an example.
+
+==== Getting rate counters
+
+.Example: Use `rate_ctr2csv.py` to get rate counters from OsmoBSC
+----
+$ ./osmopy/rate_ctr2csv.py --header
+Connecting to localhost:4249...
+Getting rate counter groups info...
+"group","counter","absolute","second","minute","hour","day"
+"e1inp.0","hdlc:abort","0","0","0","0","0"
+"e1inp.0","hdlc:bad_fcs","0","0","0","0","0"
+"e1inp.0","hdlc:overrun","0","0","0","0","0"
+"e1inp.0","alarm","0","0","0","0","0"
+"e1inp.0","removed","0","0","0","0","0"
+"bsc.0","chreq:total","0","0","0","0","0"
+"bsc.0","chreq:no_channel","0","0","0","0","0"
+...
+"msc.0","call:active","0","0","0","0","0"
+"msc.0","call:complete","0","0","0","0","0"
+"msc.0","call:incomplete","0","0","0","0","0"
+Completed: 44 counters from 3 groups received.
+----
+
 ==== Setting a value
 
 .Example: Use `osmo_ctrl.py` to set the short network name of OsmoBSC

-- 
To view, visit https://gerrit.osmocom.org/5221
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I52d735f373f2e7aa1f12941fc450c0e9740ccdeb
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list