26a3314232d2fa40d41113eaacaa7edfbf26a39e
compute/one-liners.md
| ... | ... | @@ -12,3 +12,8 @@ Only if you trust your environment, mind. |
| 12 | 12 | |
| 13 | 13 | ### Iterate through arrays in bash |
| 14 | 14 | `for i in ${!ARR[@]}; do echo ${ARR[$i]}; done` |
| 15 | + |
|
| 16 | +### Restrict outgoing bandwidth on Linux |
|
| 17 | +`burst` is ((<rate in bits/s> / <kernel tick hz>) * 8) |
|
| 18 | +`latency` is the amount of data to queue before dropping traffic |
|
| 19 | +`tc qdisc add dev bond1 root tbf rate 4.5gbit burst 562500 latency 100ms` |