Last active
September 23, 2017 06:04
-
-
Save sinewalker/db6286eb40db4345423256514194a944 to your computer and use it in GitHub Desktop.
oom-saver - cron jobs to keep essential system daemons safe from the Linux OOM killer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # keep essential system daemons safe from the OOM killer | |
| */1 * * * * root pgrep -f "/sbin/sshd" | while read PID; do echo -17 > /proc/$PID/oom_adj; done | |
| */1 * * * * root pgrep -f "/sbin/rsyslogd" | while read PID; do echo -17 > /proc/$PID/oom_adj; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment