parent
cb528af4e2
commit
950d8494ba
|
@ -18,8 +18,8 @@ else
|
||||||
apt install --quiet --yes ./earlyoom_1.2-*_amd64.deb
|
apt install --quiet --yes ./earlyoom_1.2-*_amd64.deb
|
||||||
|
|
||||||
cat > earlyoom <<OOM
|
cat > earlyoom <<OOM
|
||||||
# use the kernel OOM killer, trigger at 20% available RAM,
|
# trigger at 20% available RAM,
|
||||||
EARLYOOM_ARGS="-k -m 20"
|
EARLYOOM_ARGS="-m 20"
|
||||||
OOM
|
OOM
|
||||||
cp earlyoom /etc/default/
|
cp earlyoom /etc/default/
|
||||||
rm earlyoom
|
rm earlyoom
|
||||||
|
|
|
@ -30,7 +30,7 @@ while read -r victim; do
|
||||||
./metrics-write-datapoint.sh "oom-killer,victim=$victim,hostname=$HOSTNAME killed=1"
|
./metrics-write-datapoint.sh "oom-killer,victim=$victim,hostname=$HOSTNAME killed=1"
|
||||||
done < <( \
|
done < <( \
|
||||||
tail --follow=name --retry -n0 $syslog \
|
tail --follow=name --retry -n0 $syslog \
|
||||||
| sed --unbuffered -n 's/^.* Out of memory: Kill process [1-9][0-9]* (\([^)]*\)) .*/\1/p' \
|
| sed --unbuffered -n "s/^.* earlyoom\[[0-9]*\]: Killing process .\(.*\). with signal .*/\1/p" \
|
||||||
)
|
)
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue