Skip to content

Instantly share code, notes, and snippets.

@phpdave
Last active October 4, 2016 13:48
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 phpdave/be2ec723acb5af9b258282a310e48925 to your computer and use it in GitHub Desktop.
Save phpdave/be2ec723acb5af9b258282a310e48925 to your computer and use it in GitHub Desktop.
#Server
iperf -s -i 1
#client
iperf -c <server_ip> -i 1
#other options
iperf --help
#Server (note sometimes nc is netcat instead)
nc -v -v -l -n -p 2222 >/dev/null
#Client
time yes|nc -v -v -n 192.168.0.8 2222 >/dev/null
#Stop by using ctrl+c
sent 87478392, rcvd 0
real 0m9.993s
#Take the bytes sent times by 8 (conversion bytes->bits) and divided by time elapsed to get Mb/s (Megabits per second)
#70Mb/s (=87478392*8/9.993)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment