linux服务器使用WonderShaper进行带宽限制
linux 下使用WonderShaper進行網(wǎng)絡(luò)限制。
1、安裝,首先安裝git工具,方便獲取源碼
Ubuntu系統(tǒng)
apt install -y make git
#CentOS系統(tǒng)
yum install make git -y
2、安裝WonderShaper
git clone https://github.com/magnific0/wondershaper.git
cd wondershaper
make install
3、安裝完成之后可以使用:WonderShaper -h 查看信息
操作
-h 顯示幫助
-a 設(shè)置適配器
-d 設(shè)置最大下載速率(以Kbps為單位)和/或
-u 設(shè)置最大上傳速率(Kbps)
-p 使用/etc/conf.d/wondershaper.conf中的預(yù)設(shè)
-c 清除適配器的限制
-s 顯示適配器的當前狀態(tài)
從MOOES何EXAMPLES可以看到使用的具體方法!
使用時注意:
1、如何查看網(wǎng)卡名字:ip add \ ifconfig
2、測試完成后不要忘記解除限速以免影響后續(xù)使用
例子:
限制eth0 上傳下載網(wǎng)速1024kbps
root@user-desktop:~/wondershaper# wondershaper -a eth0 -d 1024 -u 1024
刪除eth0 網(wǎng)絡(luò)限速
root@user-desktop:~/wondershaper# wondershaper -c -a eth0
顯示eth0網(wǎng)絡(luò)情況
總結(jié)
以上是生活随笔為你收集整理的linux服务器使用WonderShaper进行带宽限制的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 第八章:加载Maya2011模型
- 下一篇: Python中的Counter类