Simple tc command wrapper. Easy to setup traffic control of network bandwidth/latency/packet-loss to a network interface.
Project description
tcconfig
Summary
Simple tc command wrapper. Easy to setup traffic control of network bandwidth/latency/packet-loss to a network interface.
Traffic control
The following parameters can be set of network interfaces.
Network bandwidth [G/M/K bps]
Network latency [milliseconds]
Packet loss rate [%]
Installation
Install via pip
tcconfig canbe installed via pip (Python package manager).
sudo pip install tcconfig
Usage
Set traffic control (tcset)
tcset is a command to impose traffic control to a network interface (device).
tcset help
usage: tcset [-h] [--version] [--logging] [--stacktrace] [--debug | --quiet]
--device DEVICE [--rate RATE] [--delay DELAY] [--loss LOSS]
[--overwrite]
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
--debug for debug print.
--quiet suppress output of execution log message.
Miscellaneous:
--logging output execution log to a file (tcset.log).
--stacktrace display stack trace when an error occurred.
Traffic Control:
--device DEVICE network device name
--rate RATE network bandwidth [K|M|G bps]
--delay DELAY round trip network delay [ms] (default=0)
--loss LOSS round trip packet loss rate [%] (default=0)
--overwrite overwrite existing setting
e.g. Set a limit on bandwidth up to 100Kbps
# tcset --device eth0 --rate 100k
e.g. Set 100ms network delay
# tcset --device eth0 --delay 100
e.g. Set 0.1% packet loss
# tcset --device eth0 --loss 0.1
e.g. All of the above at onece
# tcset --device eth0 --rate 100k --delay 100 --loss 0.1
Delete traffic control (tcdel)
tcdel is a command to delete traffic control from a network interface (device).
tcdel help
usage: tcdel [-h] [--version] [--logging] [--stacktrace] [--debug | --quiet]
--device DEVICE
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
--debug for debug print.
--quiet suppress output of execution log message.
Miscellaneous:
--logging output execution log to a file (tcset.log).
--stacktrace display stack trace when an error occurred.
Traffic Control:
--device DEVICE network device name
e.g.
# tcdel --device eth0
Dependencies
Linux package
iproute2 (reqrequired for tc commandured)
Python packagge
Python packagge: test dependencies
Project details
Release history Release notifications | RSS feed
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
Hashes for tcconfig-0.1.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2696c4e9ada00b56cee0af173c2ed7937d9f35627d6fbbbc4592b109d030aca3 |
|
MD5 | bd9950f1828985491b0484f5e46b8080 |
|
BLAKE2b-256 | e8d1f2bd1948cb2e21e6e7e11bd36aa72c88802bac02ea195c08b866aa4102e6 |