iperf3 测试linux服务器之间带宽

一、安装方式

1,从官网下载相应版本。用 rpm包安装

https://iperf.fr/iperf-download.php

centos7 安装

rpm -i iperf3-3.1.3-1.fc24.x86_64.rpm

2,执行yum install -y iperf3   安装

二、测试方式

网络带宽测试
在使用iperf3测试时,要同时在server端与client端都各执行一个程序,让它们互相传送报文进行测试。下面的例子是在CentOS7上进行的测试。

首先在10.23.5.66机器启动server端的程序:

iperf3 -s
接着在10.23.5.65服务器上执行client 端的程序:

iperf3 -c 10.23.5.66
在测试时server端与client端都会出现测试的数据,client端以下是测试的结果:

[[email protected] ~]$ iperf3 -c 10.23.5.66
Connecting to host 10.23.5.66, port 5201
[ 4] local 10.23.5.65 port 10412 connected to 10.23.5.66 port 5201
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-1.00 sec 114 MBytes 953 Mbits/sec 0 95.5 KBytes
[ 4] 1.00-2.00 sec 113 MBytes 948 Mbits/sec 0 95.5 KBytes
[ 4] 2.00-3.00 sec 113 MBytes 950 Mbits/sec 0 95.5 KBytes
[ 4] 3.00-4.00 sec 113 MBytes 948 Mbits/sec 0 95.5 KBytes
[ 4] 4.00-5.00 sec 113 MBytes 950 Mbits/sec 0 95.5 KBytes
[ 4] 5.00-6.00 sec 113 MBytes 948 Mbits/sec 0 95.5 KBytes
[ 4] 6.00-7.00 sec 113 MBytes 948 Mbits/sec 0 95.5 KBytes
[ 4] 7.00-8.00 sec 113 MBytes 950 Mbits/sec 0 95.5 KBytes
[ 4] 8.00-9.00 sec 113 MBytes 948 Mbits/sec 0 95.5 KBytes
[ 4] 9.00-10.00 sec 113 MBytes 950 Mbits/sec 0 95.5 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 1.10 GBytes 949 Mbits/sec 0 sender
[ 4] 0.00-10.00 sec 1.10 GBytes 949 Mbits/sec receiver

iperf Done.
从打印的内容看,缺省参数下,Client将连接Server端的5201端口,持续向Server端发送数据,并统计出每秒传输的字节数、带宽、出现报文重传的次数、拥塞窗口(Congestion Window)大小,整个测试将持续10秒钟;最后将汇总10秒的平均数据,并给出发送和接收端的统计。

接下来分析一下Server的测试输出结果:

[[email protected] ~]$ iperf3 -s
warning: this system does not seem to support IPv6 - trying IPv4
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 10.23.5.65, port 10410
[ 5] local 10.23.5.66 port 5201 connected to 10.23.5.65 port 10412
[ ID] Interval Transfer Bandwidth
[ 5] 0.00-1.00 sec 109 MBytes 913 Mbits/sec
[ 5] 1.00-2.00 sec 113 MBytes 948 Mbits/sec
[ 5] 2.00-3.00 sec 113 MBytes 949 Mbits/sec
[ 5] 3.00-4.00 sec 113 MBytes 949 Mbits/sec
[ 5] 4.00-5.00 sec 113 MBytes 949 Mbits/sec
[ 5] 5.00-6.00 sec 113 MBytes 949 Mbits/sec
[ 5] 6.00-7.00 sec 113 MBytes 949 Mbits/sec
[ 5] 7.00-8.00 sec 113 MBytes 949 Mbits/sec
[ 5] 8.00-9.00 sec 113 MBytes 949 Mbits/sec
[ 5] 9.00-10.00 sec 113 MBytes 949 Mbits/sec
[ 5] 10.00-10.04 sec 4.29 MBytes 947 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth
[ 5] 0.00-10.04 sec 0.00 Bytes 0.00 bits/sec sender
[ 5] 0.00-10.04 sec 1.10 GBytes 945 Mbits/sec receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Server端缺省监听IPv6地址和端口,如果未配置IPv6,会尝试IPv4。日志显示接收了来自10.23.5.65,源端口未10410的测试请求。Client端连续进行了10秒的测试,并显示了每秒传输的字节数,带宽信息;测试结束后会汇总发送和接收的统计信息。在Client连接关闭之后会继续侦听5201端口。

原文地址:https://www.cnblogs.com/xiaohanlin/p/12103327.html

时间: 2024-08-09 16:11:21

iperf3 测试linux服务器之间带宽的相关文章

实现linux服务器之间无密码互访

