Skip to content

Instantly share code, notes, and snippets.

@colin-nolan
Created September 16, 2017 16:23
Show Gist options
  • Save colin-nolan/a45cd1cf2562aabe5e4a86a93583ba0d to your computer and use it in GitHub Desktop.
Save colin-nolan/a45cd1cf2562aabe5e4a86a93583ba0d to your computer and use it in GitHub Desktop.
Periodically logs the Internet speed (requires `speedcheck` CLI)
#!/bin/bash
set -euf -o pipefail
# Note: jitter is not removed
PERIOD_IN_SECONDS=3600
while true
do
# To install `speedtest`: `pip install speedtest-cli`
results=$(speedtest --json)
echo ${results}
echo ${results} >> results
sleep ${PERIOD_IN_SECONDS}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment