summaryrefslogtreecommitdiffstats
path: root/collectors/debugfs.plugin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:19:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:20:02 +0000
commit58daab21cd043e1dc37024a7f99b396788372918 (patch)
tree96771e43bb69f7c1c2b0b4f7374cb74d7866d0cb /collectors/debugfs.plugin
parentReleasing debian version 1.43.2-1. (diff)
downloadnetdata-58daab21cd043e1dc37024a7f99b396788372918.tar.xz
netdata-58daab21cd043e1dc37024a7f99b396788372918.zip
Merging upstream version 1.44.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/debugfs.plugin')
-rw-r--r--collectors/debugfs.plugin/debugfs_plugin.c21
-rw-r--r--collectors/debugfs.plugin/integrations/linux_zswap.md5
-rw-r--r--collectors/debugfs.plugin/integrations/power_capping.md5
-rw-r--r--collectors/debugfs.plugin/integrations/system_memory_fragmentation.md5
-rw-r--r--collectors/debugfs.plugin/sys_devices_virtual_powercap.c4
5 files changed, 21 insertions, 19 deletions
diff --git a/collectors/debugfs.plugin/debugfs_plugin.c b/collectors/debugfs.plugin/debugfs_plugin.c
index 105b0a9e4..13012ec40 100644
--- a/collectors/debugfs.plugin/debugfs_plugin.c
+++ b/collectors/debugfs.plugin/debugfs_plugin.c
@@ -159,19 +159,11 @@ static void debugfs_parse_args(int argc, char **argv)
int main(int argc, char **argv)
{
- // debug_flags = D_PROCFILE;
- stderror = stderr;
-
- // set the name for logging
- program_name = "debugfs.plugin";
-
- // disable syslog for debugfs.plugin
- error_log_syslog = 0;
-
- log_set_global_severity_for_external_plugins();
+ clocks_init();
+ nd_log_initialize_for_external_plugins("debugfs.plugin");
netdata_configured_host_prefix = getenv("NETDATA_HOST_PREFIX");
- if (verify_netdata_host_prefix() == -1)
+ if (verify_netdata_host_prefix(true) == -1)
exit(1);
user_config_dir = getenv("NETDATA_USER_CONFIG_DIR");
@@ -243,6 +235,13 @@ int main(int argc, char **argv)
netdata_log_info("all modules are disabled, exiting...");
return 1;
}
+
+ fprintf(stdout, "\n");
+ fflush(stdout);
+ if (ferror(stdout) && errno == EPIPE) {
+ netdata_log_error("error writing to stdout: EPIPE. Exiting...");
+ return 1;
+ }
}
fprintf(stdout, "EXIT\n");
diff --git a/collectors/debugfs.plugin/integrations/linux_zswap.md b/collectors/debugfs.plugin/integrations/linux_zswap.md
index fa3948149..44478454b 100644
--- a/collectors/debugfs.plugin/integrations/linux_zswap.md
+++ b/collectors/debugfs.plugin/integrations/linux_zswap.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/debugfs.pl
sidebar_label: "Linux ZSwap"
learn_status: "Published"
learn_rel_path: "Data Collection/Linux Systems/Memory"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -126,8 +127,8 @@ sudo ./edit-config netdata.conf
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 1 | False |
-| command options | Additinal parameters for collector | | False |
+| update every | Data collection frequency. | 1 | no |
+| command options | Additinal parameters for collector | | no |
</details>
diff --git a/collectors/debugfs.plugin/integrations/power_capping.md b/collectors/debugfs.plugin/integrations/power_capping.md
index b17ece9a6..d4b7eb890 100644
--- a/collectors/debugfs.plugin/integrations/power_capping.md
+++ b/collectors/debugfs.plugin/integrations/power_capping.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/debugfs.pl
sidebar_label: "Power Capping"
learn_status: "Published"
learn_rel_path: "Data Collection/Linux Systems/Kernel"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -120,8 +121,8 @@ sudo ./edit-config netdata.conf
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 1 | False |
-| command options | Additinal parameters for collector | | False |
+| update every | Data collection frequency. | 1 | no |
+| command options | Additinal parameters for collector | | no |
</details>
diff --git a/collectors/debugfs.plugin/integrations/system_memory_fragmentation.md b/collectors/debugfs.plugin/integrations/system_memory_fragmentation.md
index 5eed517ed..ef287bc30 100644
--- a/collectors/debugfs.plugin/integrations/system_memory_fragmentation.md
+++ b/collectors/debugfs.plugin/integrations/system_memory_fragmentation.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/debugfs.pl
sidebar_label: "System Memory Fragmentation"
learn_status: "Published"
learn_rel_path: "Data Collection/Linux Systems/Memory"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -124,8 +125,8 @@ sudo ./edit-config netdata.conf
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update every | Data collection frequency. | 1 | False |
-| command options | Additinal parameters for collector | | False |
+| update every | Data collection frequency. | 1 | no |
+| command options | Additinal parameters for collector | | no |
</details>
diff --git a/collectors/debugfs.plugin/sys_devices_virtual_powercap.c b/collectors/debugfs.plugin/sys_devices_virtual_powercap.c
index f79b944a9..ee261c27f 100644
--- a/collectors/debugfs.plugin/sys_devices_virtual_powercap.c
+++ b/collectors/debugfs.plugin/sys_devices_virtual_powercap.c
@@ -151,7 +151,7 @@ int do_sys_devices_virtual_powercap(int update_every, const char *name __maybe_u
update_every);
fprintf(stdout,
- "CLABEL 'zone' '%s' 0\n"
+ "CLABEL 'zone' '%s' 1\n"
"CLABEL_COMMIT\n",
zone->name);
@@ -171,7 +171,7 @@ int do_sys_devices_virtual_powercap(int update_every, const char *name __maybe_u
update_every);
fprintf(stdout,
- "CLABEL 'zone' '%s' 0\n"
+ "CLABEL 'zone' '%s' 1\n"
"CLABEL_COMMIT\n",
zone->name);