标题:[小众限速]Centos7限速和测速 出处:向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除 时间:Tue, 11 Jan 2022 15:45:26 +0000 作者:jackxiang 地址:https://jackxiang.com/post/11178/ 内容: 背景:有时你想测试一下传说中的微服务如熔断,服务器的接口超时(尤其是上传姑且叫大文件),这个rpm包应该是有用的。 限速 wondershaper是国外人开发的一款在Linux内核下基于TC工具的对整块网卡的限度工具。 第一种安装方法 首先下载wondershaper的rpm安装包:wondershaper-1.1a-7.noarch.rpm 安装wondershaper: [root@localhost ~]# rpm -ivh wondershaper-1.1a-7.noarch.rpm 第二种安装方法 由于Centos7第三方库内才有这个软件,先安装第三方库 yum install epel-release -y yum install wondershaper -y 限速命令: 第一个参数为网卡接口名,后面两个数字分别代表上行和下行的速度(单位Kb) [root@localhost ~]# wondershaper eth0 5000 500 取消限速: [root@localhost ~]# wondershaper clear eth0 来自:https://www.shuzhiduo.com/A/LPdo61bg53/ Generated by Jackxiang's Bo-blog 2.1.1 Release