diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2023-04-24 16:43:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-24 16:43:59 +0000 |
commit | 24880f912a5c347527b654302f4f1784a19ff2ce (patch) | |
tree | 5743506d8f93038b34d3e9c0ca99fcc59a0cc754 /libnetdata | |
parent | 71d314228526bd8e26e93c149b1c449347eb1689 (diff) |
Address issues on `EC2` (eBPF). (#14902)
Diffstat (limited to 'libnetdata')
-rw-r--r-- | libnetdata/ebpf/ebpf.c | 2 | ||||
-rw-r--r-- | libnetdata/ebpf/ebpf.h | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/libnetdata/ebpf/ebpf.c b/libnetdata/ebpf/ebpf.c index c47ad29943..61833dd73c 100644 --- a/libnetdata/ebpf/ebpf.c +++ b/libnetdata/ebpf/ebpf.c @@ -441,7 +441,7 @@ void ebpf_update_stats(ebpf_plugin_stats_t *report, ebpf_module_t *em) report->threads++; // It is not necessary to report more information. - if (!em->enabled) + if (em->enabled != NETDATA_THREAD_EBPF_RUNNING) return; report->running++; diff --git a/libnetdata/ebpf/ebpf.h b/libnetdata/ebpf/ebpf.h index 5962b299a3..bf5fdc33d4 100644 --- a/libnetdata/ebpf/ebpf.h +++ b/libnetdata/ebpf/ebpf.h @@ -260,10 +260,17 @@ typedef enum netdata_apps_integration_flags { #define NETDATA_EBPF_STAT_DIMENSION_MEMORY "memory" #define NETDATA_EBPF_STAT_DIMENSION_ARAL "aral" +enum ebpf_threads_status { + NETDATA_THREAD_EBPF_RUNNING, + NETDATA_THREAD_EBPF_STOPPING, + NETDATA_THREAD_EBPF_STOPPED, + NETDATA_THREAD_EBPF_NOT_RUNNING +}; + typedef struct ebpf_module { const char *thread_name; const char *config_name; - int enabled; + enum ebpf_threads_status enabled; void *(*start_routine)(void *); int update_every; int global_charts; |