diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/STATS.md | 7 | ||||
-rw-r--r-- | doc/advanced.mux | 18 | ||||
-rw-r--r-- | doc/example.mux | 6 | ||||
-rwxr-xr-x | doc/show_dabmux_stats.py | 22 |
4 files changed, 43 insertions, 10 deletions
diff --git a/doc/STATS.md b/doc/STATS.md index 385d41e..435a92e 100644 --- a/doc/STATS.md +++ b/doc/STATS.md @@ -4,12 +4,13 @@ Stats available through Management Server Interface --------- -The management server makes statistics about the inputs available through a ZMQ request/reply socket. +The management server makes statistics about the inputs and EDI/TCP outputs +available through a ZMQ request/reply socket. The `show_dabmux_stats.py` illustrates how to access this information. -Meaning of values ------------------ +Meaning of values for inputs +---------------------------- `max` and `min` indicate input buffer fullness in bytes. diff --git a/doc/advanced.mux b/doc/advanced.mux index 246f981..d2cc0fd 100644 --- a/doc/advanced.mux +++ b/doc/advanced.mux @@ -32,9 +32,12 @@ general { tist false ; On startup, the timestamp is initialised to system time. If you want - ; to add an offset, uncomment the following line and give a number - ; in seconds. - ; tist_offset 0 + ; to add an offset, uncomment the following line and give a positive + ; number in seconds. Granularity: 24ms + ; tist_offset 0.480 + + ; Specify the TIST value for the frame with FCT==0, in milliseconds + ; tist_at_fct0 768 ; The management server is a simple TCP server that can present ; statistics data (buffers, overruns, underruns, etc) @@ -435,6 +438,10 @@ outputs { destination "192.168.23.23" port 12000 + enable_pft true + fec 1 + verbose true + ; For compatibility: if port is not specified in the destination itself, ; it is taken from the parent 'destinations' block. } @@ -449,6 +456,8 @@ outputs { ; The multicast TTL has to be adapted according to your network ttl 1 + enable_pft true + fec 1 } example_tcp { ; example for EDI TCP server. TCP is reliable, so it is counterproductive to @@ -466,7 +475,8 @@ outputs { } } - ; The settings below apply to all destinations + ; The settings below apply to all destinations, unless they are overridden + ; inside a destination ; Enable the PFT subsystem. If false, AFPackets are sent. ; PFT is not necessary when using TCP. diff --git a/doc/example.mux b/doc/example.mux index d53b789..34cd2ee 100644 --- a/doc/example.mux +++ b/doc/example.mux @@ -57,9 +57,9 @@ general { tist false ; On startup, the timestamp is initialised to system time. If you want - ; to add an offset, uncomment the following line and give a number - ; in seconds. - ; tist_offset 0 + ; to add an offset, uncomment the following line and give a positive + ; number in seconds. Granularity: 24ms + ; tist_offset 0.480 ; The URLs used to fetch the TAI bulletin can be overridden if needed. ; URLs are given as a pipe-separated list, and the default value is: diff --git a/doc/show_dabmux_stats.py b/doc/show_dabmux_stats.py index 7ea60f7..3b6d869 100755 --- a/doc/show_dabmux_stats.py +++ b/doc/show_dabmux_stats.py @@ -46,6 +46,7 @@ if len(sys.argv) == 1: data = sock.recv().decode("utf-8") values = json.loads(data)['values'] + print("## INPUT STATS") tmpl = "{ident:20}{maxfill:>8}{minfill:>8}{under:>8}{over:>8}{audioleft:>8}{audioright:>8}{peakleft:>8}{peakright:>8}{state:>16}{version:>48}{uptime:>8}{offset:>8}" print(tmpl.format( ident="id", @@ -89,6 +90,27 @@ if len(sys.argv) == 1: uptime=v['uptime'], offset=v['last_tist_offset'])) + sock.send(b"output_values") + + poller = zmq.Poller() + poller.register(sock, zmq.POLLIN) + + socks = dict(poller.poll(1000)) + if socks: + if socks.get(sock) == zmq.POLLIN: + print() + print("## OUTPUT STATS") + data = sock.recv().decode("utf-8") + values = json.loads(data)['output_values'] + for identifier in values: + if identifier.startswith("edi_tcp_"): + listen_port = identifier.rsplit("_", 1)[-1] + num_connections = values[identifier]["num_connections"] + print(f"EDI TCP on port {listen_port}: {num_connections} connections") + else: + print(f"Unknown output type: {identifier}") + + elif len(sys.argv) == 2 and sys.argv[1] == "config": sock = connect() |