diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-09-18 11:49:11 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-09-18 11:49:11 +0200 |
commit | 015427d9e74f34dc7d0f7fbad4ad1eaad6537cce (patch) | |
tree | 01ae9249194fbff234e32b59c07f7894aef16878 /doc/show_dabmux_stats.py | |
parent | 9c2e691744f96ae7ace8b82385b080ee9d858906 (diff) | |
download | dabmux-015427d9e74f34dc7d0f7fbad4ad1eaad6537cce.tar.gz dabmux-015427d9e74f34dc7d0f7fbad4ad1eaad6537cce.tar.bz2 dabmux-015427d9e74f34dc7d0f7fbad4ad1eaad6537cce.zip |
EDI in: add audio levels metadata and source version
Diffstat (limited to 'doc/show_dabmux_stats.py')
-rwxr-xr-x | doc/show_dabmux_stats.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/doc/show_dabmux_stats.py b/doc/show_dabmux_stats.py index d226208..a451ef2 100755 --- a/doc/show_dabmux_stats.py +++ b/doc/show_dabmux_stats.py @@ -46,7 +46,7 @@ if len(sys.argv) == 1: data = sock.recv() values = json.loads(data)['values'] - tmpl = "{ident:20}{maxfill:>8}{minfill:>8}{under:>8}{over:>8}{audioleft:>8}{audioright:>8}{peakleft:>8}{peakright:>8}{state:>16}" + 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}" print(tmpl.format( ident="id", maxfill="max", @@ -57,7 +57,9 @@ if len(sys.argv) == 1: audioright="audio R", peakleft="peak L", peakright="peak R", - state="state")) + state="state", + version="version", + uptime="uptime")) for ident in values: v = values[ident]['inputstat'] @@ -65,6 +67,12 @@ if len(sys.argv) == 1: if 'state' not in v: v['state'] = None + if 'version' not in v: + v['version'] = "Unknown" + + if 'uptime' not in v: + v['uptime'] = "?" + print(tmpl.format( ident=ident, maxfill=v['max_fill'], @@ -75,7 +83,9 @@ if len(sys.argv) == 1: audioright=v['peak_right'], peakleft=v['peak_left_slow'], peakright=v['peak_right_slow'], - state=v['state'])) + state=v['state'], + version=v['version'], + uptime=v['uptime'])) elif len(sys.argv) == 2 and sys.argv[1] == "config": |