slackbuilds/system/earlyoom
Charadon b6ed48582e
system/earlyoom: Fixed rc script outputting cat and ps errors.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2022-10-22 02:51:15 +07:00
..
README
doinst.sh
earlyoom.1
earlyoom.SlackBuild
earlyoom.info
rc.earlyoom
slack-desc

README

earlyoom checks the amount of available memory and free swap up to 10 
times a second (less often if there is a lot of free memory). By 
default if both are below 10%, it will kill the largest process 
(highest oom_score). The percentage value is configurable via command 
line arguments.

To enable it, put this line in your rc.local after running chmod +x on
/etc/rc.d/rc.earlyoom:

if [ -x /etc/rc.d/rc.earlyoom ];
then
    /etc/rc.d/rc.earlyoom start
fi

and to have it turnoff at shutdown, simply put this in your 
rc.local_shutdown:

if [ -x /etc/rc.d/rc.earlyoom ];
then
    /etc/rc.d/rc.earlyoom stop
fi

A log file for it is kept at /var/log/earlyoom.log
And earlyoom can be configured by modifying /etc/default/earlyoom