praus / shapy Goto Github PK
View Code? Open in Web Editor NEWPython API for Linux Traffic Control
Home Page: https://github.com/praus/shapy
License: MIT License
Python API for Linux Traffic Control
Home Page: https://github.com/praus/shapy
License: MIT License
Run python example.py will get error as below
07:29:45 shapy.framework.executor ERROR: [1] sudo modprobe ifb [modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/4.1.12-boot2docker/modules.dep.bin']
07:29:45 shapy.framework.executor INFO: [0] sudo ip link show dev lo
07:29:45 shapy.emulation.shaper INFO: Configuring 127.0.0.2 -> U:1024kbps D:1024kbps delay:5ms jitter:±5ms
07:29:45 shapy.framework.executor ERROR: [1] sudo ip link show dev ifb1 [Device "ifb1" does not exist.]
07:29:45 shapy.framework.executor INFO: [0] sudo ip link show dev lo
07:29:45 shapy.framework.executor ERROR: [1] sudo ip link show dev ifb0 [Device "ifb0" does not exist.]
07:29:45 shapy.framework.executor INFO: [0] sudo ip link show dev lo
07:29:45 shapy.emulation.shaper INFO: Configuring 127.0.0.4 -> U:256kbps D:512kbps delay:20ms jitter:±0ms
07:29:45 shapy.framework.executor ERROR: [1] sudo ip link show dev ifb1 [Device "ifb1" does not exist.]
07:29:45 shapy.framework.executor INFO: [0] sudo ip link show dev lo
07:29:45 shapy.framework.executor ERROR: [1] sudo ip link show dev ifb0 [Device "ifb0" does not exist.]
07:29:45 shapy.framework.executor INFO: [0] sudo ip link show dev lo
07:29:45 shapy.emulation.shaper INFO: Configuring 127.0.0.3 -> U:256kbps D:512kbps delay:20ms jitter:±0ms
07:29:45 shapy.framework.executor ERROR: [1] sudo ip link show dev ifb1 [Device "ifb1" does not exist.]
07:29:45 shapy.framework.executor INFO: [0] sudo ip link show dev lo
07:29:45 shapy.framework.executor ERROR: [1] sudo ip link show dev ifb0 [Device "ifb0" does not exist.]
07:29:45 shapy.framework.executor INFO: [0] sudo ip link show dev lo
07:29:45 shapy.emulation.shaper INFO: Setting up shaping/emulation on interface lo:
07:29:45 shapy.framework.executor INFO: [0] sudo ip link show dev lo
Traceback (most recent call last):
File "example.py", line 18, in
sh.set_shaping(ps)
File "/usr/local/lib/python2.7/dist-packages/shapy/emulation/shaper.py", line 124, in set_shaping
shapy.Interface(i).set_shaping()
File "/usr/local/lib/python2.7/dist-packages/shapy/framework/interface.py", line 39, in set_shaping
self.ingress.execute()
File "/usr/local/lib/python2.7/dist-packages/shapy/framework/netlink/init.py", line 30, in execute
resp = connection.recv()
File "/usr/local/lib/python2.7/dist-packages/shapy/framework/netlink/connection.py", line 39, in recv
raise err
OSError: Netlink error: Operation not permitted (1) | msg: 0\x00\x00\x00$\x00\x05\x06\x01\x00\x00\x00_\x01\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\xff\xff\xf1\xff\xff\xff\x00\x00\x00\x00\x0c\x00\x01\x00ingress\x00
Run teardown get below errors
07:16:06 ERROR: [1] sudo modprobe ifb [modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/4.1.12-boot2docker/modules.dep.bin']
07:16:06 INFO: [0] sudo ip link show dev lo
07:16:06 INFO: Tearing down lo
07:16:06 INFO: [0] sudo ip link show dev lo
07:16:06 ERROR: [2] sudo tc qdisc del dev lo root [RTNETLINK answers: Operation not permitted]
07:16:06 ERROR: [2] sudo tc qdisc del dev lo ingress [RTNETLINK answers: Operation not permitted]
07:16:06 INFO: Tearing down IFBs
Tearing down all interfaces: lo
This will clear entire Traffic Control configuration and unload IFB module.
Please note reported errors usually do not mean anything bad, just that there was nothing to tear down on that particular interface.
07:16:06 ERROR: [1] sudo rmmod ifb [rmmod: ERROR: Module ifb is not currently loaded]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.