summaryrefslogtreecommitdiffstats
path: root/collectors/tc.plugin
diff options
context:
space:
mode:
authorChris Akritidis <43294513+cakrit@users.noreply.github.com>2019-01-24 20:14:39 +0100
committerGitHub <noreply@github.com>2019-01-24 20:14:39 +0100
commit08e4690db8d08beb77d2438d9dd13d5f8d47d4c8 (patch)
tree560f32d4c8a57402a6b6c2a978cff190ea6f93c9 /collectors/tc.plugin
parent3c7da64a5a9d088932b3d87c344e76974f991245 (diff)
Improvements to QoS (tc) documentation (#5221)
* Improvements to QoS (tc) documentation Add configuration method provided by @laneshields at #4563 Wording improvements. Move additional example chart further up * Update README.md * Fixed internal link
Diffstat (limited to 'collectors/tc.plugin')
-rw-r--r--collectors/tc.plugin/README.md63
1 files changed, 38 insertions, 25 deletions
diff --git a/collectors/tc.plugin/README.md b/collectors/tc.plugin/README.md
index 387bf5edf8..4dc1a1d22d 100644
--- a/collectors/tc.plugin/README.md
+++ b/collectors/tc.plugin/README.md
@@ -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:
-## QoS in Linux? Have you lost your mind?
+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.
-Yes I know... but no, I have not!
+![test2](https://cloud.githubusercontent.com/assets/2662304/14093004/68966020-f553-11e5-98fe-ffee2086fafd.gif)
+
+---
+
+## 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,16 +163,32 @@ 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:
-
-This is QoS from my home linux router. Check these features:
+## 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
+```
-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.
+Add the following configuration option in `/etc/netdata.conf`:
+```[plugin:tc]
+ enable show all classes and qdiscs for all interfaces = yes
+```
-![test2](https://cloud.githubusercontent.com/assets/2662304/14093004/68966020-f553-11e5-98fe-ffee2086fafd.gif)
+Finally, create `/etc/netdata/tc-qos-helper.conf` with this content:
+```tc_show="class"```