喵♂呜 的博客

一个刚毕业就当爹的程序猿 正在迷雾中寻找道路...

Iperf编译安装与使用

家里的 NAS 和服务器都搞完了 需要测试一下网络
iperf 是一个网络监测工具

安装

1
2
3
4
5
git clone https://github.com/esnet/iperf.git
cd iperf/
./configure
make -j2
sudo make install

使用

  • 开启服务端
1
iperf3 -s
  • 客户端连接测试
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[root@NAS iperf]$ iperf3 -c 192.168.0.2
Connecting to host 192.168.0.2, port 5201
[ 5] local 192.168.0.3 port 47820 connected to 192.168.0.2 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 114 MBytes 960 Mbits/sec 0 481 KBytes
[ 5] 1.00-2.00 sec 112 MBytes 937 Mbits/sec 0 563 KBytes
[ 5] 2.00-3.00 sec 113 MBytes 949 Mbits/sec 0 597 KBytes
[ 5] 3.00-4.00 sec 112 MBytes 943 Mbits/sec 0 625 KBytes
[ 5] 4.00-5.00 sec 111 MBytes 933 Mbits/sec 0 672 KBytes
[ 5] 5.00-6.00 sec 112 MBytes 944 Mbits/sec 0 686 KBytes
[ 5] 6.00-7.00 sec 111 MBytes 933 Mbits/sec 0 713 KBytes
[ 5] 7.00-8.00 sec 112 MBytes 944 Mbits/sec 0 738 KBytes
[ 5] 8.00-9.00 sec 111 MBytes 933 Mbits/sec 0 749 KBytes
[ 5] 9.00-10.00 sec 112 MBytes 944 Mbits/sec 0 762 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.10 GBytes 942 Mbits/sec 0 sender
[ 5] 0.00-10.04 sec 1.09 GBytes 936 Mbits/sec receiver

iperf Done.

欢迎关注我的其它发布渠道