Skip to content

Commit

Permalink
earlyoom now works on reboots (solana-labs#6841)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines authored Nov 8, 2019
1 parent 162b1bd commit 151adab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions net/scripts/install-earlyoom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ set -ex
[[ $(uname) = Linux ]] || exit 1
[[ $USER = root ]] || exit 1

# 64 - enable signalling of processes (term, kill, oom-kill)
# TODO: This setting will not persist across reboots
sysctl -w kernel.sysrq=$(( $(cat /proc/sys/kernel/sysrq) | 64 ))
# earlyoom specifically needs "SysRq 64 - enable signalling of processes (term, kill, oom-kill)"
# but for simplicity just enable all SysRq
sysctl -w kernel.sysrq=1
echo kernel.sysrq=1 >> /etc/sysctl.conf

if command -v earlyoom; then
systemctl status earlyoom
Expand Down

0 comments on commit 151adab

Please sign in to comment.