Project

General

Profile

Bug #2660

osmo-mgw has no proper introspection via VTY + CTRL

Added by laforge about 1 year ago. Updated 9 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
11/18/2017
Due date:
% Done:

0%


Description

osmo-mgw should be able to show us all relevant information about each endpoint (and each connection on each EP) in the VTY

History

#1 Updated by laforge 6 months ago

  • Assignee changed from sysmocom to stsp

#2 Updated by stsp 5 months ago

  • Status changed from New to In Progress

#3 Updated by stsp 5 months ago

The 'show mgcp' VTY command already does most of what is being asked for in this issue.

I have added a VTY command which allows filtering the information shown by 'show mgcp' for a specific endpoint:
https://gerrit.osmocom.org/#/c/osmo-mgw/+/10022/
Such filtering could be quite useful for non-human VTY users, such as automated tests etc.

osmo-mgw does not seem to have a CTRL interface yet so nothing could be implemented there for this issue.

#4 Updated by stsp 4 months ago

This is waiting for a response from Neels in code review. I am unsure if I need to take further action or if the patch is fine as proposed.

#5 Updated by laforge 3 months ago

ping? the patch has been meged. please keep this ticket updated (percent done, checklist items, ...) and take care of any missing bits.

#6 Updated by stsp 3 months ago

Sorry. I forgot about updating this ticket after discussing this further with Neels.

I only recorded the result of our conversation in gerrit:
https://gerrit.osmocom.org/c/osmo-mgw/+/10022/#message-0ec211fc491919f3dadd03553d8e57f92f2d5bfc

Neels and I discussed this face-to-face today, and I've updated the patch set accordingly.
The main changes are:
There are now two new VTY commands, with and without a trunk number.
Endpoint names are printed without a 0x prefix.

I'll update this ticket's checklist now.

#7 Updated by stsp 3 months ago

  • Checklist item proper "show mgcp endpoint" command set to Done

#8 Updated by stsp 3 months ago

There are now two new commands:

  • show mgcp endpoint NAME
  • show mgcp trunk <0-64> endpoint NAME

Endpoint connection details (RTP stream IP addresses and ports) and be viewed with 'show mgcp stats'.

So the first two checklist items can be considered resolved.

It seems there remains some work to be done for the last checklist item (RTP and RTCP stats).

#9 Updated by stsp 3 months ago

  • Checklist item show endpoint connection details in vty set to Done

#10 Updated by stsp 2 months ago

No further work has been done here yet.
I plan to discuss with Philip which RTP/TCP stats would be useful to collect and display.

#11 Updated by stsp about 2 months ago

I discussed this issue with dexter today. There are some RTP statistics in OsmoMGW already, however they are lost when the connection is closed.

We put some thought into what global counters might be useful, and came up with the following list:

  • mgw: RTP/RTCP connections (sockets) current and total
  • mgw: new RTP connections rejected
  • mgw: RTP connections aborted
  • mgw: bytes+packets transferred
  • mgw: RTP packets discarded (e.g. wrong port, wrong IP, wrong payload type, ...)
And also (not RTP-related):
  • mgcp: which codecs were used by how many connections

#12 Updated by stsp about 2 months ago

Also related to this, I have submitted a patch which makes 'show rate-counters' on OsmoMGW's VTY more useful:
https://gerrit.osmocom.org/c/osmo-mgw/+/11439
('show rate-counters' displays the per-connection stats mentioned above, which are discarded when the connection is closed)

#13 Updated by laforge about 2 months ago

On Tue, Oct 23, 2018 at 01:08:37PM +0000, stsp [REDMINE] wrote:

I discussed this issue with dexter today. There are some RTP statistics in OsmoMGW already, however they are lost when the connection is closed.

hopefully the "lost" here only refers to "lost from osmo_[rate]_ctr". Any RTP implementation
should send aggregated statistics to the peer using RTCP on teardown.

  • mgw: RTP/RTCP connections (sockets) current and total
  • mgw: new RTP connections rejected

what's a "rejected connection" in the context of RTP? As RTP is UDP, each packet
can get rejected?

  • mgw: RTP connections aborted

what is an "aborted connection" in the context of RTP?

  • mgw: bytes+packets transferred

I presume that means, separatee rx + tx counters for bytes + packets, like in SGSN.

And also (not RTP-related):
  • mgcp: which codecs were used by how many connections

great idea. I presume you're referring to the codecs negotiatated during MGCP CRCX/MDCX?
The MGCP/SDP protocol actually doesn't choose one codec, but choose a list of codecs, each
mapped to a given RTP payload type (PT). But sure, in such situations one simply bumps the counter
for each of the codecs in that list?

#14 Updated by stsp about 2 months ago

Sorry for not using the correct terms.

My comments should probably have said "MGCP connection".

And yes, "lost" just means that when an mgcp connection is freed, the rate counters maintained for that connection are freed as well.

#15 Updated by stsp about 2 months ago

This proposed patch adds statistics for MGCP CRCX command failures: https://gerrit.osmocom.org/c/osmo-mgw/+/11463

#16 Updated by stsp about 1 month ago

More related patches have been proposed:

show RTP TX/RX stats in 'mgcp show stats' output
https://gerrit.osmocom.org/c/osmo-mgw/+/11494

use local variable for rate counters in handle_create_con()
https://gerrit.osmocom.org/c/osmo-mgw/+/11495

add more mgcp crxc error counters
https://gerrit.osmocom.org/c/osmo-mgw/+/11496

add MDCX command statistics to osmo-mgw
https://gerrit.osmocom.org/c/osmo-mgw/+/11499

#17 Updated by stsp about 1 month ago

Above patches have been merged.

dexter and I would still like to implement aggregation of counters maintained per RTP connection.
We'd introduce a global instance of these counters and aggregate stats from all connections there.
The reason is that per-connection counters are ephemeral; they can only be viewed on the VTY while the connection is live.

#18 Updated by stsp about 1 month ago

More proposed patches:

add aggregated rtp connection stats to osmo-mgw
https://gerrit.osmocom.org/c/osmo-mgw/+/11519

add DLCX command statistics to osmo-mgw
https://gerrit.osmocom.org/c/osmo-mgw/+/11521

#19 Updated by stsp 9 days ago

  • Checklist item show RTP and RTCP statistics / diagnostics information set to Done

#20 Updated by stsp 9 days ago

  • Status changed from In Progress to Resolved

Above patches have been merged as well.
I'm calling this issue done. If there's more to do here, please re-open.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)