sudo apt-get install iperf

server side: iperf -s
client side: iperf -c
or -t for seconds to meausre and -i for iterative duration:
iperf -c portal.kandao.tech –t 120 –i 10