最近老是在群里看到许多同学问,linux之间无密码互访怎么弄啊,百度的看得我头晕之类的,所以我就写写怎么样在两台linux服务器之间实现无密码互访,也就是让它们互相信任的意思,废话不多说,直接上菜. 环境介绍 两台CentOS服务器,主机名和IP分别是: server1 192.168.1.69 server2 192.168.1.70 准备 #两台都要安装 yum install -y openssh-clients 分别打开两台服务器的hosts文件,在文件末尾添加以下内容,让主机名和IP对

nc命令在Linux服务器之间互传文件或文件夹

有时候,在线上服务器上传文件或文件夹,没有做秘钥,也不知道用户的相关密码,scp和rsync都使用不了. 推荐使用nc命令在Linux服务器之间互传,条件是互相能ping通. 文件夹: 接受文件的服务器 nc -l 9995 | tar zxvf - (可以先获取本地内网ip-1.1.1.1,稍后需要复制到另外一条服务器上,9995端口保持一致即可,可随意)文件所在的服务器 tar zcvf - 文件名称/* | nc 1.1.1.1 9995 文件:接收端 nc -l 1234 > abc.l

Linux服务器之间互信(无密码输入)

Linux服务器之间互信(无密码输入) 两台服务器实现无密码登录 在服务器A上 ssh-keygen -t rsa # 三次回车 执行完成后生成两个文件Your identification has been saved in /root/.ssh/id_rsa. # 私钥Your public key has been saved in /root/.ssh/id_rsa.pub. # 公钥 ssh-copy-id -i id_rsa.pub [email protected]服务器B的IP

linux服务器之间传递文件-scp命令

linux服务器之间传递文件: 从远程机器复制文件到本地服务器的目录下: scp -r [email protected]远程机器的地址:要复制的文件目录 本地的目录 例:从147往221上复制147上的tomcat目录:scp -r [email protected]:/home/tomcat /home 不直接通过xftp传递的原因是:scp命令速度超快 原文地址:https://www.cnblogs.com/Suntree/p/11552528.html

Linux服务器之间配置免密码SSH访问

环境:Oracle VM Virtualbox, Ubuntu Server 12.04,SecureCRT 1.首先在虚拟机中安装好Linux操作系统,这里我选择的是Ubuntu Server,为了方便后续操作,网络建议选择桥接(bridge),因为电脑比较老,虚拟机和Linux都是32位的 安装Ubuntu的时候,注意选择安装ssh服务,如果没有安装,可以通过下面这个命令安装: $sudo apt-get install openssh-server 通过下面命令可以查看ssh服务有没有启动

window、linux系统与linux服务器之间使用svn同步及自动部署代码的方法

摘要: 在家用PC,在公司用办公电脑对一个项目的代码进行修改时,会遇到代码同步的问题.本文讲解了代码同步及自动部署的解决办法. 实现方法: 1.首先在linux服务器上和linux上安装svn(sudo yum install svn). 2.然后在服务上创建一个版本库并配置用户及权限,这点网上的方法多的是,自行百度. 3.在linux客户端使用svn命令进行同步,具体如下: svn co svn://(ip地址)  (保存文件的文件夹)    ##检出版本库.第一次要输入用户名和密码. 将需要

scp实现mac与linux服务器之间文件传输

1.mac上传文件到linux服务器 scp 文件名 用户名@服务器ip:目标路径如:scp /Users/test/testFile test@xxx.xxx.xxx.xxx:/test/ 2.mac上传文件夹到linux服务器,与上传文件相比多加了-r scp -r 文件夹目录 用户名@服务器ip:目标路径 如:scp -r /Users/test/testFolder test@xxx.xxx.xxx.xxx:/test/ 3.linux服务器下载文件到mac scp 用户名@服务器ip:

测试linux服务器带宽

测试准备 1. 计划考量参数 TCP上传数据带宽 TCP下载数据带宽 UDP上传带宽 UDP下载带宽 多并发支持 稳定性 Tcp通讯网络延迟(小包:32.中包1k.大包1M) UDP通讯网络延迟(小包:32.中包1k.大包1M) 协议可用性 指定文件真实http下载速度 2. 使用的软件 Iperf:可完成考量参数1-6 Pstools:可完成考量参数7-8 其余软件:完成考量参数9-10 测试执行 1. Iperf 1.1. 安装软件 服务器端(Centos)执行如下命令: wget http

Linux服务器之间共享文件

vi /etc/exports  #需要在root权限下 在该文件中按照如下格式插入: 需要共享文件的绝对路径 可以接受该文件的服务器IP(rw,no_root_squash,sync) 保存文件 重启NFS: service nfs restart   或是/etc/init.d/nfs restart 启动protmap: service protmap restart 登录到接收共享目录的服务器 vi /etc/exports 接收需要共享文件的绝对路径 共享该文件的服务器IP(rw,no