Created
November 10, 2018 21:23
-
-
Save rraallvv/bd4a0390586f0c9c076b72fb818fb4be to your computer and use it in GitHub Desktop.
Traffic Controller Limit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# clear limit | |
sudo tc qdisc del dev eth0 root | |
# add limit | |
cgcreate -g net_cls:slow | |
echo 0x10001 > /sys/fs/cgroup/net_cls/slow/net_cls.classid | |
cgclassify -g net_cls:slow <pid of the process you want to limit> | |
tc qdisc add dev eth0 root handle 1: htb | |
tc filter add dev eth0 parent 1: handle 1: cgroup | |
tc class add dev eth0 parent 1: classid 1:1 htb rate 1mbps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment