diff options
Diffstat (limited to 'src/collectors/tc.plugin')
-rw-r--r-- | src/collectors/tc.plugin/integrations/tc_qos_classes.md | 8 | ||||
-rw-r--r-- | src/collectors/tc.plugin/metadata.yaml | 4 | ||||
-rw-r--r-- | src/collectors/tc.plugin/plugin_tc.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/collectors/tc.plugin/integrations/tc_qos_classes.md b/src/collectors/tc.plugin/integrations/tc_qos_classes.md index 2928110b3..204fa7de6 100644 --- a/src/collectors/tc.plugin/integrations/tc_qos_classes.md +++ b/src/collectors/tc.plugin/integrations/tc_qos_classes.md @@ -93,7 +93,7 @@ There are no alerts configured by default for this integration. In order to view tc classes, you need to create the file `/etc/netdata/tc-qos-helper.conf` with content: -```conf +```text tc_show="class" ``` @@ -116,8 +116,8 @@ The file format is a modified INI syntax. The general structure is: [section2] option3 = some third value ``` -You can edit the configuration file using the `edit-config` script from the -Netdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory). +You can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-a-configuration-file-using-edit-config) script from the +Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#the-netdata-config-directory). ```bash cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata @@ -144,7 +144,7 @@ A basic example configuration using classes defined in `/etc/iproute2/tc_cls`. An example of class IDs mapped to names in that file can be: -```conf +```text 2:1 Standard 2:8 LowPriorityData 2:10 HighThroughputData diff --git a/src/collectors/tc.plugin/metadata.yaml b/src/collectors/tc.plugin/metadata.yaml index f4039a8c5..c40b5aa01 100644 --- a/src/collectors/tc.plugin/metadata.yaml +++ b/src/collectors/tc.plugin/metadata.yaml @@ -41,7 +41,7 @@ modules: description: | In order to view tc classes, you need to create the file `/etc/netdata/tc-qos-helper.conf` with content: - ```conf + ```text tc_show="class" ``` configuration: @@ -74,7 +74,7 @@ modules: An example of class IDs mapped to names in that file can be: - ```conf + ```text 2:1 Standard 2:8 LowPriorityData 2:10 HighThroughputData diff --git a/src/collectors/tc.plugin/plugin_tc.c b/src/collectors/tc.plugin/plugin_tc.c index da2a39194..7102e216d 100644 --- a/src/collectors/tc.plugin/plugin_tc.c +++ b/src/collectors/tc.plugin/plugin_tc.c @@ -912,7 +912,7 @@ void *tc_main(void *ptr) { uint32_t first_hash; snprintfz(command, TC_LINE_MAX, "%s/tc-qos-helper.sh", netdata_configured_primary_plugins_dir); - char *tc_script = config_get("plugin:tc", "script to run to get tc values", command); + const char *tc_script = config_get("plugin:tc", "script to run to get tc values", command); while(service_running(SERVICE_COLLECTORS)) { struct tc_device *device = NULL; @@ -928,7 +928,7 @@ void *tc_main(void *ptr) { } char buffer[TC_LINE_MAX+1] = ""; - while(fgets(buffer, TC_LINE_MAX, tc_child_instance->child_stdout_fp) != NULL) { + while(fgets(buffer, TC_LINE_MAX, spawn_popen_stdout(tc_child_instance)) != NULL) { if(unlikely(!service_running(SERVICE_COLLECTORS))) break; buffer[TC_LINE_MAX] = '\0'; |