Guest User

download benchmark test

a guest
May 2nd, 2014
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.82 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. echo "
  4. ###############################################################################
  5. Download tests. Warning: downloads approx 100MB per site. Total approx 1.8GB
  6. ###############################################################################
  7. "
  8. echo "Local port speed loop check"
  9. dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
  10.  
  11.  
  12. function download_benchmark() {
  13. #echo "Benchmarking download from $1 ($2)"
  14.   DOWNLOAD_SPEED=`wget -O /dev/null $2 2>&1 | awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); print speed}'`
  15.   echo "Got $DOWNLOAD_SPEED :  $1 ($2)"
  16. }
  17.  
  18. echo "Running bandwidth benchmark..."
  19. download_benchmark 'CDN77 Chicago, US          ' 'http://793343545.r.cdn77.net/design/swf/testfile100.bin'
  20. download_benchmark 'Cachefly                   ' 'http://cachefly.cachefly.net/100mb.test'
  21. download_benchmark 'OVH, Montreal, Canada      ' 'http://proof.ovh.ca/files/100Mio.dat'
  22. download_benchmark 'Linode, Atlanta, GA, USA   ' 'http://speedtest.atlanta.linode.com/100MB-atlanta.bin'
  23. download_benchmark 'Linode, Dallas, TX, USA    ' 'http://speedtest.dallas.linode.com/100MB-dallas.bin'
  24. download_benchmark 'Softlayer, Seattle, WA, USA' 'http://speedtest.sea01.softlayer.com/downloads/test100.zip'
  25. download_benchmark 'Softlayer, S Jose,CA, USA  ' 'http://speedtest.sjc01.softlayer.com/downloads/test100.zip'
  26. download_benchmark 'Softlayer, Wash, DC, USA   ' 'http://speedtest.wdc01.softlayer.com/downloads/test100.zip'
  27. download_benchmark 'Leaseweb, Manassas, VA, USA' 'http://mirror.us.leaseweb.net/speedtest/100mb.bin'
  28. #download_benchmark 'Linode, Tokyo, JP          ' 'http://speedtest.tokyo.linode.com/100MB-tokyo.bin'
  29. download_benchmark 'OVH, Paris, France         ' 'http://proof.ovh.net/files/100Mio.dat'
  30. download_benchmark 'Linode, London, UK         ' 'http://speedtest.london.linode.com/100MB-london.bin'
  31. download_benchmark 'SmartDC, Rotterdam, NL     ' 'http://mirror.i3d.net/100mb.bin'
  32. download_benchmark 'Hetzner, Nuernberg, DE     ' 'http://hetzner.de/100MB.iso'
  33. download_benchmark 'iiNet, Perth, WA, AUS      ' 'http://ftp.iinet.net.au/test100MB.dat'
  34. #download_benchmark 'MammothVPS, Sydney, AUS    ' 'http://www.mammothvpscustomer.com/test100MB.dat'
  35. download_benchmark 'Leaseweb, Haarlem, NL      ' 'http://mirror.nl.leaseweb.net/speedtest/100mb.bin'
  36. #download_benchmark 'Softlayer, Singapore       ' 'http://speedtest.sng01.softlayer.com/downloads/test100.zip'
  37.  
  38. echo "Downloading and running speedtest.net CLI"
  39. wget --quiet --no-check-certificate https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
  40. python speedtest_cli.py
  41. rm speedtest_cli.py
  42.  
  43. echo "Running traceroute..."
  44. echo "Traceroute (cachefly.cachefly.net): `traceroute cachefly.cachefly.net 2>&1`"
  45.  
  46. echo "Running ping benchmark..."
  47. echo "Pings (cachefly.cachefly.net): `ping -c 10 cachefly.cachefly.net 2>&1`"
Add Comment
Please, Sign In to add comment