Skip to main content

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.

Release files for linuxnet-qos 3.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for linuxnet-qos 3.5.2
File Size Uploaded
linuxnet_qos-3.5.2.tar.gz 91.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for linuxnet-qos 3.5.2
File Interpreter ABI Platform
linuxnet_qos-3.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 174.1 kB

Release files / linuxnet_qos-3.5.2.tar.gz

Download URL linuxnet_qos-3.5.2.tar.gz
Size 91.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5c1661236dc115107f2c1eaa084316680adefe4e990a5fc8e64cb66d92ac9d66
BLAKE2b-256 checksum
How to use checksums
bb88de768614467e590eb59ad89c31f1333164fbb5437f0d0477bca38e61f256
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.15

Release files / linuxnet_qos-3.5.2-py3-none-any.whl

Download URL linuxnet_qos-3.5.2-py3-none-any.whl
Size 82.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e47a19430d5b1208d73ae69e7bbc78fb42886268dc98f3f5c8acc5ecbf67d8e9
BLAKE2b-256 checksum
How to use checksums
a5d3d13e7914d6a929f61503dcb5d6df7c24b92d9259ae74d979c8f2abd1956f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.15

Release history Release notifications | RSS feed

This release

3.5.2 This release

2 release files

3.4.0

2 release files

3.3.6

2 release files

3.3.4

2 release files

3.2.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page