wondershaper限制网卡网速
主页:https://github.com/magnific0/wondershaper
安装:
git clone https://github.com/magnific0/wondershaper.git
cd wondershaper
make install
用法:
USAGE: wondershaper [-hcs] [-a <adapter>] [-d <rate>] [-u <rate>]
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
例如:
#限制上传带宽为10M
wondershaper -a eth0 -u 10240
#限制下载带宽为10M
wondershaper -a eth0 -d 10240
#限制上传和上传均10M
wondershaper -a eth0 -d 10240 -u 10240
#清除网卡限速规则
wondershaper -c -a eth0