Skip to main content

Simple tc (traffic control) command wrapper

Project description

tcconfig

https://travis-ci.org/thombashi/tcconfig.svg?branch=master

About

Simple tc (traffic control) command wrapper.

Installation

pip install tcconfig

Usage

Set traffic control

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 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

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

tcconfig-0.1.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tcconfig-0.1.2-py2.py3-none-any.whl (6.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file tcconfig-0.1.2.tar.gz.

File metadata

  • Download URL: tcconfig-0.1.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tcconfig-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3e55e053726563a113aaecec1c6a66fafab51014054300059f967f32bb98af23
MD5 10a9b2cfffa341147e871cfb02541305
BLAKE2b-256 0f7eec67a8fab13fbe41b00fb9d4038b292eea6478da5b37d5aef1428e05a96a

See more details on using hashes here.

File details

Details for the file tcconfig-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for tcconfig-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4dde775f0c67948dab19e2a80d407db84fe96acd2af82f0ffb86288032390605
MD5 e012cfc1c1fd4e97da316de526072155
BLAKE2b-256 aeb65f3133a67be31bc18f911c5bae2437a8254105f32f5e0941a5b99dccae4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page