Donnerstag, 25. August 2016

Download Speed test as cron


To download a file regularly and log the speed in a file, add the following to a script and run the script with cron

wget -O /dev/null http://url.to/file.avi 2>&1 | grep --only-matching '\([0-9.]\+ [KM]B/s\)' | awk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush(); }'  >> /home/user/download.log

Keine Kommentare: