summaryrefslogtreecommitdiffstats
path: root/doc/show_dabmux_stats.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/show_dabmux_stats.py')
-rwxr-xr-xdoc/show_dabmux_stats.py16
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":