From 8358123952c2271a52f1821c3610cb8202e211d7 Mon Sep 17 00:00:00 2001 From: Stephen C Phillips <steve@scphillips.com> Date: Mon, 19 Feb 2018 15:35:13 +0000 Subject: [PATCH] Adds reporting of errors from VLC clients Not quite working well enough: too slow --- test/streaming/report.sh | 8 ++++++++ test/streaming/run.sh | 5 ++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 test/streaming/report.sh diff --git a/test/streaming/report.sh b/test/streaming/report.sh new file mode 100644 index 0000000..351011d --- /dev/null +++ b/test/streaming/report.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +COUNTER=$1 +TELEGRAF=http://localhost:8186 + +while read line; do + curl -i -XPOST "${TELEGRAF}/write?precision=s" --data-binary "vlc,client=${COUNTER} drop_error=1 $(date +%s)" >& /dev/null +done diff --git a/test/streaming/run.sh b/test/streaming/run.sh index 2c8c930..467b572 100755 --- a/test/streaming/run.sh +++ b/test/streaming/run.sh @@ -31,7 +31,7 @@ if [ "$#" -ne 3 ]; then fi # create test directories -TEST_FOLDER=$(date +%Y%m%d%H%M%S) +TEST_FOLDER=$(date +%Y%m%d%H%M%S) TEST_RUN_DIR=$1 TEST_DIR=$TEST_RUN_DIR"/streaming/"$TEST_FOLDER echo "Test directory: "$TEST_DIR @@ -47,8 +47,7 @@ STREAM_URI=$2 COUNTER=0 MAX_CLIENTS=$3 while [ $COUNTER -lt $MAX_CLIENTS ]; do - cvlc -Vdummy --no-audio $STREAM_URI &>$TEST_DIR/stdout$COUNTER & - # cvlc -Vdummy --no-audio --verbose=0 --file-logging --logfile=$TEST_DIR/vlc-log$COUNTER.txt $STREAM_URI & + cvlc -Vdummy --no-audio $STREAM_URI 2>&1 | tee $TEST_DIR/stdout$COUNTER | grep "dropping" | /home/ubuntu/flame-clmc/test/streaming/report.sh ${COUNTER} & sleep 1 let COUNTER=COUNTER+1 done -- GitLab