1oomkill(8) System Manager's Manual oomkill(8)
2
3
4
6 oomkill.bt - Trace OOM killer. Uses bpftrace/eBPF.
7
9 oomkill.bt
10
12 This traces the kernel out-of-memory killer, and prints basic details,
13 including the system load averages at the time of the OOM kill. This
14 can provide more context on the system state at the time: was it get‐
15 ting busier or steady, based on the load averages? This tool may also
16 be useful to customize for investigations; for example, by adding other
17 task_struct details at the time of OOM, or by adding other commands to
18 run at the shell.
19
20 Since this uses BPF, only the root user can use this tool.
21
23 CONFIG_BPF and bpftrace.
24
26 Trace OOM kill events:
27 # oomkill.bt
28
30 Triggered by ...
31 The process ID and process name of the task that was running
32 when another task was OOM killed.
33
34 OOM kill of ...
35 The process ID and name of the target process that was OOM
36 killed.
37
38 loadavg
39 Contents of /proc/loadavg. The first three numbers are 1, 5, and
40 15 minute load averages (where the average is an exponentially
41 damped moving sum, and those numbers are constants in the equa‐
42 tion); then there is the number of running tasks, a slash, and
43 the total number of tasks; and then the last number is the last
44 PID to be created.
45
47 Negligible.
48
50 This is from bpftrace.
51
52 https://github.com/iovisor/bpftrace
53
54 Also look in the bpftrace distribution for a companion _examples.txt
55 file containing example usage, output, and commentary for this tool.
56
57 This is a bpftrace version of the bcc tool of the same name. The bcc
58 tool may provide more options and customizations.
59
60 https://github.com/iovisor/bcc
61
63 Linux
64
66 Unstable - in development.
67
69 Brendan Gregg
70
72 dmesg(1)
73
74
75
76USER COMMANDS 2018-09-07 oomkill(8)