背景:有时你想测试一下传说中的微服务如熔断,服务器的接口超时(尤其是上传姑且叫大文件),这个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/
限速
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/
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:http://jackxiang.com/post/11178/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
最后编辑: jackxiang 编辑于2022-1-11 15:45
评论列表