Skip to content

Jan-Magerl/lancache-tc-limit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

lancache-tc-limit

Script to set a download rate limit in lancache.net

Dependencies

Linux kernel modules sch_netem and ifb needed on the host.

Install

git clone https://github.com/Jan-Magerl/lancache-tc-limit
cd lancache-tc-limit
chmod +x limit.sh
chmod +x tc-limit.sh
nano limit.sh

edit location of file tc-limit.sh

Usage

limit [OPTION] [BANDWIDTH_RATE] copys and executes tc-limit.sh on lancache container

e.g: ./limit start 50mbit

[OPTION]

start [BANDWIDTH_RATE] sets a limit

stop removes the limit

status shows tc status

[BANDWIDTH_RATE]

Bandwidths or rates. These parameters accept a floating point number, possibly followed by either a unit (both SI and IEC units supported), or a float followed by a '%' character to specify the rate as a percentage of the device's speed (e.g. 5%, 99.5%). Warning: specifying the rate as a percentage means a fraction of the current speed; if the speed changes, the value will not be recalculated.

Syntax Description
bit or a bare number Bits per second
kbit Kilobits per second
mbit Megabits per second
gbit Gigabits per second
tbit Terabits per second
bps Bytes per second
kbps Kilobytes per second
mbps Megabytes per second
gbps Gigabytes per second
tbps Terabytes per second

To specify in IEC units, replace the SI prefix (k-, m-, g-, t-) with IEC prefix (ki-, mi-, gi- and ti-) respectively.

About

script for set a download rate limit in lancache.net

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages