persistent process supervision
runchoom(8)                        runtools                        runchoom(8)



NAME
       runchoom - abate linux oom killer on a process

SYNOPSIS
       runchoom [-hV] [-ev] [-b base ] [-k key ] [-p pid ] [-s str ] program [
       args ...  ]

DESCRIPTION
       runchoom 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 per-
       form  a shell-like search for the executable using the PATH variable in
       the current environment.

OPTIONS
       -b base
              Base directory.  Normally runchoom uses the compiled-in  default
              value /proc for the initial path element of the target procfile.
              The -b option may be used to specify an alternative, and  should
              be  given with a leading `/'.  This option overrides any defini-
              tion of CHOOM_BASE in the environment.

       -e     Error fail.  Normally runchoom ignores any of the following con-
              ditions and proceeds to exec program anyway: the target procfile
              does not exist; the target procfile cannot be opened or  written
              to.   By specifying the -e option, runchoom will instead fail at
              any of these conditions, and not proceed to exec program.

       -h     Help.  Print a brief usage message to stderr and exit.

       -k key Key.  Normally  runchoom  uses  the  compiled-in  default  value
              oom_adj  for  the  last  element of the target procfile.  The -k
              option may be used to specify an alternative.  This option over-
              rides any definition of CHOOM_KEY in the environment.

       -p pid Pid.   Normally runchoom uses the value returned by getpid(2) to
              determine the <pid> element of  the  target  procfile.   The  -p
              option  may  be  used  to  specify an alternative, and should be
              given as a numeric value.

       -s str Setting.  Normally runchoom uses the compiled-in default  string
              ``-17''  as  the setting to write into the target procfile.  The
              -s option may be used to specify an  alternative.   This  option
              overrides  any definition of CHOOM_SET in the environment.  Note
              that runchoom adds a terminal newline to any string written into
              the target procfile.

       -v     Verbose.   Normally runchoom runs quietly.  The -v option may be
              used to generate some messages to stderr.

       -V     Version.  Print the version number to stderr and exit.

ENVIRONMENT
       The 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  run-
              choom  adds  a  terminal  newline to any string written into the
              target procfile.

EXAMPLE
       The runchoom utility was specifically designed to protect  an  instance
       of perpd(8) from the SIGKILLs generated by a linux kernel (from 2.6.11