1 //po4a: entry man manual
4 Copyright 2011 Davidlohr Bueso <dave@gnu.org>
5 May be distributed under the GNU General Public License
9 :man manual: User Commands
10 :man source: util-linux {release-version}
17 prlimit - get and set process resource limits
21 *prlimit* [options] [*--resource*[=_limits_]] [*--pid* _PID_]
23 *prlimit* [options] [*--resource*[=_limits_]] _command_ [_argument_...]
27 Given a process ID and one or more resources, *prlimit* tries to retrieve and/or modify the limits.
29 When _command_ is given, *prlimit* will run this command with the given arguments.
31 The _limits_ parameter is composed of a soft and a hard value, separated by a colon (:), in order to modify the existing values. If no _limits_ are given, *prlimit* will display the current values. If one of the values is not given, then the existing one will be used. To specify the unlimited or infinity limit (*RLIM_INFINITY*), the -1 or 'unlimited' string can be passed.
33 Because of the nature of limits, the soft limit must be lower or equal to the high limit (also called the ceiling). To see all available resource limits, refer to the *RESOURCE OPTIONS* section.
35 //TRANSLATORS: Keep {colon} untranslated.
36 * _soft_{colon}__hard__ Specify both limits.
37 * _soft_{colon} Specify only the soft limit.
38 * {colon}__hard__ Specify only the hard limit.
39 * _value_ Specify both limits to the same value.
44 Do not print a header line.
46 *-o*, *--output* _list_::
47 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.
50 Specify the process id; if none is given, the running process will be used.
53 Use the raw output format.
58 include::man-common/help-version.adoc[]
62 *-c*, *--core*[=_limits_]::
63 Maximum size of a core file.
65 *-d*, *--data*[=_limits_]::
68 *-e*, *--nice*[=_limits_]::
69 Maximum nice priority allowed to raise.
71 *-f*, *--fsize*[=_limits_]::
74 *-i*, *--sigpending*[=_limits_]::
75 Maximum number of pending signals.
77 *-l*, *--memlock*[=_limits_]::
78 Maximum locked-in-memory address space.
80 *-m*, *--rss*[=_limits_]::
81 Maximum Resident Set Size (RSS).
83 *-n*, *--nofile*[=_limits_]::
84 Maximum number of open files.
86 *-q*, *--msgqueue*[=_limits_]::
87 Maximum number of bytes in POSIX message queues.
89 *-r*, *--rtprio*[=_limits_]::
90 Maximum real-time priority.
92 *-s*, *--stack*[=_limits_]::
93 Maximum size of the stack.
95 *-t*, *--cpu*[=_limits_]::
98 *-u*, *--nproc*[=_limits_]::
99 Maximum number of processes.
101 *-v*, *--as*[=_limits_]::
104 *-x*, *--locks*[=_limits_]::
105 Maximum number of file locks held.
107 *-y*, *--rttime*[=_limits_]::
108 Timeout for real-time tasks.
112 The *prlimit*(2) system call is supported since Linux 2.6.36, older kernels will break this program.
116 *prlimit --pid 13134*::
117 Display limit values for all current resources.
119 *prlimit --pid 13134 --rss --nofile=1024:4095*::
120 Display the limits of the RSS, and set the soft and hard limits for the number of open files to 1024 and 4095, respectively.
122 *prlimit --pid 13134 --nproc=512:*::
123 Modify only the soft limit for the number of processes.
125 *prlimit --pid $$ --nproc=unlimited*::
126 Set for the current process both the soft and ceiling values for the number of processes to unlimited.
128 *prlimit --cpu=10 sort -u hugefile*::
129 Set both the soft and hard CPU time limit to ten seconds and run *sort*(1).
133 mailto:dave@gnu.org[Davidlohr Bueso] - In memory of Dennis M. Ritchie.
140 include::man-common/bugreports.adoc[]
142 include::man-common/footer.adoc[]
145 include::man-common/translation.adoc[]