diff options
Diffstat (limited to 'collectors/debugfs.plugin')
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); |