summaryrefslogtreecommitdiffstats
path: root/man/man5/proc_pid_oom_score.5
blob: 6849e8dce79c640ce2a8c58115775633d3400ac8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" Copyright (C) 1994, 1995, Daniel Quinlan <quinlan@yggdrasil.com>
.\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Copyright (C) 2023, Alejandro Colomar <alx@kernel.org>
.\"
.\" SPDX-License-Identifier: GPL-3.0-or-later
.\"
.TH proc_pid_oom_score 5 (date) "Linux man-pages (unreleased)"
.SH NAME
/proc/pid/oom_score \- OOM-killer score
.SH DESCRIPTION
.TP
.IR /proc/ pid /oom_score " (since Linux 2.6.11)"
.\" See mm/oom_kill.c::badness() before Linux 2.6.36 sources
.\" See mm/oom_kill.c::oom_badness() after Linux 2.6.36
.\" commit a63d83f427fbce97a6cea0db2e64b0eb8435cd10
This file displays the current score that the kernel gives to
this process for the purpose of selecting a process
for the OOM-killer.
A higher score means that the process is more likely to be
selected by the OOM-killer.
The basis for this score is the amount of memory used by the process,
with increases (+) or decreases (\-) for factors including:
.\" See mm/oom_kill.c::badness() before Linux 2.6.36 sources
.\" See mm/oom_kill.c::oom_badness() after Linux 2.6.36
.\" commit a63d83f427fbce97a6cea0db2e64b0eb8435cd10
.RS
.IP \[bu] 3
whether the process is privileged (\-).
.\" More precisely, if it has CAP_SYS_ADMIN or (pre 2.6.36) CAP_SYS_RESOURCE
.RE
.IP
Before Linux 2.6.36
the following factors were also used in the calculation of oom_score:
.RS
.IP \[bu] 3
whether the process creates a lot of children using
.BR fork (2)
(+);
.IP \[bu]
whether the process has been running a long time,
or has used a lot of CPU time (\-);
.IP \[bu]
whether the process has a low nice value (i.e., > 0) (+); and
.IP \[bu]
whether the process is making direct hardware access (\-).
.\" More precisely, if it has CAP_SYS_RAWIO
.RE
.IP
The
.I oom_score
also reflects the adjustment specified by the
.I oom_score_adj
or
.I oom_adj
setting for the process.
.SH SEE ALSO
.BR proc (5),
.BR proc_pid_oom_score_adj (5)