Last active
November 3, 2015 04:22
-
-
Save mowings/a875d40879ce5ba60011 to your computer and use it in GitHub Desktop.
Network speed test with nc or ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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