diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 08:15:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 08:15:35 +0000 |
commit | f09848204fa5283d21ea43e262ee41aa578e1808 (patch) | |
tree | c62385d7adf209fa6a798635954d887f718fb3fb /src/collectors/ebpf.plugin/ebpf_dcstat.h | |
parent | Releasing debian version 1.46.3-2. (diff) | |
download | netdata-f09848204fa5283d21ea43e262ee41aa578e1808.tar.xz netdata-f09848204fa5283d21ea43e262ee41aa578e1808.zip |
Merging upstream version 1.47.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/collectors/ebpf.plugin/ebpf_dcstat.h')
-rw-r--r-- | src/collectors/ebpf.plugin/ebpf_dcstat.h | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/src/collectors/ebpf.plugin/ebpf_dcstat.h b/src/collectors/ebpf.plugin/ebpf_dcstat.h index 82f21f48c..a7e9f82b7 100644 --- a/src/collectors/ebpf.plugin/ebpf_dcstat.h +++ b/src/collectors/ebpf.plugin/ebpf_dcstat.h @@ -3,6 +3,8 @@ #ifndef NETDATA_EBPF_DCSTAT_H #define NETDATA_EBPF_DCSTAT_H 1 +#include "ebpf.h" + // Module name & description #define NETDATA_EBPF_MODULE_NAME_DCSTAT "dcstat" #define NETDATA_EBPF_DC_MODULE_DESC "Monitor file access using directory cache. This thread is integrated with apps and cgroup." @@ -27,10 +29,10 @@ #define NETDATA_CGROUP_DC_NOT_CACHE_CONTEXT "cgroup.dc_not_cache" #define NETDATA_CGROUP_DC_NOT_FOUND_CONTEXT "cgroup.dc_not_found" -#define NETDATA_SYSTEMD_DC_HIT_RATIO_CONTEXT "systemd.services.dc_ratio" -#define NETDATA_SYSTEMD_DC_REFERENCE_CONTEXT "systemd.services.dc_reference" -#define NETDATA_SYSTEMD_DC_NOT_CACHE_CONTEXT "systemd.services.dc_not_cache" -#define NETDATA_SYSTEMD_DC_NOT_FOUND_CONTEXT "systemd.services.dc_not_found" +#define NETDATA_SYSTEMD_DC_HIT_RATIO_CONTEXT "systemd.service.dc_ratio" +#define NETDATA_SYSTEMD_DC_REFERENCE_CONTEXT "systemd.service.dc_reference" +#define NETDATA_SYSTEMD_DC_NOT_CACHE_CONTEXT "systemd.service.dc_not_cache" +#define NETDATA_SYSTEMD_DC_NOT_FOUND_CONTEXT "systemd.service.dc_not_found" // ARAL name #define NETDATA_EBPF_DCSTAT_ARAL_NAME "ebpf_dcstat" @@ -69,26 +71,32 @@ enum directory_cache_targets { NETDATA_DC_TARGET_D_LOOKUP }; -typedef struct netdata_publish_dcstat_pid { +typedef struct __attribute__((packed)) netdata_publish_dcstat_pid { + uint64_t cache_access; + uint32_t file_system; + uint32_t not_found; +} netdata_publish_dcstat_pid_t; + +typedef struct netdata_dcstat_pid { uint64_t ct; uint32_t tgid; uint32_t uid; uint32_t gid; char name[TASK_COMM_LEN]; - uint64_t cache_access; - uint64_t file_system; - uint64_t not_found; + uint32_t cache_access; + uint32_t file_system; + uint32_t not_found; } netdata_dcstat_pid_t; -typedef struct netdata_publish_dcstat { +typedef struct __attribute__((packed)) netdata_publish_dcstat { uint64_t ct; long long ratio; long long cache_access; - netdata_dcstat_pid_t curr; - netdata_dcstat_pid_t prev; + netdata_publish_dcstat_pid_t curr; + netdata_publish_dcstat_pid_t prev; } netdata_publish_dcstat_t; void *ebpf_dcstat_thread(void *ptr); |