Measuring Network Throughput in Linux
Updated November 26, 2002
Created November 26, 2002


Autogenerated Site Map
Search this Site!:
Search this site powered by FreeFind



Create a 100M test file and store it on a ftp server in your test environment.

dd if=/dev/sda of=/var/ftp/pub/speedtest/100M.bin bs=1024k count=100

Then download that file using your favorite download utilities that give you a bandwidth monitor such as wget or ftp:

wget ftp://172.16.0.4/pub/speedtest/100M.bin

Watch the results that wget gives you.

If it shows around 850K/s then you are likely on a 10 Mbit connection.
If it shows around 9MB/s to 12MB/s then you are likely on a 100 Mbit connection.
I couldn't find any tools that did "only" bandwidth monitoring. Maybe something like webalyzer? Even shapecfg was pointing me to ftp/wget to check bandwidth.
For e100, I had played with /etc/modules.conf:

alias eth0 e100
options e100 e100_speed_duplex=0,0

And the results were either posted on the screen as I loaded the module (service netowrk stop; rmmod e100; service network start) or I know for sure they get posted in /var/log/messages, here's the messages I was looking at:

[root@linuxone log]# fgrep Speed messages*
messages.1:Nov 20 04:03:08 linuxone kernel: Mem:0xc3fff000 IRQ:10 Speed:100 Mbps Dx:Full
messages.1:Nov 20 04:03:08 linuxone kernel: Mem:0xc6fff000 IRQ:11 Speed:100 Mbps Dx:Full
messages.1:Nov 21 10:44:53 linuxone kernel: Mem:0xc3fff000 IRQ:10 Speed:100 Mbps Dx:Full
messages.1:Nov 21 10:44:53 linuxone kernel: Mem:0xc6fff000 IRQ:11 Speed:100 Mbps Dx:Full

I found that on one of my two NICs (1 corpnet, 1 deadnet) it was connected to a 10 Mbit hub at the rack -- I could never get the proper message stating 100 Mbit (even when I was forcing to 100 half and/or 100 full -- only the 10 half and I think the 10 full worked). Once I moved the cable from the 10 Mbit hub to the 100 Mbit hub the messages came back like the above.

I don't see the bad messages so probably they've alredy been purged from the logs.


Search this Site!:
Search this site powered by FreeFind

Homepage: http://www.cpqlinux.com
Site Map: http://www.cpqlinux.com/sitemap.html