diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-01-26 18:05:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-01-26 18:05:10 +0000 |
commit | 34a0b66bc2d48223748ed1cf5bc1b305c396bd74 (patch) | |
tree | fbd36be86cc6bc4288fe627f2b5beada569848bb /daemon/main.c | |
parent | Adding upstream version 1.32.1. (diff) | |
download | netdata-34a0b66bc2d48223748ed1cf5bc1b305c396bd74.tar.xz netdata-34a0b66bc2d48223748ed1cf5bc1b305c396bd74.zip |
Adding upstream version 1.33.0.upstream/1.33.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | daemon/main.c | 41 |
1 files changed, 6 insertions, 35 deletions
diff --git a/daemon/main.c b/daemon/main.c index 2ec5c33f9..7c8e09a5f 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -2,10 +2,13 @@ #include "common.h" #include "buildinfo.h" +#include "static_threads.h" int netdata_zero_metrics_enabled; int netdata_anonymous_statistics_enabled; +struct netdata_static_thread *static_threads; + struct config netdata_config = { .first_section = NULL, .last_section = NULL, @@ -76,41 +79,6 @@ void netdata_cleanup_and_exit(int ret) { exit(ret); } -struct netdata_static_thread static_threads[] = { - NETDATA_PLUGIN_HOOK_GLOBAL_STATISTICS - - NETDATA_PLUGIN_HOOK_CHECKS - NETDATA_PLUGIN_HOOK_FREEBSD - NETDATA_PLUGIN_HOOK_MACOS - - // linux internal plugins - NETDATA_PLUGIN_HOOK_LINUX_PROC - NETDATA_PLUGIN_HOOK_LINUX_DISKSPACE - NETDATA_PLUGIN_HOOK_LINUX_TIMEX - NETDATA_PLUGIN_HOOK_LINUX_CGROUPS - NETDATA_PLUGIN_HOOK_LINUX_TC - - NETDATA_PLUGIN_HOOK_IDLEJITTER - NETDATA_PLUGIN_HOOK_STATSD - -#if defined(ENABLE_ACLK) || defined(ACLK_NG) - NETDATA_ACLK_HOOK -#endif - - // common plugins for all systems - {"BACKENDS", NULL, NULL, 1, NULL, NULL, backends_main}, - {"EXPORTING", NULL, NULL, 1, NULL, NULL, exporting_main}, - {"WEB_SERVER[static1]", NULL, NULL, 0, NULL, NULL, socket_listen_main_static_threaded}, - {"STREAM", NULL, NULL, 0, NULL, NULL, rrdpush_sender_thread}, - - NETDATA_PLUGIN_HOOK_PLUGINSD - NETDATA_PLUGIN_HOOK_HEALTH - NETDATA_PLUGIN_HOOK_ANALYTICS - NETDATA_PLUGIN_HOOK_SERVICE - - {NULL, NULL, NULL, 0, NULL, NULL, NULL} -}; - void web_server_threading_selection(void) { web_server_mode = web_server_mode_id(config_get(CONFIG_SECTION_WEB, "mode", web_server_mode_name(web_server_mode))); @@ -281,6 +249,8 @@ void cancel_main_threads() { } else info("All threads finished."); + + free(static_threads); } struct option_def option_definitions[] = { @@ -723,6 +693,7 @@ int main(int argc, char **argv) { size_t default_stacksize; char *user = NULL; + static_threads = static_threads_get(); netdata_ready=0; // set the name for logging |