https://projects.osmocom.org/https://projects.osmocom.org/favicon.ico?16647414092017-11-28T17:50:54ZOpen Source Mobile Communicationslibosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=64112017-11-28T17:50:54Zmsuraev
<ul></ul><p>What does request for <code>rate_ctr.*</code> returns?</p> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=64122017-11-28T17:55:23Zmsuraev
<ul></ul><p>Unable to reproduce with osmo-bsc:</p>
<pre>
./osmopy/osmo_ctrl.py -d localhost -g 'rate_ctr.*'
Got message: GET_REPLY 3150373144906480423 rate_ctr.* e1inp.0;bsc.0;msc.0;
./osmopy/osmo_ctrl.py -d localhost -g 'rate_ctr.abs.msc.0.call:mo_setup'
Got message: GET_REPLY 3344138407237695467 rate_ctr.abs.msc.0.call:mo_setup 0
./osmopy/osmo_ctrl.py -d localhost -g 'rate_ctr.abs.msc.*'
Got message: GET_REPLY 4460198632825467370 rate_ctr.abs.msc.* loc_update_type:attach 0;loc_update_type:normal 0;loc_update_type:periodic 0;loc_update_type:detach 0;loc_update_resp:failed 0;loc_update_resp:completed 0;sms:submitted 0;sms:no_receiver 0;sms:delivered 0;sms:rp_err_mem 0;sms:rp_err_other 0;sms:deliver_unknown_error 0;call:mo_setup 0;call:mo_connect_ack 0;call:mt_setup 0;call:mt_connect 0;call:active 0;call:complete 0;call:incomplete 0;
</pre> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=64132017-11-28T17:56:35Zpespin
<ul></ul><pre>
GET 1 rate_ctr.*
GET_REPLY 1 rate_ctr.* sgsn:pdpctx.5;sgsn:mmctx.2320090910;bssgp:bss_ctx.1800;bssgp:bss_ctx.0;ns:nsvc.1800;sgsn.0;ns:nsvc.65534;
</pre> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=64142017-11-28T17:58:19Zmsuraev
<ul></ul><p>The request was incorrect:<br /><pre>
./osmopy/osmo_ctrl.py -d localhost -p 4251 -g 'rate_ctr.abs.sgsn.0.llc:ul_bytes'
Got message: GET_REPLY 158669082903443187 rate_ctr.abs.sgsn.0.llc:ul_bytes 0
</pre></p>
<p>We've got to update docs to clarify this.</p> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=64152017-11-28T18:03:54Zpespin
<ul></ul><p>Yes indeed, it seems I had to pass that index after "sgsn": sgsn.0</p>
<pre>
GET 1 rate_ctr.abs.sgsn.llc:dl_bytes
GET_REPLY 1 rate_ctr.abs.sgsn.llc:dl_bytes llc:dl_bytes 4769;llc:ul_bytes 6300;llc:dl_packets 47;llc:ul_packets 51;gprs:attach_requested 1;gprs:attach_accepted 1;gprs:attach_rejected 0;gprs:detach_requested 0;gprs:detach_acked 0;gprs:routing_area_requested 4;gprs:routing_area_requested 4;gprs:routing_area_requested 0;pdp:activate_requested 1;pdp:activate_rejected 0;pdp:activate_accepted 1;pdp:request_activated 0;pdp:request_activate_rejected 0;pdp:modify_requested 0;pdp:modify_accepted 0;pdp:dl_deactivate_requested 0;pdp:dl_deactivate_accepted 0;pdp:ul_deactivate_requested 0;pdp:ul_deactivate_accepted 0;
GET 1 rate_ctr.abs.sgsn.0.llc:dl_bytes
GET_REPLY 1 rate_ctr.abs.sgsn.0.llc:dl_bytes 4769
</pre>
However, I don't know why using "sgsn" without ".0" returns all of them actually. I would expect one of the following behaviour:
<ul>
<li>GET 1 rate_ctr.abs.sgsn.* -> should print the prefix "0" somehow before printing all the variables containing it, or otherwise fail.</li>
<li>GET 1 rate_ctr.abs.sgsn.llc:dl_bytes -> should fail as no ".0" prefix has been given.</li>
<li>GET 1 rate_ctr.abs.sgsn.llc -> should fail as no ".0" prefix has been given.</li>
</ul> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=64162017-11-28T18:06:31Zmsuraev
<ul></ul><p>Gerrit 5076 has documentation update which should clarify this.</p> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=64172017-11-28T18:07:39Zmsuraev
<ul><li><strong>Project</strong> changed from <i>OsmoSGSN</i> to <i>Cellular Network Infrastructure</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li><li><strong>Assignee</strong> changed from <i>4368</i> to <i>msuraev</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>50</i></li></ul> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=64182017-11-28T18:33:31Zpespin
<ul></ul><p>The doc patch is fine, but the parsing is still outputing nonsense if the path is not correctly specified.</p> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=64192017-11-28T18:35:21Zmsuraev
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Feedback</i></li><li><strong>Assignee</strong> changed from <i>msuraev</i> to <i>pespin</i></li></ul><p>How should output look like instead?</p> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=64202017-11-28T18:44:08Zpespin
<ul><li><strong>Assignee</strong> changed from <i>pespin</i> to <i>msuraev</i></li></ul><p>I already posted what's wrong:<br /><pre>
However, I don't know why using "sgsn" without ".0" returns all of them actually. I would expect one of the following behaviour:
* GET 1 rate_ctr.abs.sgsn.* -> should print the prefix "0" somehow before printing all the variables containing it, or otherwise fail. Or print all the prefixes available.
* GET 1 rate_ctr.abs.sgsn.llc:dl_bytes -> should fail as no ".0" prefix has been given.
* GET 1 rate_ctr.abs.sgsn.llc -> should fail as no ".0" prefix has been given.
</pre></p>
<p>Also, if you try to run "GET 1 rate_ctr.abs.sgsn.llc:dl_bytes", then it could be known that the index is missing so an error stating it can be provided.</p> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=64212017-11-28T18:47:00Zmsuraev
<ul><li><strong>Assignee</strong> deleted (<del><i>msuraev</i></del>)</li></ul> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=64222017-11-28T19:04:23Zmsuraev
<ul><li><strong>Project</strong> changed from <i>Cellular Network Infrastructure</i> to <i>libosmocore</i></li><li><strong>Subject</strong> changed from <i>CTRL iface: unable to fetch one specific rate_ctr</i> to <i>CTRL iface: make rate_ctr request parser more strict</i></li></ul><p>That's possible by rewriting get_rate_ctr() but I don't see much gain: the documented cases work as expected. The fact that you can get some extra info using undocumented request is just minor annoyance.</p> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=64232017-11-28T19:04:43Zmsuraev
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>New</i></li></ul> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=64242017-11-28T19:06:03Zpespin
<ul></ul><p>Minor annoyance which can break your scripts in weird ways by receiving data through undocumented behaviour instead of returning an error.</p> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=64252017-11-28T19:10:32Zmsuraev
<ul></ul><p>pespin wrote:</p>
<blockquote>
<p>can break your scripts in weird ways by receiving data through undocumented behaviour</p>
</blockquote>
<p>Scripts relying on undocumented behavior are expected to fail :)<br />Anyway, feel free to fix it.</p> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=64362017-11-29T13:37:52Zneelsnhofmeyr@sysmocom.de
<ul></ul><p>BTW, seeing output like</p>
<pre>
GET_REPLY 1 rate_ctr.abs.sgsn.llc:dl_bytes llc:dl_bytes 4769;llc:ul_bytes 6300;llc:dl_packets 47;llc:ul_packets 51;gprs:attach_requested 1;gprs:attach_accepted 1;gprs:attach_rejected 0;gprs:detach_requested 0;gprs:detach_acked 0;gprs:routing_area_requested 4;gprs:routing_area_requested 4;gprs:routing_area_requested 0;pdp:activate_requested 1;pdp:activate_rejected 0;pdp:activate_accepted 1;pdp:request_activated 0;pdp:request_activate_rejected 0;pdp:modify_requested 0;pdp:modify_accepted 0;pdp:dl_deactivate_requested 0;pdp:dl_deactivate_accepted 0;pdp:ul_deactivate_requested 0;pdp:ul_deactivate_accepted 0;
</pre>
<p>makes me want to move back to newline-separated rate ctr reports. Sure the CTRL is for machine interaction, but there's no point in making it less readable for no benefit, both \n and ; are just a single character.</p> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=64372017-11-29T13:40:46Zmsuraev
<ul></ul><p>I'd rather stick with ; to avoid questions raised in <a class="external" href="https://gerrit.osmocom.org/#/c/4068/">https://gerrit.osmocom.org/#/c/4068/</a></p> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=176622020-03-08T13:06:58Zlaforge
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-1 priority-2 priority-default" href="/issues/4443">Bug #4443</a>: CTRL interface blocks wildcard in rate_ctr</i> added</li></ul> libosmocore - Bug #2688: CTRL iface: make rate_ctr request parser more stricthttps://projects.osmocom.org/issues/2688?journal_id=217192021-03-24T12:37:14Zlaforge
<ul><li><strong>Category</strong> set to <i>libosmocore</i></li></ul>