Created
November 10, 2018 21:23
-
-
Save rraallvv/bd4a0390586f0c9c076b72fb818fb4be to your computer and use it in GitHub Desktop.
Revisions
-
rraallvv created this gist
Nov 10, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ # 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