Last active
February 21, 2020 13:59
-
-
Save ffund/7a02086edcbff5af7db025e08621f08d to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
while IFS=, read -r tput tdiff | |
do | |
tdiff=${tdiff::-1} | |
#ts= `date +%s.%N` | |
#echo "$ts,$tdiff,$tput" | |
sudo tc class replace dev $(ip route get 10.0.3.1 | grep -oP "(?<=dev )[^ ]+") parent 1: classid 1:3 htb rate "$tput"mbit | |
sleep $tdiff | |
done < "$1"-tput.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment