earlyoom: Stop using unsupported -k option (#4096)

automerge
This commit is contained in:
Michael Vines 2019-05-01 11:29:03 -07:00 committed by Grimes
parent cb528af4e2
commit 950d8494ba
2 changed files with 3 additions and 3 deletions

View File

@ -18,8 +18,8 @@ else
apt install --quiet --yes ./earlyoom_1.2-*_amd64.deb
cat > earlyoom <<OOM
# use the kernel OOM killer, trigger at 20% available RAM,
EARLYOOM_ARGS="-k -m 20"
# trigger at 20% available RAM,
EARLYOOM_ARGS="-m 20"
OOM
cp earlyoom /etc/default/
rm earlyoom

View File

@ -30,7 +30,7 @@ while read -r victim; do
./metrics-write-datapoint.sh "oom-killer,victim=$victim,hostname=$HOSTNAME killed=1"
done < <( \
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