persistent process supervision
runlimit(8)                        runtools                        runlimit(8)



NAME
       runlimit - run a program with new resource limits

SYNOPSIS
       runlimit [-hV] [ opts ] program [ args ...  ]

DESCRIPTION
       runlimit  sets  up  an environment with new resource limits as given by
       opts, then runs program with any additional args.

       If program does not contain a ``/'' slash character, runlimit will per-
       form  a shell-like search for the executable using the PATH variable in
       the current environment.

OPTIONS
       For each of the following resource  limit  options  in  opts,  runlimit
       calls  setrlimit(2)  to  setup  the  corresponding soft resource limit.
       Normally the argument to each option is a positive decimal integer.  An
       argument  of `=' or `^' may be given to set the soft limit equal to the
       current hard limit.  Any resource limit specified that is greater  than
       its hard limit is truncated to the hard limit.

       -E     Environment.   Resource  parameters are scanned from the current
              environment in the form r=v, where r is  any  RLIMIT_*  resource
              name  as  defined for getrlimit(2) and described below, and v is
              the value used to set the corresponding resource limit.  The  -E
              option  may  be combined with -F or other options.  Any resource
              limit set with a command-line option, or read from a  file  with
              the -F option, takes precedence over the environment.

       -F file
              File-defined.  Resource limits are taken from file, a plain-text
              file with one or more non-empty lines of the form r=v,  where  r
              is  any  RLIMIT_*  resource name as defined for getrlimit(2) and
              described below, and v is the value used to set the  correspond-
              ing  resource  limit.   Empty lines and lines beginning with `#'
              are ignored.  Leading and trailing whitespace  is  trimmed  from
              both  r  and  v.  The -F option may be combined with -E or other
              options.  Any resource limit  set  with  a  command-line  option
              takes precedence over a file-defined limit.

       -a availmem
              Total available memory (in bytes).  Resource parameter RLIMIT_AS
              and/or RLIMIT_VMEM (used synonymously).

       -c coresize
              Maximum size of a core  file  (in  bytes).   Resource  parameter
              RLIMIT_CORE.  An argument of 0 will suppress core files.

       -d databytes
              Maximum   data   segment   (in   bytes).    Resource   parameter
              RLIMIT_DATA.

       -f filesize
              Maximum size for any  file  that  may  be  created  (in  bytes).
              Resource parameter RLIMIT_FSIZE.

       -l lockbytes
              Maximum  memory  that  may  be  locked  by  mlock(2) (in bytes).
              Resource parameter RLIMIT_MEMLOCK.

       -m bytes
              Combines the options -a -d -l and -s (in bytes).

       -o files
              Maximum number of open files (in  number  of  files).   Resource
              parameter RLIMIT_NOFILE.

       -p processes
              Maximum  number  of  processes per uid (in number of processes).
              Resource parameter RLIMIT_NPROC.

       -r rssbytes
              Maximum  resident  memory  (in   bytes).    Resource   parameter
              RLIMIT_RSS.

       -s stackb