首页 > 系统相关 >centos 带宽测试工具iperf3安装使用

centos 带宽测试工具iperf3安装使用

时间:2023-05-20 17:31:51浏览次数:38  
标签:MBytes iperf3 set Gbits centos -- sec 测试工具

一、简介 iperf3 是一个 TCP、UDP 和 SCTP 网络带宽测量工具。是用于主动测量 IP 网络上可达到的最大带宽的工具。它支持调整与时序,协议和缓冲区有关的各种参数。对于每个测试,它都会报告测得的吞吐量 / 比特率,损耗和其他参数。

此版本有时称为 iperf3,是对 NLANR/DAST 开发的原始版本的重新设计。iperf3 是从头开始的新实现,其目标是使代码库更小,更简单,以及该库的版本可在其他程序中使用。iperf3 还具有其他工具(例如 nuttcp 和 netperf)中发现的许多功能,但是原始 iperf 中却没有这些功能。例如,其中包括零复制模式和可选的 JSON 输出。注意,iperf3 与原始 iperf 向后不兼容。

iperf3 的主要开发在 CentOS Linux,FreeBSD 和 macOS 上进行。目前,这是唯一受官方支持的平台,但是已经有一些关于 OpenBSD,NetBSD,Android,Solaris 和其他 Linux 发行版成功的报道。 二、用途 基于C/S模式,用于点对点测量带宽大小; 三、搭建 安装比较简单,服务端和客户端均需安装,操作如下: [root@localhost ~]# yum install -y iperf3 已加载插件:fastestmirror, refresh-packagekit, security 设置安装进程 Loading mirror speeds from cached hostfile

  • epel: d2lzkl7pfhq30w.cloudfront.net 解决依赖关系 --> 执行事务检查 ---> Package iperf3.x86_64 0:3.0.12-1.el6 will be 安装 --> 完成依赖关系计算

依赖关系解决

============================================================================================================================================================================================================================================= 软件包 架构 版本 仓库 大小

正在安装: iperf3 x86_64 3.0.12-1.el6 epel 65 k

事务概要

Install 1 Package(s)

总下载量:65 k Installed size: 158 k 下载软件包: iperf3-3.0.12-1.el6.x86_64.rpm | 65 kB 00:00
运行 rpm_check_debug 执行事务测试 事务测试成功 执行事务 正在安装 : iperf3-3.0.12-1.el6.x86_64 1/1 Verifying : iperf3-3.0.12-1.el6.x86_64 1/1

已安装: iperf3.x86_64 0:3.0.12-1.el6

完毕! 以上安装就ok了

服务端开启: [root@localhost ~]# iperf3 -s

Server listening on 5201

可以使用 netstat -untlp 查看iperf3是否已运行,确认服务端已开启服务,接下来在客户端进行测试; 客户端运行: [root@bogon ~]# iperf3 -c serverIP 运行客户端+serverIP不加任何参数,可以看出传输速度,带宽大小等参数; [root@bogon ~]# iperf3 -c 192.168.10.109 Connecting to host 192.168.10.109, port 5201 [ 4] local 192.168.10.111 port 35526 connected to 192.168.10.109 port 5201 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 415 MBytes 3.48 Gbits/sec 0 902 KBytes
[ 4] 1.00-2.00 sec 674 MBytes 5.65 Gbits/sec 0 969 KBytes
[ 4] 2.00-3.00 sec 674 MBytes 5.66 Gbits/sec 0 1.06 MBytes
[ 4] 3.00-4.00 sec 674 MBytes 5.65 Gbits/sec 0 1.10 MBytes
[ 4] 4.00-5.00 sec 690 MBytes 5.78 Gbits/sec 0 1.14 MBytes
[ 4] 5.00-6.00 sec 616 MBytes 5.17 Gbits/sec 0 1.16 MBytes
[ 4] 6.00-7.00 sec 690 MBytes 5.78 Gbits/sec 0 1.19 MBytes
[ 4] 7.00-8.00 sec 588 MBytes 4.93 Gbits/sec 0 1.23 MBytes
[ 4] 8.00-9.00 sec 690 MBytes 5.78 Gbits/sec 0 1.25 MBytes
[ 4] 9.00-10.00 sec 640 MBytes 5.37 Gbits/sec 0 1.25 MBytes


[ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 6.20 GBytes 5.33 Gbits/sec 0 sender [ 4] 0.00-10.00 sec 6.20 GBytes 5.32 Gbits/sec receiver

iperf Done.

下面可以通过iperf3 -h 查看iperf3 相关参数,可以根据不同的参数设置对应的属性,例如端口号,测试格式,测试文件等等; [root@localhost ~]# 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 <host> bind to a specific interface -V, --verbose more detailed output -J, --json output in JSON format -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 -1, --one-off handle one client connection then exit Client specific: -c, --client <host> run in client mode, connecting to <host> -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) -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, --linux-congestion <algo> set TCP congestion control algorithm (Linux only) -M, --set-mss # set TCP maximum segment size (MTU - 40 bytes) -N, --nodelay set TCP 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

[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

标签:MBytes,iperf3,set,Gbits,centos,--,sec,测试工具
From: https://blog.51cto.com/u_9840752/6317665

相关文章

  • centos6安装emqx
    一个项目需要用mqtt通信,选用的是emqx。在部署时发现客户系统是 centos6,造成emqx安装失败。尝试后安装成功,。 wgethttps://www.emqx.com/zh/downloads/broker/v4.3.10/emqx-centos6-4.3.10-amd64.rpmrpm-iemqx-centos6-4.3.10-amd64.rpmhttp://ip地址:18083......
  • centos7 中安装 docker
     001、内核[root@PC1~]#cat/proc/versionLinuxversion3.10.0-957.el7.x86_64([email protected])(gccversion4.8.520150623(RedHat4.8.5-36)(GCC))#1SMPThuNov823:39:32UTC2018 002、卸载(可选)yumremovedockerdocker-clien......
  • Centos 设置密钥登陆并禁用密码
    1:备份文件cd/etc/ssh/scpsshd_configsshd_config.bak2:生成密钥一路回车按下去就可以了。[root@centos7-1ssh]#ssh-keygen-trsaGeneratingpublic/privatersakeypair.Enterfileinwhichtosavethekey(/root/.ssh/id_rsa):#回车Createddirectory'/root/.ssh......
  • vm安装centos7
    1、介绍前面已经有过vm安装centos的博客,https://www.cnblogs.com/wd404/p/17416839.html这里再次整理,一方面是创建虚拟机的步骤有所差异,是先配置再安装iso文件。另一方面,本文章记录一些更多的细节总之,这类安装、配置的文章,只要可行,是非常有价值的,有记录必要的,方便后续参考2、......
  • vm安装centos
    1、说明本章是对本地vm上安装centos的记录。实际对各种操作系统的安装会简单提及。环境:VMware-player-16.0.0-16894299(已安装好)CentOS-7-x86_64-DVD-1810.iso(以前找到的资源,是图形化简单安装,证实可用)CentOS-7-x86_64-Minimal-2009.iso(本次下载和安装的版本,是一个非图形化的简......
  • 在Centos7上安装PXE装机环境来批量安装操作系统
    步骤1:安装必要的软件包首先,需要确保系统已安装dhcp、tftp-server和httpd等软件包。可以使用以下命令进行安装:yuminstall-ydhcptftp-serverhttpdsyslinux-tftpbootxinetd步骤2:配置DHCP服务器接下来,需要配置DHCP服务器以向客户端分配IP地址。在/etc/dhcp/d......
  • centos8下messages or secure文件为空
    事情经过是这样的,显着没事登陆了一台老服务的服务器,journalctl--vacuum-size=xx清理了一下旧日志:journalctl--vacuum-size=5M顺便看了一眼/var/logs目录下:messagessecure文件为空(journalctl是可以查看日志的!),看了一眼rsyslogstatus:systemctlstatusrsyslogsyst......
  • 【Linux】详解六种配置Linux环境变量的方法(以centos为例)
    本文时间2023-05-19作者:sugerqube漆瓷本文重理解,!!忽略环境变量加载原理!!本文目标:理解六大环境变量配置,选择合适的配置文件进行配置配置环境的理由以shell编程为例现在我们想要运行名为"sugerqube.sh"的脚本需要运行的命令是./sugerqube.sh即在命令行输入脚本的地址注:.......
  • centos 8 安装python3
    sudodnfinstallpython3  查看版本 查看pip ......
  • Centos7 设置定时任务
    原文链接:https://blog.csdn.net/weixin_38565317/article/details/127039873配置定时任务1.下载定时任务依赖yuminstallcrontabs12.设置为可用状态并启动systemctlenablecrondsystemctlstartcrond12如图所示,定时任务程序安装过程:3.配置定时任务文件vim/etc/crontab1如......