Linux "prlimit" Command Line Options and Examples
get/set resource limits

Given a process ID and one or more resources, prlimit tries to retrieve and/or modify the limits. When command is given, prlimit will run this command with the given arguments. The limits parameter is composed of a soft and a hard value, separated by a colon (:), in order to modify the existing values.


Usage:

prlimit [options] [--resource[=limits] [--pid PID]


    prlimit [options] [--resource[=limits] command [argument...]




Command Line Options:

-h
Display help text and exit.
prlimit -h ...
--noheadings
Do not print a header line.
prlimit --noheadings ...
-o
Define the output columns to use. If no output arrangement is specified, then a default set is used.Use --help to get a list of all supported columns.
prlimit -o ...
-p
Specify the process id; if none is given, the running process will be used.
prlimit -p ...
--raw
Use the raw output format.
prlimit --raw ...
-V
Display version information and exit.RESOURCE OPTIONS
prlimit -V ...
-c
Maximum size of a core file.
prlimit -c ...
-d
Maximum data size.
prlimit -d ...
-e
Maximum nice priority allowed to raise.
prlimit -e ...
-f
Maximum file size.
prlimit -f ...
-i
Maximum number of pending signals.
prlimit -i ...
-l
Maximum locked-in-memory address space.
prlimit -l ...
-m
Maximum Resident Set Size (RSS).
prlimit -m ...
-n
Maximum number of open files.
prlimit -n ...
-q
Maximum number of bytes in POSIX message queues.
prlimit -q ...
-r
Maximum real-time priority.
prlimit -r ...
-s
Maximum size of the stack.
prlimit -s ...
-t
CPU time, in seconds.
prlimit -t ...
-u
Maximum number of processes.
prlimit -u ...
-v
Address space limit.
prlimit -v ...
-x
Maximum number of file locks held.
prlimit -x ...
-y
Timeout for real-time tasks.EXAMPLESprlimit --pid 13134Display limit values for all current resources.prlimit --pid 13134 --rss --nofile=1024:4095Display the limits of the RSS, and set the soft and hard limits for the number of open files to 1024and 4095, respectively.prlimit --pid 13134 --nproc=512:Modify only the soft limit for the number of processes.prlimit --pid $$ --nproc=unlimitedSet for the current process both the soft and ceiling values for the number of processes to unlimited.prlimit --cpu=10 sort -u hugefileSet both the soft and hard CPU time limit to ten seconds and run 'sort'.
prlimit -y ...