summaryrefslogtreecommitdiffstats
path: root/collectors/tc.plugin/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/tc.plugin/README.md')
-rw-r--r--collectors/tc.plugin/README.md65
1 files changed, 40 insertions, 25 deletions
diff --git a/collectors/tc.plugin/README.md b/collectors/tc.plugin/README.md
index a8b151de3..4dc1a1d22 100644
--- a/collectors/tc.plugin/README.md
+++ b/collectors/tc.plugin/README.md
@@ -1,4 +1,4 @@
-## tc.plugin
+# tc.plugin
Live demo - **[see it in action here](https://registry.my-netdata.io/#menu_tc)** !
@@ -6,15 +6,11 @@ Live demo - **[see it in action here](https://registry.my-netdata.io/#menu_tc)**
Netdata monitors `tc` QoS classes for all interfaces.
-If you also use [FireQOS](http://firehol.org/tutorial/fireqos-new-user/) it will collect
-interface and class names.
+If you also use [FireQOS](http://firehol.org/tutorial/fireqos-new-user/) it will collect interface and class names.
-There is a [shell helper](tc-qos-helper.sh.in) for this (all parsing is done by the plugin
-in `C` code - this shell script is just a configuration for the command to run to get `tc` output).
+There is a [shell helper](tc-qos-helper.sh.in) for this (all parsing is done by the plugin in `C` code - this shell script is just a configuration for the command to run to get `tc` output).
-The source of the tc plugin is [here](plugin_tc.c). It is somewhat complex, because a state
-machine was needed to keep track of all the `tc` classes, including the pseudo classes tc
-dynamically creates.
+The source of the tc plugin is [here](plugin_tc.c). It is somewhat complex, because a state machine was needed to keep track of all the `tc` classes, including the pseudo classes tc dynamically creates.
## Motivation
@@ -80,11 +76,16 @@ Once **traffic classification** is applied, we can use **[netdata](https://githu
QoS, is extremely light. You will configure it once, and this is it. It will not bother you again and it will not use any noticeable CPU resources, especially on application and database servers.
----
+This is QoS from a home linux router. Check these features:
+
+1. It is real-time (per second updates)
+2. QoS really works in Linux - check that the `background` traffic is squeezed when `surfing` needs it.
-## QoS in Linux? Have you lost your mind?
+![test2](https://cloud.githubusercontent.com/assets/2662304/14093004/68966020-f553-11e5-98fe-ffee2086fafd.gif)
+
+---
-Yes I know... but no, I have not!
+## QoS in Linux?
Of course, `tc` is probably **the most undocumented, complicated and unfriendly** command in Linux.
@@ -108,17 +109,13 @@ For example, do you know that for matching a simple port range in `tc`, e.g. all
32768/0x8000
```
-I know what you are thinking right now! **And I agree!**
+To do it the hard way, you can go through the [tc configuration steps](#qos-configuration-with-tc). An easier way is to use **[FireQOS](https://firehol.org/tutorial/fireqos-new-user/)**, a tool that simplifies QoS management in Linux.
-This is why I wrote **[FireQOS](https://firehol.org/tutorial/fireqos-new-user/)**, a tool to simplify QoS management in Linux.
+## Qos Configuration with FireHOL
The **[FireHOL](https://firehol.org/)** package already distributes **[FireQOS](https://firehol.org/tutorial/fireqos-new-user/)**. Check the **[FireQOS tutorial](https://firehol.org/tutorial/fireqos-new-user/)** to learn how to write your own QoS configuration.
-With **[FireQOS](https://firehol.org/tutorial/fireqos-new-user/)**, it is **really simple for everyone to use QoS in Linux**. Just install the package `firehol`. It should already be available for your distribution. If not, check the **[FireHOL Installation Guide](https://firehol.org/installing/)**. After that, you will have the `fireqos` command which uses a configuration like the following:
-
-## QoS Configuration
-
-This is the file `/etc/firehol/fireqos.conf` we use at the netdata demo site:
+With **[FireQOS](https://firehol.org/tutorial/fireqos-new-user/)**, it is **really simple for everyone to use QoS in Linux**. Just install the package `firehol`. It should already be available for your distribution. If not, check the **[FireHOL Installation Guide](https://firehol.org/installing/)**. After that, you will have the `fireqos` command which uses a configuration like the following `/etc/firehol/fireqos.conf`, used at the netdata demo site:
```sh
# configure the netdata ports
@@ -166,15 +163,33 @@ And this is what you are going to get:
![image](https://cloud.githubusercontent.com/assets/2662304/14436322/c91d90a4-0024-11e6-9fb1-57cdef1580df.png)
----
-
-## More examples:
+## QoS Configuration with tc
+
+First, setup the tc rules in rc.local using commands to assign different DSCP markings to different classids. You can see one such example in [github issue #4563](https://github.com/netdata/netdata/issues/4563#issuecomment-455711973).
+
+Then, map the classids to names by creating `/etc/iproute2/tc_cls`. For example:
+```2:1 Standard
+2:8 LowPriorityData
+2:10 HighThroughputData
+2:16 OAM
+2:18 LowLatencyData
+2:24 BroadcastVideo
+2:26 MultimediaStreaming
+2:32 RealTimeInteractive
+2:34 MultimediaConferencing
+2:40 Signalling
+2:46 Telephony
+2:48 NetworkControl
+```
-This is QoS from my home linux router. Check these features:
+Add the following configuration option in `/etc/netdata.conf`:
+```[plugin:tc]
+ enable show all classes and qdiscs for all interfaces = yes
+```
-1. It is real-time (per second updates)
-2. QoS really works in Linux - check that the `background` traffic is squeezed when `surfing` needs it.
+Finally, create `/etc/netdata/tc-qos-helper.conf` with this content:
+```tc_show="class"```
-![test2](https://cloud.githubusercontent.com/assets/2662304/14093004/68966020-f553-11e5-98fe-ffee2086fafd.gif)
+[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fcollectors%2Ftc.plugin%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)]()