iperf.exe -s -P 2 -i 5 -p 5999 -f k
这个命令会启动iperf,后续参数用来设定监听5999 端口(默认端口是5001), 限定iperf只允许两个连接,每5秒汇报一次连接情况。连接限制参数(-P参数)非常重要,当两个连接建立后,服务器进程就会退出。如果这个参数设定为0,那么iperf 进程将持续监听端口,并且不限制隐拿连接数量。在 Windows主机上键入该命令,会显示出如图A所示界面
启动一个iperf 客户端连接
iperf 的另一半就是客户端,用来连接到服务器监听端口。比如槐携绝我们要连接到一台叫做 s-network1.amcs.tld 的服务器,端口为5999,连接60 秒并且每5秒显示一次状态,命令行如下:
iperf.exe -c s-network1.amcs.tld -P 1 -i 5 -p 5999 -f B -t 60 -T 1
命令启动后,s-network1 主机被用来进行网络性能检测。与Jperf GUI 界面提供的漂亮图形不同, iperf只会根据测量参数简单的报告网络带宽状况,在本例中是以 比特为单位(-f 参数)进行带宽表示铅姿的。图B显示了远程客户端与s-network1主机间的带宽性能。
为了应对日常便捷应用的需求,我们可以建立一个 .bat批处理文件,届时填入服务器名称即可实现快速检测。以下为实际使用的拷屏:
C:\jperf\jperf\bin>iperf
Usage: iperf [-s|-c host] [options]
Try `iperf –help’ for more information.
C:\jperf\jperf\bin>iperf –help
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)
-o, –output<filename>output the report or error message to this specified file
-p, –port #server port to listen on/connect to
-u, –udpuse 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, –nodelayset TCP no delay, disabling Nagle’s Algorithm
-V, –IPv6VersionSet the domain to IPv6
Server specific:
-s, –server run in server mode
-D, –daemon run the server as a daemon
-R, –remove remove service in win32
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, –versionprint 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.
windowsiperf3是网络测试工具, *** 作方式如枝没升下:首先察轮检查一下下载下来的软件猛老是否包含两个文件,将这个文件夹放置到一个全英文路径里面,打开cmd,最核心的一步 改变cmd正在 *** 作的目录。
百度一下【Iperf】点击第一个链接就是下载Iperf工具的地方,该乱盯老工具有Winidows版和Linux版的。根据你服务器的情况下载。Windows版的需要下载安装一个JAVA程序支持运行Iperf,如果没有安装该程序是打不开的。把下载的安装包解压一下,再点击【jperf】就可以运行图形化jperf了。
运行以后如下图所示哗升:
根据你的网络环境则亩设置。最后点击【运行】
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)