wondershaper限制linux设备的上下行带宽

wondershaper 可以用来限制linux设备的上下行带宽

代码仓库https://github.com/magnific0/wondershaper.git

直接按照readme的说明进行使用即可,使用方法比较简单,

Some examples:

    wondershaper -a eth0 -d 1024 -u 512

    wondershaper -a eth1 -d 94000 -u 94000  # could be used on a 100Mbps link

    wondershaper -a eth1 -u 94000  # only limit upload

    wondershaper -c -a eth0

在使用中需要对内核的依赖进行一些配置,否则会报如下错误

wondershaper eth0 1024 0124
RTNETLINK answers: Operation not supported
RTNETLINK answers: Operation not supported
RTNETLINK answers: Operation not supported
RTNETLINK answers: Operation not supported
RTNETLINK answers: Operation not supported
RTNETLINK answers: Operation not supported
RTNETLINK answers: Operation not supported
RTNETLINK answers: Operation not supported
RTNETLINK answers: Operation not supported
We have an error talking to the kernel
RTNETLINK answers: Operation not supported
We have an error talking to the kernel
RTNETLINK answers: Operation not supported
We have an error talking to the kernel
RTNETLINK answers: Operation not supported
We have an error talking to the kernel
RTNETLINK answers: Operation not supported
We have an error talking to the kernel
RTNETLINK answers: Operation not supported
RTNETLINK answers: Operation not supported
We have an error talking to the kernel

需要在内核中打开的依赖模块如下,之前google搜了很久都没有搜到,自己尝试,做个记录。

posted @ 2022-04-27 10:25  tccxy  阅读(226)  评论(0编辑  收藏  举报