linux命令安装iperf3,命令iperf3命令使用

安装:

[root@bogon ~]# rpm -ivh iperf3-3.1.3-1.fc24.x86_64.rpm

Preparing... ################################# [100%]

Updating / installing...

1:iperf3-3.1.3-1.fc24 ################################# [100%]

#查看

[root@bogon ~]# which iperf3

/usr/bin/iperf3

[root@bogon ~]#

启动:

/usr/bin/iperf3

[root@bogon ~]# iperf3 -s

-----------------------------------------------------------

Server listening on 5201

-----------------------------------------------------------

客户端启动:

C:\Users\lw\Downloads\iperf>iperf3 -c 172.31.00.88

Connecting to host 172.31.00.88, port 5201

[ 4] local 172.31.00.36 port 21848 connected to 172.31.00.88 port 5201

[ ID] Interval Transfer Bandwidth

[ 4] 0.00-1.00 sec 7.88 MBytes 66.0 Mbits/sec

[ 4] 1.00-2.00 sec 7.62 MBytes 64.0 Mbits/sec

[ 4] 2.00-3.00 sec 7.62 MBytes 63.9 Mbits/sec

[ 4] 3.00-4.00 sec 7.62 MBytes 64.0 Mbits/sec

[ 4] 4.00-5.00 sec 7.62 MBytes 64.0 Mbits/sec

[ 4] 5.00-6.00 sec 7.62 MBytes 63.9 Mbits/sec

[ 4] 6.00-7.00 sec 7.62 MBytes 64.0 Mbits/sec

[ 4] 7.00-8.00 sec 7.75 MBytes 65.0 Mbits/sec

[ 4] 8.00-9.00 sec 7.62 MBytes 64.0 Mbits/sec

[ 4] 9.00-10.00 sec 7.62 MBytes 64.0 Mbits/sec

[ ID] Interval Transfer Bandwidth

[ 4] 0.00-10.00 sec 76.6 MBytes 64.3 Mbits/sec sender

[ 4] 0.00-10.00 sec 76.6 MBytes 64.3 Mbits/sec receiver

iperf Done.

服务端显示

[root@bogon ~]# iperf3 -s

Server listening on 5201

Accepted connection from 172.31.00.36, port 21847

[ 5] local 172.31.00.88 port 5201 connected to 172.31.00.36 port 21848

[ ID] Interval Transfer Bandwidth

[ 5] 0.00-1.00 sec 7.22 MBytes 60.6 Mbits/sec

[ 5] 1.00-2.00 sec 7.64 MBytes 64.1 Mbits/sec

[ 5] 2.00-3.00 sec 7.64 MBytes 64.1 Mbits/sec

[ 5] 3.00-4.00 sec 7.64 MBytes 64.1 Mbits/sec

[ 5] 4.00-5.00 sec 7.64 MBytes 64.1 Mbits/sec

[ 5] 5.00-6.00 sec 7.64 MBytes 64.1 Mbits/sec

[ 5] 6.00-7.00 sec 7.64 MBytes 64.1 Mbits/sec

[ 5] 7.00-8.00 sec 7.64 MBytes 64.1 Mbits/sec

[ 5] 8.00-9.00 sec 7.64 MBytes 64.1 Mbits/sec

[ 5] 9.00-10.00 sec 7.64 MBytes 64.1 Mbits/sec

[ 5] 10.00-10.08 sec 641 KBytes 64.0 Mbits/sec

[ ID] Interval Transfer Bandwidth

[ 5] 0.00-10.08 sec 0.00 Bytes 0.00 bits/sec sender

[ 5] 0.00-10.08 sec 76.6 MBytes 63.8 Mbits/sec receiver

Server listening on 5201

说明:

Interval :时间间隔

Transfer :转移

Bandwidth:带宽

目前:只有63.8M网络

帮助:

ou have new mail in /var/spool/mail/root

[root@bogon ~]# iperf3 -h

Usage: iperf [-s|-c host] [options]

iperf [-h|--help] [-v|--version]

Server or Client:

-p, --port # server port to listen on/connect to

-f, --format [kmgKMG] format to report: Kbits, Mbits, KBytes, MBytes

-i, --interval # seconds between periodic bandwidth reports

-F, --file name xmit/recv the specified file

-A, --affinity n/n,m set CPU affinity

-B, --bind bind to a specific interface

-V, --verbose more detailed output

-J, --json output in JSON format

--logfile f send output to a log file

-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

Client specific:

-c, --client run in client mode, connecting to

-u, --udp use UDP rather than TCP

-b, --bandwidth #[KMG][/#] target bandwidth in bits/sec (0 for unlimited)

(default 1 Mbit/sec for UDP, unlimited for TCP)

(optional slash and packet count for burst mode)

