Skip to content

Instantly share code, notes, and snippets.

@mowings
Last active November 3, 2015 04:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mowings/a875d40879ce5ba60011 to your computer and use it in GitHub Desktop.
Save mowings/a875d40879ce5ba60011 to your computer and use it in GitHub Desktop.
Network speed test with nc or ssh
On the receiver
nc -l -v 1234 > /dev/null
On the sender
dd if=/dev/zero bs=4096 count=104800 | nc <host> 1234
if can be a file if desired, but I found there were no real differences. Do NOT use
/dev/urandom, as urandom itself can be a huge bottleneck (depending on hardware)
A file might look like this:
dd if=/volume1/video/test.mp4 bs=1024K | nc <host> 1234
You can also use ssh, although ssh does encryption and compression, so with a
realistic load, nc tends to be better:
dd if=/dev/zero bs=4096 count=1048576 | ssh user@host 'cat > /dev/null'
A large file as input may be a more realistic load.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment