|
NAMErunchoom - abate linux oom killer on a processSYNOPSISrunchoom [-hV] [-ev] [-b base ] [-k key ] [-p pid ] [-s str ] program [ args ... ]DESCRIPTIONrunchoom writes the string ``-17'' and a newline into the procfile /proc/<pid>/oom_adj, where <pid> is the process id of runchoom. It then execs program with any arguments given in args.If program does not contain a ``/'' slash character, runchoom will perform a shell-like search for the executable using the PATH variable in the current environment. OPTIONS
ENVIRONMENTThe following environmental variables are inspected if they are not otherwise specified on the command-line, and may be used to override the compiled-in defaults:CHOOM_BASE The initial path element of the target procfile.
CHOOM_KEY The final path element of the target procfile.
CHOOM_SET The string to write into the target procfile. Note that
runchoom adds a terminal newline to any string written into the target
procfile.
EXAMPLEThe runchoom utility was specifically designed to protect an instance of perpd(8) from the SIGKILLs generated by a linux kernel (from 2.6.11) when it is attempting to free up system resources from an overcommitment of memory. However, the utility is implemented in a platform-independent sense such that, by default, it has no effect (and no failure) on any system where the target procfile is not present.Its primary usage is intended within the rc.perp bootscript run by the perpboot(8) utility. The following script can normally be used verbatim on any platform: #!/bin/sh -e # rc.perp: perpd startup script for perpboot # === ### --- configure --- PERPD_OPTS="-a6" ## exec perpd: ## * options as configured above ## * runchoom(8) abate linux oom-killer ## * runlimit(8) configured in ./rlimit.conf ## * PERP_BASE defined in environment by perpboot(8) exec \ runchoom \ runlimit -F ./rlimit.conf \ perpd ${PERPD_OPTS} ${PERP_BASE} ### EOF NOTESOn a system where the oom_adj procfile is operative, the setting installed by runchoom will be inherited by all child processes. As shown in the above example, then, all the individual services running under the perpd(8) process tree will acquire the -17 setting for ``oom killer'' abatement.Presumably this is desirable. If not, the runchoom utility may be used within the individual perpetrate(5) runscripts of any selected services to reset the oom_adj parameter of a process to a default state: #!/bin/sh ... exec \ runchoom -s "0" \ myservice ... ### EOF EXIT STATUSrunchoom exits with one of the following values:
BUGSThe need for this utility.AUTHORWayne Marshall, http://b0llix.net/perp/SEE ALSOruntools_intro(8), runargs(8), runargv0(8), rundetach(8), rundeux(8), runenv(8), runfile(8), runlimit(8), runlock(8), runpause(8), runsession(8), runtool(8), runtrap(8), runuid(8), perpd(8), perpboot(8), proc(5) (on relevant platforms)
Visit the GSP FreeBSD Man Page Interface. |