iperf

https://sourceforge.net/projects/iperf/

http://downloads.es.net/pub/iperf/

https://github.com/esnet/iperf

http://www.sdnlab.com/2961.html

http://chuansong.me/n/801810

看这个

http://www.sdnlab.com/2961.html

Iperf是一个网络性能测试工具。可以测试TCP和UDP带宽质量,可以测量最大TCP带宽,具有多种参数和UDP特性,可以报告带宽,延迟抖动和数据包丢失。

Iperf使用方法与参数说明

参数说明

-s 以server模式启动,eg:iperf -s

-c host以client模式启动,host是server端地址,eg:iperf -c 222.35.11.23

通用参数

-f [kmKM] 分别表示以Kbits, Mbits, KBytes, MBytes显示报告,默认以Mbits为单位,eg:iperf -c 222.35.11.23 -f K

-i sec 以秒为单位显示报告间隔,eg:iperf -c 222.35.11.23 -i 2

-l 缓冲区大小,默认是8KB,eg:iperf -c 222.35.11.23 -l 16

-m 显示tcp最大mtu值

-o 将报告和错误信息输出到文件eg:iperf -c 222.35.11.23 -o ciperflog.txt

-p 指定服务器端使用的端口或客户端所连接的端口eg:iperf -s -p 9999;iperf -c 222.35.11.23 -p 9999

-u 使用udp协议

-w 指定TCP窗口大小,默认是8KB

-B 绑定一个主机地址或接口(当主机有多个地址或接口时使用该参数)

-C 兼容旧版本(当server端和client端版本不一样时使用)

-M 设定TCP数据包的最大mtu值

-N 设定TCP不延时

-V 传输ipv6数据包

server专用参数

-D 以服务方式运行iperf,eg:iperf -s -D

-R 停止iperf服务,针对-D,eg:iperf -s -R

client端专用参数

-d 同时进行双向传输测试

-n 指定传输的字节数,eg:iperf -c 222.35.11.23 -n 100000

-r 单独进行双向传输测试

-t 测试时间,默认10秒,eg:iperf -c 222.35.11.23 -t 5

-F 指定需要传输的文件

-T 指定ttl值

应用实例

使用 iperf -s 命令将 Iperf 启动为 server 模式,在客户机上使用 iperf -c启动client模式。

iperf –s

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

Server listening on TCP port 5001

TCP window size: 8.00 KByte (default)

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

iperf -c 59.128.103.56

上面使用服务端和客户端的默认设置进行测试

iperf -s -w 300K

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

Server listening on TCP port 5001

TCP window size: 300 KByte

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

iperf -c 59.128.103.56 -f K -i 2 -w 300K

设定报告间隔为2秒,服务器端和客户端的TCP窗口都开到300KB

iperf -c 59.128.103.56 -f K -i 2 -w 300K –n 1000000

测试传输约1MB数据

iperf -c 59.128.103.56 -f K -i 2 -w 300K –t 36

测试持续36秒

iperf -c 59.128.103.56 -f K -i 2 -w 300K -n 10400000 –d

测试双向的传输

iperf -c 59.128.103.56 -f K -i 2 -w 300K –u

UDP测试

其中 -i 参数的含义是周期性报告的时间间隔(interval),单位为秒;在上面的例子中,表示每隔2秒报告一次带宽等信息。

最后一行为测试结果。Interval表示连接测试的时间范围,通常为10s。Transfer为在这个时间段内,客户端和服务器传输的数据总量。结果Bandwidth是我们最关注的就是网络传输速率,也就是带宽。

client

