Page 1 of 1

Measure Internet Speed directly through the router

Posted: Wed May 09, 2018 8:26 pm
by d3fz
I've been searching on the subject in the past couple of days, and thought it could be useful as a plugin or to anybody interested.

speedtest-cli would be great for this, but since it relies on Python to work, it won't fit on the router. On the other hand, it's a great tool to measure internet speed on terminals, etc.

Although, I've found this script that runs using "netperf" package, and it worked great on my Archer C7.

So all I did was:

Code: Select all

# Install netperf package
opkg update
opkg install netperf

# Copy the script "betterspeedtest.sh" to /usr/lib/gargoyle
Set script file permission to rwxrwxr-x (0775)

# Issue the following from PuTTY
sh /usr/lib/gargoyle/betterspeedtest.sh
The only drawback is that it doesn't scan for nearest servers (which can be passed by parameter), so it can give different results from speedtest.net.

I wonder if this could be useful in Gargoyle itself? Maybe Remote monitoring, QoS DL/UL total bandwidth estimation, etc.

Any more ideas?

Re: Measure Internet Speed directly through the router

Posted: Thu May 10, 2018 1:35 am
by Lantis
Running the speed test on the router itself skews the result due to load on the CPU.
It’s not ideal, but it could provide an estimate.

If your line speed is close to the limit of your CPU you will not get good results.

Re: Measure Internet Speed directly through the router

Posted: Thu May 10, 2018 2:08 pm
by d3fz
I see. Then it's a probably not a good idea to run this on slow routers with a good connection (>50MB maybe?).

As reference, I've tested this on an Archer C7 (720Mhz) + 50MB/6MB link while monitoring CPU usage with "top", and it didn't seem to take that much CPU processing.

Still need to test it with "Bandwidth Monitor" disabled (only for running the script), to see if there's any difference.

Now just out of curiosity, is there a big difference in CPU usage when running speedtest through a client and directly through the router? Assuming both tests reach max line speeds.