ubuntu安装 iperf,linux tcp/udp网速测试

iperf的github

https://github.com/esnet/iperf/releases

解压

sudo tar -zvxf iperf-3.9.tar.gz -C /usr/local

进入目录,编译

sudo ./configure

安装

sudo make 
sudo make install

报错

iperf3: error while loading shared libraries: libiperf.so.0: cannot open shared object file: No such file or directory

手动执行

sudo /sbin/ldconfig

可以访问了

# iperf3 -v
iperf 3.9 (cJSON 1.5.2)
Linux JQ-Mac 4.15.0-45-generic #48~16.04.1-Ubuntu SMP Tue Jan 29 18:03:48 UTC 2019 x86_64
Optional features available: CPU affinity setting, IPv6 flow label, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing, authentication

开启服务

# iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

确保服务端开启5201端口

vim /etc/sysconfig/iptables
/etc/init.d/iptables restart

测试访问

# iperf3 -c 192.168.1.200
Connecting to host 192.168.1.200, port 5201
[  5] local 192.168.1.228 port 58092 connected to 192.168.1.200 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  11.3 MBytes  94.5 Mbits/sec    0   24.0 KBytes       
[  5]   1.00-2.00   sec  11.2 MBytes  94.1 Mbits/sec    0   26.9 KBytes       
[  5]   2.00-3.00   sec  11.2 MBytes  94.1 Mbits/sec    0   28.3 KBytes       
[  5]   3.00-4.00   sec  11.2 MBytes  94.2 Mbits/sec    0   43.8 KBytes       
[  5]   4.00-5.00   sec  11.2 MBytes  94.2 Mbits/sec    0   43.8 KBytes       
[  5]   5.00-6.00   sec  11.2 MBytes  93.7 Mbits/sec    0   43.8 KBytes       
[  5]   6.00-7.00   sec  11.1 MBytes  93.3 Mbits/sec    0   43.8 KBytes       
[  5]   7.00-8.00   sec  11.3 MBytes  94.4 Mbits/sec    0   66.5 KBytes       
[  5]   8.00-9.00   sec  11.3 MBytes  94.8 Mbits/sec    0    100 KBytes       
[  5]   9.00-10.00  sec  11.1 MBytes  93.2 Mbits/sec    0    100 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   112 MBytes  94.0 Mbits/sec    0             sender
[  5]   0.00-10.04  sec   112 MBytes  93.6 Mbits/sec                  receiver

iperf Done.

 

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
最新版本iperf,官网下载直接编译,适合win10系统。 iperf 3.9 (cJSON 1.7.13) CYGWIN_NT-10.0-19041 LAPTOP-4KUBOSU3 3.2.0-340.x86_64 2021-03-29 08:42 UTC x86_64 Optional features available: CPU affinity setting Usage: iperf3 [-s|-c host] [options] iperf3 [-h|--help] [-v|--version] Server or Client: -p, --port # server port to listen on/connect to -f, --format [kmgtKMGT] format to report: Kbits, Mbits, Gbits, Tbits -i, --interval # seconds between periodic throughput reports -F, --file name xmit/recv the specified file -A, --affinity n/n,m set CPU affinity -B, --bind bind to the interface associated with the address -V, --verbose more detailed output -J, --json output in JSON format --logfile f send output to a log file --forceflush force flushing output at every interval --timestamps emit a timestamp at the start of each output line (using optional format string as per strftime(3)) -d, --debug emit debugging output -v, --version show version information and quit -h, --help show this message and quit Server specific: -s, --server run in server mode -D, --daemon run the server as a daemon -I, --pidfile file write PID file -1, --one-off handle one client connection then exit --server-bitrate-limit #[KMG][/#] server's total bit rate limit (default 0 = no limit) (optional slash and number of secs interval for averaging total data rate. Default is 5 seconds) Client specific: -c, --client run in client mode, connecting to -u, --udp use UDP rather than TCP --connect-timeout # timeout for control connection setup (ms) -b, --bitrate #[KMG][/#] target bitrate in bits/sec (0 for unlimited)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

书生璟言

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值