-t, --time # time in seconds to transmit for (default 10 secs)

-n, --bytes #[KMG] number of bytes to transmit (instead of -t)

-k, --blockcount #[KMG] number of blocks (packets) to transmit (instead of -t or -n)

-l, --len #[KMG] length of buffer to read or write

(default 128 KB for TCP, 8 KB for UDP)

--cport bind to a specific client port (TCP and UDP, default: ephemeral port)

-P, --parallel # number of parallel client streams to run

-R, --reverse run in reverse mode (server sends, client receives)

-w, --window #[KMG] set window size / socket buffer size

-C, --congestion set TCP congestion control algorithm (Linux and FreeBSD only)

-M, --set-mss # set TCP/SCTP maximum segment size (MTU - 40 bytes)

-N, --no-delay set TCP/SCTP no delay, disabling Nagle's Algorithm

-4, --version4 only use IPv4

-6, --version6 only use IPv6

-S, --tos N set the IP 'type of service'

-L, --flowlabel N set the IPv6 flow label (only supported on Linux)

-Z, --zerocopy use a 'zero copy' method of sending data

-O, --omit N omit the first n seconds

-T, --title str prefix every output line with this string

--get-server-output get results from server

--udp-counters-64bit use 64-bit counters in UDP test packets

--no-fq-socket-pacing disable fair-queuing based socket pacing

(Linux only)

[KMG] indicates options that support a K/M/G suffix for kilo-, mega-, or giga-

iperf3 homepage at: http://software.es.net/iperf/

Report bugs to: https://github.com/esnet/iperf

You have new mail in /var/spool/mail/root

[root@bogon ~]#

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
什么是Iperf Iperf 是一个网络性能测试工具 Iperf可以测试TCP和UDP带宽质量 Iperf可以测量最大TCP带宽 具有多种参数和UDP特性 Iperf可以报告带宽 延迟抖动和数据包丢失 编译与安装 Iperf2 0 2目前仅提供源码包的下载 当你下载到Iperf源码包后 在类unix系统上 需要先解压缩源码包 使用解压缩命令gzip或tar 解压后会产生新文件夹“Iperf 2 0 2” Iperf2 0 2在以下操作系统中可以很好的被编译:Linux SGI IRIX HP UX Solaris AIX 和Cray UNICOS 使用“make”命令编译Iperf源码 完整的编译命令如下: tar xvf iperf 2 0 2 tar gz cd iperf 2 0 2 configure make 编译成功后 使用以下命令安装Iperf: make install 重新编译Iperf 最简单的方法是使用以下命令: make distclean configure make 功能介绍 TCP 测量网络带宽 报告MSS MTU值的大小和观测值 支持TCP窗口值通过套接字缓冲 当P线程或Win32线程可用时 支持多线程 客户端与服务端支持同时多重连接 UDP 客户端可以创建指定带宽的UDP流 测量丢包 测量延迟 支持多播 当P线程可用时 支持多线程 客户端与服务端支持同时多重连接(不支持 Windows) 在适当的地方 选项中可以使用K(kilo )和M(mega ) 例如131072字节可以用128K代替 可以指定运行的总时间 甚至可以设置传输的数据总量 在报告中 为数据选用最合适的单位 服务器支持多重连接 而不是等待一个单线程测试 在指定时间间隔重复显示网络带宽 波动和丢包情况 服务器端可作为后台程序运行 服务器端可作为Windows 服务运行 使用典型数据流来测试链接层压缩对于可用带宽的影响 命令使用: for UDP Sending: iperf c [IP Addr] i 1 p [port] u t 10000 b 2M for UDP Receiving: iperf s i 1 u p [port] iperf c 10 0 5 5 i 1 p 6015 u t 10000 b 128k iperf s i 1 u p 6005 iperf c 10 18 61 66 i 1 p 6006 u t 99999 b 128k iperf s i 1 u p 6006 t 999999 运行后的结果在Clinet端: >iperf c 10 0 5 235 i 1 p 6005 u t 60 b 128k Client connecting to 10 0 5 235 UDP port 6005 Sending 1470 byte datagrams UDP buffer size: 8 00 KByte default [ ID] Interval Transfer Bandwidth [1868] 0 0 60 2 sec 940 KBytes 128 Kbits sec [1868] Server Report: [1868] 0 0 60 8 sec 940 KBytes 127 Kbits sec 13 838 ms 0 655 0% [1868] Sent 655 datagrams">什么是Iperf Iperf 是一个网络性能测试工具 Iperf可以测试TCP和UDP带宽质量 Iperf可以测量最大TCP带宽 具有多种参数和UDP特性 Iperf可以报告带宽 延迟抖动和数据包丢失 编译与安装 Iperf2 0 2目前仅提供源码包的下载 当 [更多]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值