IPerf简单使用

IPerf简单使用一点睛 1IPerf 是一个服务器 客户端运行的程序 2 在服务器端运行 iPerf 也需要在客户端运行 IPerf 3 服务器端 在命令行下使用 iperf 加参数 s 4 客户端 在命令行下使用 iperf 加参数 c 5 经过一段时间测试 默认 10 秒 在 Server 端和 Client 端就会打印出网络连接的各种性能参数 二实战 1 准备服务器和客户端服务器 192 168 0

一 点睛

1 IPerf是一个服务器/客户端运行的程序

2 在服务器端运行iPerf,也需要在客户端运行IPerf。

3 服务器端,在命令行下使用iperf加参数-s。

4 客户端,在命令行下使用iperf加参数-c。

5 经过一段时间测试(默认10秒),在Server端和Client端就会打印出网络连接的各种性能参数。

二 实战

1 准备服务器和客户端

服务器:192.168.0.110

客户端:192.168.0.120

2 确保服务器和客户端都关闭了防火墙

[root@localhost iperf-1.7.0]# firewall-cmd --state not running

3 启动服务端

[root@localhost iperf-1.7.0]# iperf -s ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------------------------------------------------------------

4 运行客户端

[root@localhost iperf-1.7.0]# iperf -c 192.168.0.110 ------------------------------------------------------------ Client connecting to 192.168.0.110, TCP port 5001 TCP window size: 85.0 KByte (default) ------------------------------------------------------------

5 此时服务端打印如下

[root@localhost iperf-1.7.0]# iperf -s ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ [ 4] local 192.168.0.110 port 5001 connected with 192.168.0.120 port 39046

6 使用帮助

[root@localhost iperf-1.7.0]# iperf -h Usage: iperf [-s|-c host] [options] iperf [-h|--help] [-v|--version] Client/Server: -f, --format [kmKM] format to report: Kbits, Mbits, KBytes, MBytes -i, --interval # seconds between periodic bandwidth reports -l, --len #[KM] length of buffer to read or write (default 8 KB) -m, --print_mss print TCP maximum segment size (MTU - TCP/IP header) -p, --port # server port to listen on/connect to -u, --udp use UDP rather than TCP -w, --window #[KM] TCP window size (socket buffer size) -B, --bind <host> bind to <host>, an interface or multicast address -C, --compatibility for use with older versions does not sent extra msgs -M, --mss # set TCP maximum segment size (MTU - 40 bytes) -N, --nodelay set TCP no delay, disabling Nagle's Algorithm -V, --IPv6Version Set the domain to IPv6 Server specific: -s, --server run in server mode -D, --daemon run the server as a daemon Client specific: -b, --bandwidth #[KM] for UDP, bandwidth to send at in bits/sec (default 1 Mbit/sec, implies -u) -c, --client <host> run in client mode, connecting to <host> -d, --dualtest Do a bidirectional test simultaneously -n, --num #[KM] number of bytes to transmit (instead of -t) -r, --tradeoff Do a bidirectional test individually -t, --time # time in seconds to transmit for (default 10 secs) -F, --fileinput <name> input the data to be transmitted from a file -I, --stdin input the data to be transmitted from stdin -L, --listenport # port to recieve bidirectional tests back on -P, --parallel # number of parallel client threads to run -T, --ttl # time-to-live, for multicast (default 1) Miscellaneous: -h, --help print this message and quit -v, --version print version information and quit [KM] Indicates options that support a K or M suffix for kilo- or mega- The TCP window size option can be set by the environment variable TCP_WINDOW_SIZE. Most other options can be set by an environment variable IPERF_<long option name>, such as IPERF_BANDWIDTH. Report bugs to <>

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/232930.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 基于TCP的socket编程原理概述「建议收藏」

    基于TCP的socket编程原理概述「建议收藏」解:服务器端:1)创建套接字socket;2)bind(将套接字绑定到本地地址和端口上)3)listen(将套接字设置为监听模式,准备接受连接请求)4)accept等待客户请求到来,当请求到后,接受连接请求,返回一个新的对应于此次连接的套接字5)用返回的套接字和客户端进行通信(send/receive)6)返回等待另个客户请求7)关闭套接字客户端:1)创

    2022年10月18日
    5
  • Java实现文件写入——IO流(输入输出流详解)[通俗易懂]

    Java实现文件写入——IO流(输入输出流详解)[通俗易懂]输入输出的重要性:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;输入和输出功能是Java对程序处理数据能力的提高,Java以流的形式处理数据。流是一组有序的数据序列,根据操作的类型,分为输入流和输出流。&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;程序从输入流读取数据,向输出流写入数据。Java是面向对象的程序语言,每一个数据流都是一个对象,它们提供了各种支持“…

    2022年5月28日
    54
  • 写字板(Windows程序设计)

    写字板(Windows程序设计)前言c正编译生成debug,exe等文件,同样也可以通过exe"反编译"生成相对应的文件,一劳永逸,任君选择(`・ω・´)(~~我们老师为了给我们看要求效果给了

    2022年7月1日
    26
  • ddos工具linux,DDoS常用工具大全[通俗易懂]

    ddos工具linux,DDoS常用工具大全[通俗易懂]网络攻防是发生在第五空间的对抗和战争。这是一个动态的过程,无论攻击者还是防御者都在实战中寻求进步。攻防双方的“兵器”就在这个战场中不断磨砺和进化。绿盟科技关注攻防的最新进展,为了帮助客户更好的对抗网络威胁,每个季度会推出最新的“DDoS兵器谱”,介绍DDoS工具的最新发展和变化。1.简介本期“DDoS兵器谱”将要介绍的这三款工具的最新进展,他们是XOIC、Zarp和Slowhttptest。其中…

    2022年8月29日
    5
  • Vue源码–解读vue响应式原理

    Vue源码–解读vue响应式原理原文链接:https://geniuspeng.github.io/2018/01/05/vue-reactivity/Vue的官方说明里有深入响应式原理这一节。在此官方也提到过:当你把一个普通的JavaScript对象传给Vue实例的data选项,Vue将遍历此对象所有的属性,并使用Object.defineProperty把这些属性全部转为getter/setter。Obj…

    2022年6月6日
    31
  • 互斥锁和进程之间的通信

    互斥锁进程之间数据隔离,但是共享一套文件系统,因而可以通过文件来实现进程直接的通信,但问题是必须自己加锁处理。注意:加锁的目的是为了保证多个进程修改同一块数据时,同一时间只能有一个修改,即串行的修

    2022年3月29日
    48

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号