Testing network throughput

There is a really great command line tool to see network through put, bwm-ng it can be installed on Ubuntu with

sudo apt-get install bwm-ng

  bwm-ng v0.6 (probing every 0.500s), press 'h' for help
  input: /proc/net/dev type: rate
  |         iface                   Rx                   Tx                Total
  ==============================================================================
             eth0:           6.55 KB/s            5.76 KB/s           12.31 KB/s
               lo:           0.00 KB/s            0.00 KB/s            0.00 KB/s
  ------------------------------------------------------------------------------
            total:            6.55 KB/s            5.76 KB/s           12.31 KB/s

See the home page for usage and more details
Bandwidth Monitor NG

Using the above command along with ‘nc’, netcat, to create network traffic without using files makes life more fun. You will need two PC’s, on computer A run the listening command

nc -v -k -l 3333 > /dev/null

The output should be similar to this

Listening on [0.0.0.0] (family 0, port 3333)

On the other computer, the one sending run this command adjust the dd parameters bs and count to change the amount of data being sent.

dd if=/dev/zero bs=1000M count=1 | nc -v -v -n 192.168.0.9 3333

The output should be similar to this

Connection to 192.168.0.9 3333 port [tcp/*] succeeded!
1+0 records in
1+0 records out
1048576000 bytes (1.0 GB) copied, 26.4503 s, 39.6 MB/s

On computer A you will only see

Connection from [192.168.0.10] port 3333 [tcp/*] accepted (family 2, sport 47807)

Leave a Reply

Your email address will not be published. Required fields are marked *