linux 限制上传下载速度

#安装git

yum -y install git

#下载wondershaper

git clone  https://github.com/magnific0/wondershaper.git

第二种安装依赖以及工具:

yum install epel-release -y yum install wondershaper -y

#查看查用命令

cd wondershaper/

./wondershaper -h

USAGE: ./wondershaper [-hcs] [-a <adapter>] [-d <rate>] [-u <rate>]

Limit the bandwidth of an adapter

OPTIONS:
   -h           Show this message
   -a <adapter> Set the adapter
   -d <rate>    Set maximum download rate (in Kbps) and/or
   -u <rate>    Set maximum upload rate (in Kbps)
   -p           Use presets in /etc/conf.d/wondershaper.conf
   -c           Clear the limits from adapter
   -s           Show the current status of adapter
   -v           Show the current version

MODES:
   wondershaper -a <adapter> -d <rate> -u <rate>
   wondershaper -c -a <adapter>
   wondershaper -s -a <adapter>

EXAMPLES:
   wondershaper -a eth0 -d 1024 -u 512
   wondershaper -a eth0 -u 512
   wondershaper -c -a eth0
#限制命令

./wondershaper -a ens192 -u 1000 -d 10240
 

#网卡 ens192 上传限制到1000kb 下载限制到 10240kb

清除原有规则 (两个参数可以是任何字符)
wondershaper clean clean
原文地址:https://www.cnblogs.com/SunshineKimi/p/12131955.html