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模式。

  1. iperf s
  2. ------------------------------------------------------------
  3. Server listening on TCP port 5001
  4. TCP window size: 8.00 KByte (default)
  5. ------------------------------------------------------------
  6. iperf -c 59.128.103.56
  7. 上面使用服务端和客户端的默认设置进行测试
  8. iperf -s -w 300K
  9. ------------------------------------------------------------
  10. Server listening on TCP port 5001
  11. TCP window size: 300 KByte
  12. ------------------------------------------------------------
  13. iperf -c 59.128.103.56 -f K -i 2 -w 300K
  14. 设定报告间隔为2秒,服务器端和客户端的TCP窗口都开到300KB
  15. iperf -c 59.128.103.56 -f K -i 2 -w 300K n 1000000
  16. 测试传输约1MB数据
  17. iperf -c 59.128.103.56 -f K -i 2 -w 300K t 36
  18. 测试持续36
  19. iperf -c 59.128.103.56 -f K -i 2 -w 300K -n 10400000 d
  20. 测试双向的传输
  21. iperf -c 59.128.103.56 -f K -i 2 -w 300K u
  22. UDP测试
  23. 其中 -i 参数的含义是周期性报告的时间间隔(interval),单位为秒;在上面的例子中,表示每隔2秒报告一次带宽等信息。

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

client

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

server


  1. -----------------------------------------------------------
  2. Server listening on 5201
  3. -----------------------------------------------------------
  4. Accepted connection from 10.137.16.5, port 5612
  5. [ 6] local 10.137.16.6 port 5201 connected to 10.137.16.5 port 43882
  6. [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
  7. [ 6] 0.00-1.00 sec 98.1 MBytes 823 Mbits/sec 0.053 ms 0/12558 (0%)
  8. [ 6] 1.00-2.00 sec 114 MBytes 957 Mbits/sec 0.099 ms 0/14597 (0%)
  9. [ 6] 2.00-3.00 sec 114 MBytes 957 Mbits/sec 0.018 ms 0/14598 (0%)
  10. [ 6] 3.00-4.00 sec 114 MBytes 957 Mbits/sec 0.116 ms 0/14598 (0%)
  11. [ 6] 4.00-5.00 sec 114 MBytes 956 Mbits/sec 0.026 ms 0/14595 (0%)
  12. [ 6] 5.00-6.00 sec 114 MBytes 956 Mbits/sec 0.122 ms 0/14593 (0%)
  13. [ 6] 6.00-7.00 sec 114 MBytes 957 Mbits/sec 0.022 ms 0/14598 (0%)
  14. [ 6] 7.00-8.00 sec 114 MBytes 957 Mbits/sec 0.119 ms 0/14595 (0%)
  15. [ 6] 8.00-9.00 sec 114 MBytes 957 Mbits/sec 0.059 ms 0/14600 (0%)
  16. [ 6] 9.00-10.00 sec 114 MBytes 956 Mbits/sec 0.128 ms 0/14593 (0%)
  17. [ 6] 10.00-10.04 sec 5.02 MBytes 957 Mbits/sec 0.125 ms 0/643 (0%)
  18. - - - - - - - - - - - - - - - - - - - - - - - - -
  19. [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
  20. [ 6] 0.00-10.04 sec 0.00 Bytes 0.00 bits/sec 0.125 ms 0/144568 (0%)



[测试工具]----iperf的更多相关文章

  1. 蛮好用的局域网测试工具iperf

    公司局域网总是莫名其妙的和一台机器网速很慢,虽然无法解决也无人解决,但是能有个有效的测试至少也会心里有数. 咱干不了网络硬件布线的活,就测测网速吧. 网上找了下,开始有文章介绍NetIQ Chario ...

  2. iperf 测试工具

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

  3. Linux网络性能评估工具iperf 、CHARIOT测试网络吞吐量

    网络性能评估主要是监测网络带宽的使用率,将网络带宽利用最大化是保证网络性能的基础,但是由于网络设计不合理.网络存在安全漏洞等原因,都会导致网络带宽利用率不高.要找到网络带宽利用率不高的原因,就需要对网 ...

  4. 网络性能测试工具iperf详细使用图文教程

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

  5. 网络性能测试工具iperf详细使用图文教程【转载】

    原文:http://blog.163.com/hlz_2599/blog/static/142378474201341341339314/ 参考:http://man.linuxde.net/iper ...

  6. [转]网络性能评估工具Iperf详解(可测丢包率)

    原文链接:安全运维之:网络性能评估工具Iperf详解:http://os.51cto.com/art/201410/454889.htm 参考博文:http://linoxide.com/monito ...

  7. 转://linux下的CPU、内存、IO、网络的压力测试工具与方法介绍

    转载地址:http://wushank.blog.51cto.com/3489095/1585927 一.对CPU进行简单测试: 1.通过bc命令计算特别函数 例:计算圆周率 echo "s ...

  8. 转载: 一、linux cpu、内存、IO、网络的测试工具

    来源地址: http://blog.csdn.net/wenwenxiong/article/details/77197997 记录一下 以后好找.. 一.linux cpu.内存.IO.网络的测试工 ...

  9. 网络性能测试工具iperf详细使用图文教程(转)

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

随机推荐

  1. Ubuntu下用hadoop2.4搭建集群(伪分布式)

    要真正的学习hadoop,就必需要使用集群,可是对于普通开发人员来说,没有大规模的集群用来測试,所以仅仅能使用伪分布式了.以下介绍怎样搭建一个伪分布式集群. 为了节省时间和篇幅,前面一些步骤不再叙述. ...

  2. 关于C语言指针的一些新认识(2)

    在使用C语言编程的过程中,遇到了很多关于指针使用的小问题,这里总结一下就当做是编程的小技巧啦 Q1. 如何用printf( )输出指针 这个问题相当于如何用printf( )输出地址,答案是:用"%p ...

  3. mac 下安装caffe(二)

    使用Anaconda Python 1.brew edit opencv args << "-DPYTHON_LIBRARY=#{py_lib}/libpython2.7.#{d ...

  4. [1525] Cow Xor

    问题描述 农民约翰在喂奶牛的时候被另一个问题卡住了.他的所有N(1 <= N <= 100,000)个奶牛在他面前排成一行(按序号1..N的顺序),按照它们的社会等级排序.奶牛#1有最高的 ...

  5. git命令颜色设置

    + $ git config --global color.status auto + $ git config --global color.diff auto + $ git config --g ...

  6. 网络安全中机器学习大合集 Awesome

    网络安全中机器学习大合集 from:https://github.com/jivoi/awesome-ml-for-cybersecurity/blob/master/README_ch.md#-da ...

  7. luogu 3796 【模板】AC自动机(加强版)

    我太菜了 棒神%%% #include<iostream> #include<cstdio> #include<cmath> #include<cstdlib ...

  8. P3469 [POI2008]BLO-Blockade tarjan

    好久没发博客了啊!自我反省1s...今天再捡起来. 这个题是一道有一点特殊的tarjan,用tarjan维护子树大小,然后判断是否有边多次连接,(就是非树边),然后就进行乘法计算就行了. 具体在代码里 ...

  9. E20171014-hm

    Sibling   n. 兄弟,姐妹; [生] 同科,同属; [人] 氏族成员;

  10. E20170628-hm

    forgery   n. 伪造; 伪造罪; 伪造物; 伪造签字; distribute   vt. 分配,散布; 散发,分发; 把…分类; [电] 配电; contribute to(contribu ...