s6
Software
skarnet.org

# The s6-softlimit program

s6-softlimit changes its process limits, then executes into another program.

## Interface

         s6-softlimit [ -H | -h ] [ -a allmem ] [ -c core ] [ -d data ] [ -f fsize ] [ -l lock ] [ -m mem ] [ -o ofiles ] [ -P prio ] [ -p proc ] [ -r res ] [ -s stack ] [ -t cpusecs ] prog...

- s6-softlimit parses its options and sets process (soft) resource limits accordingly.
- A value of '=' for any option means "set that limit to the hard limit".
- Depending on your operating system, an option may do nothing.
- When s6-softlimit has modified all the limits successfully, it executes into prog....

## Options

### Hard limit options

- `-H` : set the hard limit (as well as the soft limit). This is only usable by root if you're raising the limit, and should generally not be used, except once at boot time. The "hard limit" should be a system-wide setting that is never touched after being set once.
- `-h` : set the hard limit, without touching the soft limit. If you're lowering the hard limit to a value that's lower than the current soft limit, the soft limit will be lowered to the new value of the hard limit.

### Resource selection options

- `-a allmem` : limit the total available memory to allmem bytes.
- `-c core` : limit the core file size to core bytes.
- `-d data` : limit the available heap memory to data bytes.
- `-f fsize` : limit the file size to fsize bytes.
- `-l lock` : limit the available locked memory to lock bytes.
- `-m mem` : limit all types of memory to mem bytes.
- `-o ofiles` : limit the number of open fds to ofiles.
- `-P prio` : limit the real-time priority to prio.
- `-p proc` : limit the number of processes to proc (per user).
- `-r res` : limit the available physical memory to res bytes.
- `-s stack` : limit the available stack memory to stack bytes.
- `-t cpusecs` : limit the available CPU time to cpusecs seconds.