网络性能测试工具Iperf和netperf
一、iperf工具的使用
同主机网络传输速率吞吐率 网络响应时间 TCP/UDP吞吐率
跨主机网络传输速率吞吐率 网络响应时间 TCP/UDP吞吐率
1、测试的两端都要安装
yum -y install epel-release
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-eilGR4Oz-1620028286981)(C:\Users\DELL\AppData\Roaming\Typora\typora-user-images\image-20210503133546101.png)]](https://i-blog.csdnimg.cn/blog_migrate/e7ab0d75dd1e0b1180022dc62355a385.png)
2、两端都要安装
yum install -y iperf
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-uSTk8sEX-1620028286982)(C:\Users\DELL\AppData\Roaming\Typora\typora-user-images\image-20210503150034813.png)]](https://i-blog.csdnimg.cn/blog_migrate/f4f31880ce746316117c26a94aff3861.png)
3、任意一台以server模式启动
ipef -s
![ [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-1dmYM6V7-1620028286983)(C:\Users\DELL\AppData\Roaming\Typora\typora-user-images\image-20210503150135766.png)]](https://i-blog.csdnimg.cn/blog_migrate/fb1eaaecdd52653a1efd31efec9e5267.png)
客户端
iperf -s -u UDP
iperf -c 192.168.40.10 -i 2 sec 以秒为单位显示报告间隔 一端接收一端发送
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-B7yk4e86-1620028286984)(C:\Users\DELL\AppData\Roaming\Typora\typora-user-images\image-20210503150237330.png)]](https://i-blog.csdnimg.cn/blog_migrate/47e4a9ddd866c0d798af536f90d02cee.png)
iperf -c 192.168.40.10 -t 50 -d 测量上下行带宽 默认是TCP
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-pZaNAWOE-1620028286986)(C:\Users\DELL\AppData\Roaming\Typora\typora-user-images\image-20210503150254179.png)]](https://i-blog.csdnimg.cn/blog_migrate/6d72b420c0e5cae407b8f7b0df881974.png)
iperf -c 192.168.40.10 -u 10 -d -u是UDP
iperf -h 可以看到你需要的哪些参数及用法
iperf -c 192.168.40.10 -u -t 10 /root/anaconda-ks.cfg 客户端
iperf -c 192.168.40.10 -u -i 1 -t 10 -b 2m 指定带宽发送


网络性能测试工具Netpert
Netperf 工具以 client/server 方式工作。server 端是 netserver,用来侦听来自 client 端的连 接,client 端是 netperf ,用来向 server 发起网络测试
wget -c “https://codeload.github.com/HewlettPackard/netperf/tar.gz/netperf-2.5.0” -O netperf-2.5.0.tar.gz
1、两台都要安装
tar zxvf netperf-2.5.0.tar.gz、
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-zihZ5HoA-1620028286987)(C:\Users\DELL\AppData\Roaming\Typora\typora-user-images\image-20210503150528425.png)]](https://i-blog.csdnimg.cn/blog_migrate/5199ff6bbd9c4bee46eabd44de48d2eb.png)
cd netperf-netperf-2.5.0/
./configure
make && make install
netperf –h 有显示则为成功
2、netserver指定自己为server端
Netserver
netperf -H 192.168.40.100 吞吐量TCP

netperf -t UDP_STREAM -H 192.168.40.10 吞吐量UDP 客户端执行

netperf -t TCP_STREAM -H 192.168.40.11 吞吐量TCP 服务端测试

netperf -c 192.168.40.10 测cpu


netperf -c 192.168.40.10 测cpu

以上是一部分参数 具体如有其他需要详情访问百度。

3413

被折叠的 条评论
为什么被折叠?



