static_threads_linux.c 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. #include "common.h"
  3. extern void *cgroups_main(void *ptr);
  4. extern void *proc_main(void *ptr);
  5. extern void *diskspace_main(void *ptr);
  6. extern void *tc_main(void *ptr);
  7. extern void *timex_main(void *ptr);
  8. const struct netdata_static_thread static_threads_linux[] = {
  9. {
  10. .name = "P[tc]",
  11. .config_section = CONFIG_SECTION_PLUGINS,
  12. .config_name = "tc",
  13. .enabled = 1,
  14. .thread = NULL,
  15. .init_routine = NULL,
  16. .start_routine = tc_main
  17. },
  18. {
  19. .name = "P[diskspace]",
  20. .config_section = CONFIG_SECTION_PLUGINS,
  21. .config_name = "diskspace",
  22. .enabled = 1,
  23. .thread = NULL,
  24. .init_routine = NULL,
  25. .start_routine = diskspace_main
  26. },
  27. {
  28. .name = "P[proc]",
  29. .config_section = CONFIG_SECTION_PLUGINS,
  30. .config_name = "proc",
  31. .enabled = 1,
  32. .thread = NULL,
  33. .init_routine = NULL,
  34. .start_routine = proc_main
  35. },
  36. {
  37. .name = "P[cgroups]",
  38. .config_section = CONFIG_SECTION_PLUGINS,
  39. .config_name = "cgroups",
  40. .enabled = 1,
  41. .thread = NULL,
  42. .init_routine = NULL,
  43. .start_routine = cgroups_main
  44. },
  45. // terminator
  46. {
  47. .name = NULL,
  48. .config_section = NULL,
  49. .config_name = NULL,
  50. .env_name = NULL,
  51. .enabled = 0,
  52. .thread = NULL,
  53. .init_routine = NULL,
  54. .start_routine = NULL
  55. }
  56. };
  57. const struct netdata_static_thread static_threads_freebsd[] = {
  58. // terminator
  59. {
  60. .name = NULL,
  61. .config_section = NULL,
  62. .config_name = NULL,
  63. .env_name = NULL,
  64. .enabled = 0,
  65. .thread = NULL,
  66. .init_routine = NULL,
  67. .start_routine = NULL
  68. }
  69. };
  70. const struct netdata_static_thread static_threads_macos[] = {
  71. // terminator
  72. {
  73. .name = NULL,
  74. .config_section = NULL,
  75. .config_name = NULL,
  76. .env_name = NULL,
  77. .enabled = 0,
  78. .thread = NULL,
  79. .init_routine = NULL,
  80. .start_routine = NULL
  81. }
  82. };
  83. struct netdata_static_thread *static_threads_get() {
  84. return static_threads_concat(static_threads_common, static_threads_linux);
  85. }