programmatic access to the Linux queuing disciplines
Project description
linuxnet-qos
linuxnet-qos provides programmatic access to the tc(8) command. Using linuxnet-qos one can manipulate the Linux Traffic Control functionality (queuing disciplines).
For the following examples, Python3 (3.6 or later) is required.
Accessing an interface's queuing discipline configuration:
>>> from linuxnet.qos import QDiscConfig
>>> config = QDiscConfig('eth2')
>>> config.dump()
PFifoFastQDisc(0:0) root bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
PFifoFastQDisc is the Python class used to represent the
pfifo_fast queuing discipline (see tc-pfifo_fast(8)).
The following examples modify the interface's queuing discipline, so
root privileges are required for successful execution of the tc
command.
Replacing the interface's root queuing discipline:
>>> from linuxnet.qos import NetemQDisc, Handle
>>> netem_qdisc = NetemQDisc(Handle(1,1), None, delay=30.0)
>>> config.create_qdisc(netem_qdisc)
>>> config.dump()
NetemQDisc(1:1) root delay 30.0ms
Deleting the existing queuing discipline configuration:
>>> config.delete_config()
>>> config.read_interface_config()
True
>>> config.dump()
PFifoFastQDisc(0:0) root bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
Installation
Python3 is required.
Available Makefile targets can be listed by invoking make with no arguments.
make install will install the package.
make test runs the unit tests.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file linuxnet_qos-3.5.2.tar.gz.
File metadata
- Download URL: linuxnet_qos-3.5.2.tar.gz
- Upload date:
- Size: 91.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c1661236dc115107f2c1eaa084316680adefe4e990a5fc8e64cb66d92ac9d66
|
|
| MD5 |
014b5aa703201ae253f23e7e6ce82b71
|
|
| BLAKE2b-256 |
bb88de768614467e590eb59ad89c31f1333164fbb5437f0d0477bca38e61f256
|
File details
Details for the file linuxnet_qos-3.5.2-py3-none-any.whl.
File metadata
- Download URL: linuxnet_qos-3.5.2-py3-none-any.whl
- Upload date:
- Size: 82.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e47a19430d5b1208d73ae69e7bbc78fb42886268dc98f3f5c8acc5ecbf67d8e9
|
|
| MD5 |
bb3fb4ddb7b7775f1d9d5253530b7c2a
|
|
| BLAKE2b-256 |
a5d3d13e7914d6a929f61503dcb5d6df7c24b92d9259ae74d979c8f2abd1956f
|