summaryrefslogtreecommitdiffstats
path: root/collectors/ebpf.plugin/ebpf_oomkill.c
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/ebpf.plugin/ebpf_oomkill.c')
-rw-r--r--collectors/ebpf.plugin/ebpf_oomkill.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/collectors/ebpf.plugin/ebpf_oomkill.c b/collectors/ebpf.plugin/ebpf_oomkill.c
index 7f7df36f9..434fc7fd3 100644
--- a/collectors/ebpf.plugin/ebpf_oomkill.c
+++ b/collectors/ebpf.plugin/ebpf_oomkill.c
@@ -386,14 +386,22 @@ void *ebpf_oomkill_thread(void *ptr)
goto endoomkill;
}
- probe_links = ebpf_load_program(ebpf_plugin_dir, em, kernel_string, &objects);
+ probe_links = ebpf_load_program(ebpf_plugin_dir, em, running_on_kernel, isrh, &objects);
if (!probe_links) {
+ em->enabled = CONFIG_BOOLEAN_NO;
goto endoomkill;
}
+ pthread_mutex_lock(&lock);
+ ebpf_update_stats(&plugin_statistics, em);
+ pthread_mutex_unlock(&lock);
+
oomkill_collector(em);
endoomkill:
+ if (!em->enabled)
+ ebpf_update_disabled_plugin_stats(em);
+
netdata_thread_cleanup_pop(1);
return NULL;