Internet Speed tests


(Mark Edworthy) #1

Earlier today, I was asked about Internet (upload / download) speed tests and issues surrounding accuracy.

I was wondering if there is any sort of speedtest that could be installed on a gateway based server.

I would prefer to have something that could be accessed via a LAMP framework and uses HTML5 (and does not use Flash), rather then a console based command.

Has anybody got any ideas for a viable solution?


(Marc) #2

You mean for any linux/bsd gateway? For nethserver there’s a speedtest diagnostic tab.


(Mark Edworthy) #4

Actually, I am thinking about a distribution neutral tool.

I have a client who is using a x86_64 version of Debian and I am personally thinking about incorporating something suitable into a ARM based Debian / Armbian installation.


(Carlo Minucci) #5

do you like a solution like this?


(Marc) #6

@gecco that looks nice. Is it a custom script you made?

@medworthy, just dropping here some untested links. What follows is a mixed list of speedtest tools based on html, javascript or other technologies. Some will allow clients to do speed tests against third-party servers or yours:

3rd. party services:

Note some aren’t FOSS, could collect data, could be widgets (some with ads) to online speed-testers.


(Mark Edworthy) #7

@gecco,
Like the idea :slight_smile:

@dnutan,
Thanks, I did have a look at the ookla.com version but it’s not FOSS compliant and I believe is a commercial product.

I will examine these other solutions and see which one (if any) are suitable.


(Carlo Minucci) #8

i use this script for test https://pypi.python.org/pypi/speedtest-cli/ and put the result in a log file with a crontab script like this:

python speedtest_cli.py | grep Mbit | tr -d “\n” | awk ‘{system(“date “+%Y-%m-%d %H:%M:%S” | tr -d “\n””); print " " $2 " " $4}’ >> /var/log/speedtest.log
/root/speedtestgrafico.sh > /var/www/html/totem/speedtest.html

speedtestgrafico.sh is:

> #!/bin/bash
> echo "<h3>Grafico andamento SpeedTest</h3>";
> echo "<canvas id=\"myCanvas\" width=\"600\" height=\"300\" style=\"border:1px solid #d3d3d3;\">
> Your browser does not support the HTML5 canvas tag.</canvas>


> <script>
> var c = document.getElementById(\"myCanvas\");
> var ctx = c.getContext(\"2d\");
> ctx.beginPath();
> ";

> j=0;
> for i in $( cat /var/log/speedtest.log | awk '{print $3}' | tail -20 ); do
>         echo "ctx.lineTo(\"$j\", 280-(\"$i\"*3));";
>         echo "ctx.fillText(\"$i\", \"$j\", 280-($i*3));";
>         ((j=j+30))
> done

> echo "ctx.strokeStyle=\"#22c\";
> ctx.stroke();"

> echo ""

> echo "var ctx = c.getContext(\"2d\");"
> echo "ctx.beginPath();"
> j=0;
> for i in $( cat /var/log/speedtest.log | awk '{print $4}' | tail -20 ); do
>         echo "ctx.lineTo(\"$j\", 280-(\"$i\"*3));";
>         echo "ctx.fillText(\"$i\", \"$j\", 280-($i*3));";
>         ((j=j+30))
> done
> echo "ctx.strokeStyle=\"#c22\";"
> echo "ctx.stroke();"

> echo ""

> echo "var ctx = c.getContext(\"2d\");"

> j=0;
> for i in $( cat /var/log/speedtest.log | tail -20 | awk '{print $2}' | cut -d ":" -f1); do
>         echo "ctx.fillText(\"$i:00\", \"$j\", \"300\");";
>         ((j=j+30)) 
> done
> echo "ctx.stroke();
> </script>";[details=Summary]This text will be hidden[/details]