From a64a253794ac64cb40befee54db53bde17dd0d49 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 7 Nov 2018 13:19:29 +0100 Subject: New upstream version 1.11.0+dfsg Signed-off-by: Daniel Baumann --- collectors/macos.plugin/plugin_macos.h | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 collectors/macos.plugin/plugin_macos.h (limited to 'collectors/macos.plugin/plugin_macos.h') diff --git a/collectors/macos.plugin/plugin_macos.h b/collectors/macos.plugin/plugin_macos.h new file mode 100644 index 000000000..0815c59c3 --- /dev/null +++ b/collectors/macos.plugin/plugin_macos.h @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + + +#ifndef NETDATA_PLUGIN_MACOS_H +#define NETDATA_PLUGIN_MACOS_H 1 + +#include "../../daemon/common.h" + +#if (TARGET_OS == OS_MACOS) + +#define NETDATA_PLUGIN_HOOK_MACOS \ + { \ + .name = "PLUGIN[macos]", \ + .config_section = CONFIG_SECTION_PLUGINS, \ + .config_name = "macos", \ + .enabled = 1, \ + .thread = NULL, \ + .init_routine = NULL, \ + .start_routine = macos_main \ + }, + +void *macos_main(void *ptr); + +#define GETSYSCTL_BY_NAME(name, var) getsysctl_by_name(name, &(var), sizeof(var)) + +extern int getsysctl_by_name(const char *name, void *ptr, size_t len); + +extern int do_macos_sysctl(int update_every, usec_t dt); +extern int do_macos_mach_smi(int update_every, usec_t dt); +extern int do_macos_iokit(int update_every, usec_t dt); + + +#else // (TARGET_OS == OS_MACOS) + +#define NETDATA_PLUGIN_HOOK_MACOS + +#endif // (TARGET_OS == OS_MACOS) + + + + + +#endif /* NETDATA_PLUGIN_MACOS_H */ -- cgit v1.2.3