From e96e724aaf87d74c6379a428c1ddd31cb345de26 Mon Sep 17 00:00:00 2001 From: vkalintiris Date: Fri, 19 Apr 2024 11:26:28 +0300 Subject: [PATCH] timex is not supported on windows. (#17443) --- CMakeLists.txt | 4 +++- src/daemon/static_threads.c | 10 ---------- src/daemon/static_threads_freebsd.c | 10 ++++++++++ src/daemon/static_threads_linux.c | 9 +++++++++ src/daemon/static_threads_macos.c | 10 ++++++++++ 5 files changed, 32 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c8e1ac49b1a9bb..80495b36b7d61d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1283,7 +1283,6 @@ set(NETDATA_FILES ${CLAIM_PLUGIN_FILES} ${SPAWN_PLUGIN_FILES} ${ACLK_ALWAYS_BUILD} - ${TIMEX_PLUGIN_FILES} ${PROFILE_PLUGIN_FILES} ) @@ -1294,6 +1293,7 @@ if(LINUX) ${DISKSPACE_PLUGIN_FILES} ${PROC_PLUGIN_FILES} ${TC_PLUGIN_FILES} + ${TIMEX_PLUGIN_FILES} ) if(ENABLE_SENTRY) @@ -1305,11 +1305,13 @@ elseif(MACOS) list(APPEND NETDATA_FILES src/daemon/static_threads_macos.c ${MACOS_PLUGIN_FILES} + ${TIMEX_PLUGIN_FILES} ) elseif(FREEBSD) list(APPEND NETDATA_FILES src/daemon/static_threads_freebsd.c ${FREEBSD_PLUGIN_FILES} + ${TIMEX_PLUGIN_FILES} ) endif() diff --git a/src/daemon/static_threads.c b/src/daemon/static_threads.c index e03819761ed945..9f0db6e1af6adc 100644 --- a/src/daemon/static_threads.c +++ b/src/daemon/static_threads.c @@ -12,22 +12,12 @@ void *health_main(void *ptr); void *pluginsd_main(void *ptr); void *service_main(void *ptr); void *statsd_main(void *ptr); -void *timex_main(void *ptr); void *profile_main(void *ptr); void *replication_thread_main(void *ptr); extern bool global_statistics_enabled; const struct netdata_static_thread static_threads_common[] = { - { - .name = "P[timex]", - .config_section = CONFIG_SECTION_PLUGINS, - .config_name = "timex", - .enabled = 1, - .thread = NULL, - .init_routine = NULL, - .start_routine = timex_main - }, { .name = "P[idlejitter]", .config_section = CONFIG_SECTION_PLUGINS, diff --git a/src/daemon/static_threads_freebsd.c b/src/daemon/static_threads_freebsd.c index cc150faf9a5baf..b354b9c2a53846 100644 --- a/src/daemon/static_threads_freebsd.c +++ b/src/daemon/static_threads_freebsd.c @@ -3,6 +3,7 @@ #include "common.h" extern void *freebsd_main(void *ptr); +extern void *timex_main(void *ptr); const struct netdata_static_thread static_threads_freebsd[] = { { @@ -14,6 +15,15 @@ const struct netdata_static_thread static_threads_freebsd[] = { .init_routine = NULL, .start_routine = freebsd_main }, + { + .name = "P[timex]", + .config_section = CONFIG_SECTION_PLUGINS, + .config_name = "timex", + .enabled = 1, + .thread = NULL, + .init_routine = NULL, + .start_routine = timex_main + }, {NULL, NULL, NULL, 0, NULL, NULL, NULL} }; diff --git a/src/daemon/static_threads_linux.c b/src/daemon/static_threads_linux.c index 54307eccffe31f..6939189978c031 100644 --- a/src/daemon/static_threads_linux.c +++ b/src/daemon/static_threads_linux.c @@ -45,6 +45,15 @@ const struct netdata_static_thread static_threads_linux[] = { .init_routine = NULL, .start_routine = cgroups_main }, + { + .name = "P[timex]", + .config_section = CONFIG_SECTION_PLUGINS, + .config_name = "timex", + .enabled = 1, + .thread = NULL, + .init_routine = NULL, + .start_routine = timex_main + }, // terminator { diff --git a/src/daemon/static_threads_macos.c b/src/daemon/static_threads_macos.c index aaf7df6f644537..f4a33e85538655 100644 --- a/src/daemon/static_threads_macos.c +++ b/src/daemon/static_threads_macos.c @@ -3,8 +3,18 @@ #include "common.h" extern void *macos_main(void *ptr); +extern void *timex_main(void *ptr); const struct netdata_static_thread static_threads_macos[] = { + { + .name = "P[timex]", + .config_section = CONFIG_SECTION_PLUGINS, + .config_name = "timex", + .enabled = 1, + .thread = NULL, + .init_routine = NULL, + .start_routine = timex_main + }, { .name = "P[macos]", .config_section = CONFIG_SECTION_PLUGINS,