[root@jiangyi02.sqa.zmf /home/ahao.mah]
#iperf3 -c 10.137.16.6 -f m -i 1 -t 10s -u -b 100m
Connecting to host 10.137.16.6, port 5201
[ 4] local 10.137.16.5 port 46266 connected to 10.137.16.6 port 5201
[ ID] Interval Transfer Bandwidth Total Datagrams
[ 4] 0.00-1.00 sec 10.9 MBytes 91.0 Mbits/sec 1389
[ 4] 1.00-2.00 sec 11.9 MBytes 100 Mbits/sec 1526
[ 4] 2.00-3.00 sec 11.9 MBytes 100 Mbits/sec 1526
[ 4] 3.00-4.00 sec 11.9 MBytes 100 Mbits/sec 1526
[ 4] 4.00-5.00 sec 11.9 MBytes 100 Mbits/sec 1526
[ 4] 5.00-6.00 sec 11.9 MBytes 99.9 Mbits/sec 1525
[ 4] 6.00-7.00 sec 11.9 MBytes 100 Mbits/sec 1526
[ 4] 7.00-8.00 sec 11.9 MBytes 100 Mbits/sec 1526
[ 4] 8.00-9.00 sec 11.9 MBytes 100 Mbits/sec 1526
[ 4] 9.00-10.00 sec 11.9 MBytes 100 Mbits/sec 1526
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 4] 0.00-10.00 sec 118 MBytes 99.1 Mbits/sec 0.090 ms 0/15122 (0%)
[ 4] Sent 15122 datagrams iperf Done.

server


-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 10.137.16.5, port 5612
[ 6] local 10.137.16.6 port 5201 connected to 10.137.16.5 port 43882
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 6] 0.00-1.00 sec 98.1 MBytes 823 Mbits/sec 0.053 ms 0/12558 (0%)
[ 6] 1.00-2.00 sec 114 MBytes 957 Mbits/sec 0.099 ms 0/14597 (0%)
[ 6] 2.00-3.00 sec 114 MBytes 957 Mbits/sec 0.018 ms 0/14598 (0%)
[ 6] 3.00-4.00 sec 114 MBytes 957 Mbits/sec 0.116 ms 0/14598 (0%)
[ 6] 4.00-5.00 sec 114 MBytes 956 Mbits/sec 0.026 ms 0/14595 (0%)
[ 6] 5.00-6.00 sec 114 MBytes 956 Mbits/sec 0.122 ms 0/14593 (0%)
[ 6] 6.00-7.00 sec 114 MBytes 957 Mbits/sec 0.022 ms 0/14598 (0%)
[ 6] 7.00-8.00 sec 114 MBytes 957 Mbits/sec 0.119 ms 0/14595 (0%)
[ 6] 8.00-9.00 sec 114 MBytes 957 Mbits/sec 0.059 ms 0/14600 (0%)
[ 6] 9.00-10.00 sec 114 MBytes 956 Mbits/sec 0.128 ms 0/14593 (0%)
[ 6] 10.00-10.04 sec 5.02 MBytes 957 Mbits/sec 0.125 ms 0/643 (0%)
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 6] 0.00-10.04 sec 0.00 Bytes 0.00 bits/sec 0.125 ms 0/144568 (0%)



