安装 iperf和服务器之间测速


安装

# https://downloads.es.net/pub/iperf/iperf-3.1.3.tar.gz

wget https://iperf.fr/download/source/iperf-3.1.3-source.tar.gz
tar zxvf iperf-3.1.3-source.tar.gz
cd iperf-3.1.3
./configure
make
make install


# mac 安装
brew install iperf

测试网速

# 开启服务端
[root@172.168.0.155 ~]# iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------



# 客户端连接
iperf3 -c  172.168.0.155
Connecting to host 172.168.0.155, port 5201
[  4] local 172.168.0.154 port 36160 connected to 172.168.0.155 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  13.0 MBytes   109 Mbits/sec  148   39.6 KBytes       
[  4]   1.00-2.00   sec  4.54 MBytes  38.1 Mbits/sec  159   59.4 KBytes       
[  4]   2.00-3.00   sec  1.30 MBytes  10.9 Mbits/sec  265   46.7 KBytes       
[  4]   3.00-4.00   sec  1.43 MBytes  12.0 Mbits/sec  169   49.5 KBytes       
[  4]   4.00-5.00   sec  11.6 MBytes  97.5 Mbits/sec  151   42.4 KBytes       
[  4]   5.00-6.00   sec  7.58 MBytes  63.6 Mbits/sec  138   45.2 KBytes       
[  4]   6.00-7.00   sec  10.6 MBytes  89.1 Mbits/sec  112   45.2 KBytes       
[  4]   7.00-8.00   sec  1.68 MBytes  14.1 Mbits/sec  112   42.4 KBytes       
[  4]   8.00-9.00   sec  7.21 MBytes  60.5 Mbits/sec  164   39.6 KBytes       
[  4]   9.00-10.00  sec  1.86 MBytes  15.6 Mbits/sec  150   33.9 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  60.8 MBytes  51.0 Mbits/sec  1568             sender
[  4]   0.00-10.00  sec  60.3 MBytes  50.6 Mbits/sec                  receiver

iperf Done.


# 测出带宽50M

 参考: https://www.jianshu.com/p/3ff34bd58d00