master
h 37 lines 1.21 KB
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 #ifndef NETDATA_EBPF_OOMKILL_H
4 #define NETDATA_EBPF_OOMKILL_H 1
5
6 // Module description
7 #define NETDATA_EBPF_OOMKILL_MODULE_DESC "Show OOM kills for all applications recognized via the apps.plugin."
8
9 /*****************************************************************
10 * copied from kernel-collectors repo, with modifications needed
11 * for inclusion here.
12 *****************************************************************/
13
14 #define NETDATA_OOMKILL_MAX_ENTRIES 64
15
16 typedef uint8_t oomkill_ebpf_val_t;
17
18 /*****************************************************************
19 * below this is eBPF plugin-specific code.
20 *****************************************************************/
21
22 #define NETDATA_EBPF_MODULE_NAME_OOMKILL "oomkill"
23 #define NETDATA_OOMKILL_CONFIG_FILE "oomkill.conf"
24
25 #define NETDATA_OOMKILL_CHART "_ebpf_oomkill"
26
27 #define EBPF_OOMKILL_UNIT_KILLS "kills/s"
28
29 // Contexts
30 #define NETDATA_CGROUP_OOMKILLS_CONTEXT "cgroup.oomkills"
31 #define NETDATA_SYSTEMD_OOMKILLS_CONTEXT "systemd.oomkills"
32
33 extern struct config oomkill_config;
34 void ebpf_oomkill_thread(void *ptr);
35 void ebpf_oomkill_create_apps_charts(struct ebpf_module *em, void *ptr);
36
37 #endif /* NETDATA_EBPF_OOMKILL_H */