iperf网络测试工具的更多相关文章

  1. IPerf——网络测试工具介绍与源码解析(4)

    上篇随笔讲到了TCP模式下的客户端,接下来会讲一下TCP模式普通场景下的服务端,说普通场景则是暂时不考虑双向测试的可能,毕竟了解一项东西还是先从简单的情况下入手会快些. 对于服务端,并不是我们认为的直 ...

  2. IPerf——网络测试工具介绍与源码解析(5)

    本篇随笔讲述一下TCP协议下,双向测试模式和交易测试模式下客户端和服务端执行的情况: 双向测试模式: 官方文档的解释 Run Iperf in dual testing mode. This will ...

  3. IPerf——网络测试工具介绍与源码解析(3)

    [线程的生成]   生成线程时需要传入一个thread_Settings类型的变量,thread_Settings包含所有线程运行时需要的信息,命令行选项参数解析后所有得到的属性都存储到该类型的变量中 ...

  4. IPerf——网络测试工具介绍与源码解析(2)

    对于IPerf源码解析,我是基于2.0.5版本在Windows下执行的情况进行分析的,提倡开始先通过对源码的简单修改使其能够在本地编译器运行起来,这样可以打印输出一些中间信息,对于理解源码的逻辑,程序 ...

  5. IPerf——网络测试工具介绍与源码解析(1)

    IPerf是一个开源的测试网络宽带并能统计并报告延迟抖动.数据包丢失率信息的控制台命令程序,通过参数选项可以方便地看出,通过设置不同的选项值对网络带宽的影响,对于学习网络编程还是有一定的借鉴意义,至少 ...

  6. 网络测试工具--Iperf、Netperf 、MZ

    网络性能测量的五项指标 可用性(availability) 响应时间(response time) 网络利用率(network utilization) 网络吞吐量(network throughpu ...

  7. TCP/UDP网络性能测试工具 - Netperf (zz) ..网络测试工具

    在构建或管理一个网络系统时,我们更多的是关心网络的可用性,即网络是否连通,而对于其整体的性能往往考虑不多. 除了netperf以外.       还有很多其它的网络性能测试工具.       如db, ...

  8. 网络测试工具netperf(转)

    http://pangyi.github.io/blog/20141210/wang-luo-ce-shi-gong-ju-netperf/ 网络测试工具netperf 2014年12月10日 一般我 ...

  9. iperf网络测试

    iperf网络测试文档 地址: https://www.jianshu.com/p/942a9d9bc704

随机推荐

  1. UML解惑:图说UML中的六大关系--转

    UML定义的关系主要有六种:依赖.类属.关联.实现.聚合和组合.这些类间关系的理解和使用是掌握和应用UML的关键,而也就是这几种关系,往往会让初学者迷惑.这里给出这六种主要UML关系的说明和类图描述, ...

  2. java/php/c#版rsa签名以及java验签实现--转

    在开放平台领域,需要给isv提供sdk,签名是Sdk中需要提供的功能之一.由于isv使用的开发语言不是单一的,因此sdk需要提供多种语言的版本.譬如java.php.c#.另外,在电子商务尤其是支付领 ...

  3. apk文件伪装zip64格式案例

    软件样本:http://files.cnblogs.com/files/mmmmar/FMRMemoryCleaner.apk 在论坛看在网友求助把一个小的app去广告,下载一看是清理内存的,刚开始让 ...

  4. 配置Ssh免密码登录

    配置Ssh免密码登录 一个master节点,两个client节点(client1.client2) 1.所有节点创建hadoop用户,并设置密码 以root账号登录: useradd hadoop p ...

  5. Mosquitto安装_Ubuntu/Debian上安装消息队列Mosquitto

    Mosquitto安装_Ubuntu/Debian上安装消息队列Mosquitto MQTT是IBM开发的一个即时通讯协议.MQTT是面向M2M和物联网的连接协议,采用轻量级发布和订阅消息传输机制.M ...

  6. 【网络流#7】POJ 3281 Dining 最大流 - 《挑战程序设计竞赛》例题

    不使用二分图匹配,使用最大流即可,设源点S与汇点T,S->食物->牛->牛->饮料->T,每条边流量为1,因为流过牛的最大流量是1,所以将牛拆成两个点. 前向星,Dini ...

  7. requestAnimationFrame 兼容处理

    (function() { ; var vendors = ['ms', 'moz', 'webkit', 'o']; ; x < vendors.length && !wind ...

  8. activiti总结

    1.activiti如何修改登录用户名?在哪个数据库里面添加. 2.activiti的启动和部署在http://activiti.org/userguide/index.html#demo.setup ...

  9. Linux 所有命令都用不了,只有cd exit能用

    原因: 在设置 java环境变量时,编辑profile文件没有写正确,导致在命令行下 ls等命令不能够识别.在命令行下打入下面这段就可以了export PATH=/usr/local/sbin:/us ...

  10. 完整版的strcpy函数

    char *strcpy(char *strDest,const char *strSrc) { assert((strDest!=NULL) && (strSrc!=NULL)); ...