python - Linux下的流量整形

标签 python linux ubuntu trafficshaping

我在哪里可以了解如何在 Linux 下控制/查询网络接口(interface)?我想获得特定应用程序的上传/下载速度,并对特定应用程序实现速度限制。

我特别喜欢可以帮助我使用 Python 编写流量整形应用程序的信息。

最佳答案

您需要 iproute2 套件,在其中使用 tc命令。 tc 命令看起来像

tc class add dev eth2 parent 1: classid 1:1 htb rate 100Mbit ceil 100Mbit quantum 1600

这是 an existing Python traffic-shaping application使用 iproute2。

关于python - Linux下的流量整形,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1548086/

相关文章:

python - 在 yaml 文件中为谷歌应用引擎设置 url(找不到页面)问题

python - 如何使用python创建新文件

c++ - linux下OpenCV HighGui全屏

linux - 如何更新ubuntu中已经安装的应用程序?

python - Pandas :AttributeError: 'DataFrame' 对象没有属性 'agg'

python - 根据列名创建 DataFrame 的子集

linux - 使用文件 url 访问文件

python - 为什么我使用 "sudo"关键字后,权限被拒绝?

c++ - Linux 中 libstdc++ 的调试功能?

c - 在 Ubuntu 16.04 上找不到 printf.c