Configure OOMKiller to not kill gluster process #7

Open
bryankaraffa opened this Issue May 18, 2016 · 0 comments

Comments

Projects
None yet
1 participant
#!/bin/bash -ex

# Create Script File
cat > "/etc/cron.hourly/gluster_oomkiller_prevention" <<EOF
#!/bin/bash

#stopping oom_killer
for pid in $(pgrep glusterfs); do
if [ -e /proc/$pid/oom_adj ]; then
  echo -17 > /proc/$pid/oom_adj
fi

if [ -e /proc/$pid/oom_score_adj ]; then
  echo -1000 > /proc/$pid/oom_score_adj
fi
done
EOF

# Make Executable
chmod +x /etc/cron.hourly/gluster_oomkiller_prevention

@bryankaraffa bryankaraffa self-assigned this May 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment