add untracked files
This commit is contained in:
12
collectd/usr/local/bin/speedtest-data
Executable file
12
collectd/usr/local/bin/speedtest-data
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
SPEEDTEST=/sbin/speedtest-cli
|
||||
COLLECTION=server
|
||||
INTERVAL=1800
|
||||
|
||||
while :; do
|
||||
SECONDS=0
|
||||
RESULT=($($SPEEDTEST | grep Mbit | cut -d' ' -f 2))
|
||||
echo "PUTVAL $COLLECTION/exec-speedtest/gauge-download interval=$INTERVAL N:${RESULT[0]}"
|
||||
echo "PUTVAL $COLLECTION/exec-speedtest/gauge-upload interval=$INTERVAL N:${RESULT[1]}"
|
||||
sleep $((INTERVAL-$SECONDS))
|
||||
done
|
||||
Reference in New Issue
Block a user