File: out

package info (click to toggle)
earlyoom 1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 204 kB
  • sloc: ansic: 718; makefile: 82; sh: 71
file content (122 lines) | stat: -rw-r--r-- 3,731 bytes parent folder | download
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
.\" Automatically generated by Pandoc 2.0.6
.\"
.TH "earlyoom" "1" "" "" ""
.hy
.SH NAME
.PP
earlyoom \- Early OOM Daemon
.SH SYNOPSIS
.PP
\f[B]earlyoom\f[] [\f[B]OPTION\f[]]\&...
.SH DESCRIPTION
.PP
The oom\-killer generally has a bad reputation among Linux users.
One may have to sit in front of an unre‐ sponsive system, listening to
the grinding disk for minutes, and press the reset button and get back
to what was doing quickly after running out of patience.
.PP
\f[B]earlyoom\f[] checks the amount of available memory and free swap 10
times a second.
If both are below 10%, it will kill the largest process.
The percentage value is configurable via command line arguments.
.SH OPTIONS
.SS \-m PERCENT
.PP
set available memory minimum to PERCENT of total (default 10 %)
.SS \-s PERCENT
.PP
set free swap minimum to PERCENT of total (default 10 %)
.SS \-M SIZE
.PP
set available memory minimum to SIZE KiB
.IP
.nf
\f[C]
\ \ \ \-S\ SIZE
\ \ \ \ \ \ \ \ \ \ set\ free\ swap\ minimum\ to\ SIZE\ KiB

\ \ \ \-k\ \ \ \ \ use\ kernel\ oom\ killer\ instead\ of\ own\ user\-space\ implementation

\ \ \ \-i\ \ \ \ \ user\-space\ oom\ killer\ should\ ignore\ positive\ oom_score_adj\ values

\ \ \ \-d\ \ \ \ \ enable\ debugging\ messages

\ \ \ \-v\ \ \ \ \ print\ version\ information\ and\ exit

\ \ \ \-r\ INTERVAL
\ \ \ \ \ \ \ \ \ \ memory\ report\ interval\ in\ seconds\ (default\ 1),\ set\ to\ 0\ to\ disable\ completely

\ \ \ \-p\ \ \ \ \ set\ niceness\ of\ earlyoom\ to\ \-20\ and\ oom_score_adj\ to\ \-1000

\ \ \ \-\-prefer\ REGEX
\ \ \ \ \ \ \ \ \ \ prefer\ killing\ processes\ matching\ REGEX\ (adds\ 300\ to\ oom_score)

\ \ \ \-\-avoid\ REGEX
\ \ \ \ \ \ \ \ \ \ avoid\ killing\ processes\ matching\ REGEX\ (subtracts\ 300\ from\ oom_score)

\ \ \ \-h,\ \-\-help
\ \ \ \ \ \ \ \ \ \ this\ help\ text
\f[]
.fi
.PP
EXIT STATUS 0 Successful program execution.
.IP
.nf
\f[C]
\ \ \ 1\ \ \ \ \ \ Usage\ printed\ (using\ \-h).

\ \ \ 2\ \ \ \ \ \ Switch\ conflict.

\ \ \ 4\ \ \ \ \ \ Could\ not\ cd\ to\ /proc

\ \ \ 5\ \ \ \ \ \ Could\ not\ open\ proc

\ \ \ 7\ \ \ \ \ \ Could\ not\ open\ /proc/sysrq\-trigger

\ \ \ 13\ \ \ \ \ Unknown\ options.

\ \ \ 14\ \ \ \ \ Wrong\ parameters\ for\ other\ options.

\ \ \ 15\ \ \ \ \ Wrong\ parameters\ for\ memory\ threshold.

\ \ \ 16\ \ \ \ \ Wrong\ parameters\ for\ swap\ threshold.

\ \ \ 102\ \ \ \ Could\ not\ open\ /proc/meminfo

\ \ \ 103\ \ \ \ Could\ not\ read\ /proc/meminfo

\ \ \ 104\ \ \ \ Could\ not\ find\ a\ specific\ entry\ in\ /proc/meminfo

\ \ \ 105\ \ \ \ Could\ not\ convert\ number\ when\ parse\ the\ contents\ of\ /proc/meminfo
\f[]
.fi
.PP
Why not trigger the kernel oom killer?
Earlyoom does not use echo f > /proc/sysrq\-trigger because the Chrome
people made their browser always be the first (innocent!) victim by
setting oom_score_adj very high.
Instead, earlyoom finds out itself by reading through /proc/\f[I]/status
(actually /proc/\f[]/statm , which contains the same information but is
easier to parse programmatically).
.IP
.nf
\f[C]
\ \ \ Additionally,\ in\ recent\ kernels\ (tested\ on\ 4.0.5),\ triggering\ the\ kernel\ oom\ killer\ manually\ may\ not\ work\ at
\ \ \ all.\ That\ is,\ it\ may\ only\ free\ some\ graphics\ memory\ (that\ will\ be\ allocated\ immediately\ again)\ and\ not\ actu‐
\ \ \ ally\ kill\ any\ process.
\f[]
.fi
.PP
MEMORY USAGE About 2 MiB VmRSS.
All memory is locked using mlockall() to make sure earlyoom does not
slow down in low memory situations.
.PP
AUTHOR The author of earlyoom is Jakob Unterwurzacher
⟨jakobunt\@gmail.com⟩.
.IP
.nf
\f[C]
\ \ \ This\ manual\ page\ was\ written\ by\ Yangfl\ ⟨mmyangfl\@gmail.com⟩,\ for\ the\ Debian\ project\ (and\ may\ be\ used\ by\ oth‐
\ \ \ ers).
\f[]
.fi