OpenWrt Forum Archive

Topic: I need a BandwithTestPage

The content of this topic has been archived on 6 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

BandwithTestPage - A simple CGI script for testing the instantaneous bandwidth to the wireless router. Just drop into /www/cgi-bin and chmod+x.

Where i can get this  ?  i really needed

the link http://wiki.openwrt.org/OpenWrtDocs/Customizing/ , not work

Somebody can help me

AXL

Which is completely unrelated to what yamilselman wants and needs.

He/she needs to test throughput to the router only. As far as I understand it... wink

I should have read the entire post. Sorry about the useless link.

Rob

All the website bandwidth speedtests out there sucks.

Use a download manager and download e.g. a ISO image from more than one source. That's the right way test the bandwidth...

I would suggest using iperf to test your bandwidth.

Hello Yamil

try this

#!/bin/ash
echo "Content-Type: Application/octet-stream"
echo "Content-Length: 10485760"
echo
dd if=/dev/zero bs=1024 count=10240

HTH

Conny

what exactly do that ?

i need A simple CGI script for testing bandwidth , i want to install into the routher

Thanks.

it does write out 10MB of zeros.  If you use it in your browser you can save the output to file and the browser should display the download speed.

Save the script as test.sh in /www/cgi-bin
chmod 755 /www/cgi-bin/test.sh

then retrieve http://your-router-ip/cgi-bin/test.sh in your browser.

conmarti wrote:

it does write out 10MB of zeros.  If you use it in your browser you can save the output to file and the browser should display the download speed.

Save the script as test.sh in /www/cgi-bin
chmod 755 /www/cgi-bin/test.sh

then retrieve http://your-router-ip/cgi-bin/test.sh in your browser.

I think that he want's to test his wan connection using the router. So he can be sure that it isn't spyware or the lan segments which causes a slow connection.

belrpr wrote:

I think that he want's to test his wan connection using the router. So he can be sure that it isn't spyware or the lan segments which causes a slow connection.

If this is the case, just use wget.

root@OpenWrt:~# wget -O /dev/null http://downloads.openwrt.org/kamikaze/7.09/x86-2.6/openwrt-x86-2.6-ext2.image.kernel
--12:35:18--  http://downloads.openwrt.org/kamikaze/7.09/x86-2.6/openwrt-x86-2.6-ext2.image.kernel
           => `/dev/null'
Resolving downloads.openwrt.org... 195.56.146.238
Connecting to downloads.openwrt.org|195.56.146.238|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4,611,072 (4.4M) [text/plain]

100%[====================================>] 4,611,072    347.26K/s    ETA 00:00

12:35:33 (323.34 KB/s) - `/dev/null' saved [4611072/4611072]

root@OpenWrt:~#

conmarti: Good suggestion. (wget from openwrt.org)

For local tests, your script using dd and /dev/zero is good, but /dev/random would be a better source, to avoid any intermediate attempts at compression or other optimization. (Yes, well, that would produce garbage in the receiving end's browser, but still, it's a better test!)

whbjr wrote:

For local tests, your script using dd and /dev/zero is good, but /dev/random would be a better source, to avoid any intermediate attempts at compression or other optimization. (Yes, well, that would produce garbage in the receiving end's browser, but still, it's a better test!)

My first try was using /dev/random, but it's really slow. And after 50-100 KiB of data you recieve an EOF. So i decided to use /dev/zero.

Good point - you want a data source that's at least as fast as the network! (EOF = very slow data source) :-)

The discussion might have continued from here.