Created
September 12, 2020 12:50
-
-
Save janaz/edc26e298e00d8bc172a78eff4bea770 to your computer and use it in GitHub Desktop.
Revisions
-
janaz revised this gist
Sep 12, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ #!/bin/sh HOSTNAME="${COLLECTD_HOSTNAME:-localhost}" INTERVAL="${COLLECTD_INTERVAL:-3600}" while true; do -
janaz created this gist
Sep 12, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ #!/bin/sh HOSTNAME="${COLLECTD_HOSTNAME:-door}" INTERVAL="${COLLECTD_INTERVAL:-3600}" while true; do result="$(speedtest --csv)" upload="$(echo "$result" | cut -d, -f8)" download="$(echo "$result" | cut -d, -f7)" echo "PUTVAL \"$HOSTNAME/speedtest/upload\" interval=$INTERVAL N:$upload" echo "PUTVAL \"$HOSTNAME/speedtest/download\" interval=$INTERVAL N:$download" sleep "$INTERVAL" done