diff options
Diffstat (limited to 'src/collectors/ebpf.plugin/ebpf_cachestat.h')
-rw-r--r-- | src/collectors/ebpf.plugin/ebpf_cachestat.h | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/src/collectors/ebpf.plugin/ebpf_cachestat.h b/src/collectors/ebpf.plugin/ebpf_cachestat.h index 79d22b43..6bb91b64 100644 --- a/src/collectors/ebpf.plugin/ebpf_cachestat.h +++ b/src/collectors/ebpf.plugin/ebpf_cachestat.h @@ -33,10 +33,10 @@ #define NETDATA_CGROUP_CACHESTAT_HIT_FILES_CONTEXT "cgroup.cachestat_hits" #define NETDATA_CGROUP_CACHESTAT_MISS_FILES_CONTEXT "cgroup.cachestat_misses" -#define NETDATA_SYSTEMD_CACHESTAT_HIT_RATIO_CONTEXT "systemd.services.cachestat_ratio" -#define NETDATA_SYSTEMD_CACHESTAT_MODIFIED_CACHE_CONTEXT "systemd.services.cachestat_dirties" -#define NETDATA_SYSTEMD_CACHESTAT_HIT_FILE_CONTEXT "systemd.services.cachestat_hits" -#define NETDATA_SYSTEMD_CACHESTAT_MISS_FILES_CONTEXT "systemd.services.cachestat_misses" +#define NETDATA_SYSTEMD_CACHESTAT_HIT_RATIO_CONTEXT "systemd.service.cachestat_ratio" +#define NETDATA_SYSTEMD_CACHESTAT_MODIFIED_CACHE_CONTEXT "systemd.service.cachestat_dirties" +#define NETDATA_SYSTEMD_CACHESTAT_HIT_FILE_CONTEXT "systemd.service.cachestat_hits" +#define NETDATA_SYSTEMD_CACHESTAT_MISS_FILES_CONTEXT "systemd.service.cachestat_misses" // variables enum cachestat_counters { @@ -69,20 +69,27 @@ enum cachestat_tables { NETDATA_CACHESTAT_CTRL }; -typedef struct netdata_publish_cachestat_pid { +typedef struct netdata_cachestat_pid { uint64_t ct; uint32_t tgid; uint32_t uid; uint32_t gid; char name[TASK_COMM_LEN]; - uint64_t add_to_page_cache_lru; - uint64_t mark_page_accessed; - uint64_t account_page_dirtied; - uint64_t mark_buffer_dirty; + uint32_t add_to_page_cache_lru; + uint32_t mark_page_accessed; + uint32_t account_page_dirtied; + uint32_t mark_buffer_dirty; } netdata_cachestat_pid_t; -typedef struct netdata_publish_cachestat { +typedef struct __attribute__((packed)) netdata_cachestat { + uint32_t add_to_page_cache_lru; + uint32_t mark_page_accessed; + uint32_t account_page_dirtied; + uint32_t mark_buffer_dirty; +} netdata_cachestat_t; + +typedef struct __attribute__((packed)) netdata_publish_cachestat { uint64_t ct; long long ratio; @@ -90,8 +97,8 @@ typedef struct netdata_publish_cachestat { long long hit; long long miss; - netdata_cachestat_pid_t current; - netdata_cachestat_pid_t prev; + netdata_cachestat_t current; + netdata_cachestat_t prev; } netdata_publish_cachestat_t; void *ebpf_cachestat_thread(void *ptr); |