oomkill(8) System Manager's Manual oomkill(8)

# [NAME](#NAME)

oomkill - Trace oom\_kill\_process(). Uses Linux eBPF/bcc.

# [SYNOPSIS](#SYNOPSIS)

**oomkill**

# [DESCRIPTION](#DESCRIPTION)

This traces the kernel out-of-memory killer, and prints basic details, including the system load averages at the time of the OOM kill. This can provide more context on the system state at the time: was it getting busier or steady, based on the load averages? This tool may also be useful to customize for investigations; for example, by adding other task\_struct details at the time of OOM.

This program is also a basic example of eBPF/bcc.

Since this uses BPF, only the root user can use this tool.

# [REQUIREMENTS](#REQUIREMENTS)

CONFIG\_BPF and bcc.

# [EXAMPLES](#EXAMPLES)

[Trace OOM kill events:](#Trace)

\# **oomkill**

# [FIELDS](#FIELDS)

[Triggered by ...](#Triggered)

The process ID and process name of the task that was running when another task was OOM killed.

[OOM kill of ...](#OOM)

The process ID and name of the target process that was OOM killed.

[loadavg](#loadavg)

Contents of /proc/loadavg. The first three numbers are 1, 5, and 15 minute load averages (where the average is an exponentially damped moving sum, and those numbers are constants in the equation); then there is the number of running tasks, a slash, and the total number of tasks; and then the last number is the last PID to be created.

# [OVERHEAD](#OVERHEAD)

Negligible.

# [SOURCE](#SOURCE)

This is from bcc.

https://github.com/iovisor/bcc

Also look in the bcc distribution for a companion \_examples.txt file containing example usage, output, and commentary for this tool.

# [OS](#OS)

Linux

# [STABILITY](#STABILITY)

Unstable - in development.

# [AUTHOR](#AUTHOR)

Brendan Gregg

# [SEE ALSO](#SEE_ALSO)

[memleak(8)](/man/enterprise-packages/bcc/memleak.8)

2016-02-09 USER COMMANDS

---

Document: oomkill(8) from bcc 0.37.0-r3 (Chainguard OS)
Source: https://github.com/iovisor/bcc
