summaryrefslogtreecommitdiffstats
path: root/src/collectors/ebpf.plugin/ebpf_swap.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/collectors/ebpf.plugin/ebpf_swap.h')
-rw-r--r--src/collectors/ebpf.plugin/ebpf_swap.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/collectors/ebpf.plugin/ebpf_swap.h b/src/collectors/ebpf.plugin/ebpf_swap.h
index 92aecd29..478b47ad 100644
--- a/src/collectors/ebpf.plugin/ebpf_swap.h
+++ b/src/collectors/ebpf.plugin/ebpf_swap.h
@@ -21,19 +21,26 @@
// Contexts
#define NETDATA_CGROUP_SWAP_READ_CONTEXT "cgroup.swap_read"
#define NETDATA_CGROUP_SWAP_WRITE_CONTEXT "cgroup.swap_write"
-#define NETDATA_SYSTEMD_SWAP_READ_CONTEXT "systemd.services.swap_read"
-#define NETDATA_SYSTEMD_SWAP_WRITE_CONTEXT "systemd.services.swap_write"
+#define NETDATA_SYSTEMD_SWAP_READ_CONTEXT "systemd.service.swap_read"
+#define NETDATA_SYSTEMD_SWAP_WRITE_CONTEXT "systemd.service.swap_write"
-typedef struct netdata_publish_swap {
+typedef struct __attribute__((packed)) netdata_publish_swap {
+ uint64_t ct;
+
+ uint32_t read;
+ uint32_t write;
+} netdata_publish_swap_t;
+
+typedef struct netdata_ebpf_swap {
uint64_t ct;
uint32_t tgid;
uint32_t uid;
uint32_t gid;
char name[TASK_COMM_LEN];
- uint64_t read;
- uint64_t write;
-} netdata_publish_swap_t;
+ uint32_t read;
+ uint32_t write;
+} netdata_ebpf_swap_t;
enum swap_tables {
NETDATA_PID_SWAP_TABLE,