scripts-github-mirror/speedtest
tianyu d7917ef7de fix url 2015-09-07 19:57:59 +08:00
..
README-CN.md Update README-CN.md 2015-07-20 12:53:45 +08:00
README.md Update README.md 2015-07-20 12:53:07 +08:00
speedtest.php Create speedtest.php 2015-08-03 20:58:37 +08:00
speedtest.py Update speedtest.py 2015-08-07 09:53:59 +08:00
speedtest.sh fix url 2015-09-07 19:57:59 +08:00

README.md

This script can do a speedtest to servers and then send the result to your email, you can add this to crontab.

###openwrt dependency

This script are using curl wget timeout and https. If you're using this on openwrt router, you need to do the following commands

opkg update
opkg install coreutils-timeout
opkg install ca-certificates
opkg install curl
opkg install wget

###How to use

1. Get the script from github

cd ~/bin
wget https://raw.githubusercontent.com/xdtianyu/scripts/master/speedtest/speedtest.sh -O speedtest
chmod +x speedtest

You can add ~/bin to your PATH in /etc/profile

2. Script configuration

Replace EMAIL with your email address.

Replace TEST_FILES arrays with your own test files. Each test will only has TIMEOUT seconds(default 20) and then timeout.

You can replace NAME with speedtest(home) to distinguish other tests.

3. Do a speedtest

~/bin/speedtest

Then check your email for result.

4. Add to crontab

crontab -e

25 * * * * /root/bin/speedtest

This means at every hour's 25, a speedtest runs and you get a result email.