Let’s say that all that you have access to is the command line on a Linux box and you want to know what the network throughput is. If you have another Linux box you can use netcat to do a quick test:
On box a:? Set up netcat to listen to a given port:
nc -l 12345 > /dev/null
Fire up netcat to listen on port 12345 and to dump the output to /dev/null.
On box b:? Send data via netcat to the listening machine:
dd if=/dev/zero bs=16000 count=50000 | nc -v boxa 12345
This will use dd to generate a ‘file’ with 50000 blocks that are 16000 bytes in size and invoke netcat in verbose mode. When invoked you will get something like:
Connection to boxa 12345 port [tcp/*] succeeded!
50000+0 records in
50000+0 records out
800000000 bytes (800 MB) copied, 6.85282 seconds, 117 MB/s