]> git.ipfire.org Git - thirdparty/util-linux.git/blob - sys-utils/prlimit.1.adoc
unshare: Support multiple ID ranges for user and group maps
[thirdparty/util-linux.git] / sys-utils / prlimit.1.adoc
1 //po4a: entry man manual
2 ////
3 prlimit.1 --
4 Copyright 2011 Davidlohr Bueso <dave@gnu.org>
5 May be distributed under the GNU General Public License
6 ////
7 = prlimit(1)
8 :doctype: manpage
9 :man manual: User Commands
10 :man source: util-linux {release-version}
11 :page-layout: base
12 :command: prlimit
13 :colon: :
14
15 == NAME
16
17 prlimit - get and set process resource limits
18
19 == SYNOPSIS
20
21 *prlimit* [options] [*--resource*[=_limits_]] [*--pid* _PID_]
22
23 *prlimit* [options] [*--resource*[=_limits_]] _command_ [_argument_...]
24
25 == DESCRIPTION
26
27 Given a process ID and one or more resources, *prlimit* tries to retrieve and/or modify the limits.
28
29 When _command_ is given, *prlimit* will run this command with the given arguments.
30
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.
32
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.
34
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.
40
41 == GENERAL OPTIONS
42
43 *--noheadings*::
44 Do not print a header line.
45
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.
48
49 *-p*, *--pid*::
50 Specify the process id; if none is given, the running process will be used.
51
52 *--raw*::
53 Use the raw output format.
54
55 *--verbose*::
56 Verbose mode.
57
58 include::man-common/help-version.adoc[]
59
60 == RESOURCE OPTIONS
61
62 *-c*, *--core*[=_limits_]::
63 Maximum size of a core file.
64
65 *-d*, *--data*[=_limits_]::
66 Maximum data size.
67
68 *-e*, *--nice*[=_limits_]::
69 Maximum nice priority allowed to raise.
70
71 *-f*, *--fsize*[=_limits_]::
72 Maximum file size.
73
74 *-i*, *--sigpending*[=_limits_]::
75 Maximum number of pending signals.
76
77 *-l*, *--memlock*[=_limits_]::
78 Maximum locked-in-memory address space.
79
80 *-m*, *--rss*[=_limits_]::
81 Maximum Resident Set Size (RSS).
82
83 *-n*, *--nofile*[=_limits_]::
84 Maximum number of open files.
85
86 *-q*, *--msgqueue*[=_limits_]::
87 Maximum number of bytes in POSIX message queues.
88
89 *-r*, *--rtprio*[=_limits_]::
90 Maximum real-time priority.
91
92 *-s*, *--stack*[=_limits_]::
93 Maximum size of the stack.
94
95 *-t*, *--cpu*[=_limits_]::
96 CPU time, in seconds.
97
98 *-u*, *--nproc*[=_limits_]::
99 Maximum number of processes.
100
101 *-v*, *--as*[=_limits_]::
102 Address space limit.
103
104 *-x*, *--locks*[=_limits_]::
105 Maximum number of file locks held.
106
107 *-y*, *--rttime*[=_limits_]::
108 Timeout for real-time tasks.
109
110 == NOTES
111
112 The *prlimit*(2) system call is supported since Linux 2.6.36, older kernels will break this program.
113
114 == EXAMPLES
115
116 *prlimit --pid 13134*::
117 Display limit values for all current resources.
118
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.
121
122 *prlimit --pid 13134 --nproc=512:*::
123 Modify only the soft limit for the number of processes.
124
125 *prlimit --pid $$ --nproc=unlimited*::
126 Set for the current process both the soft and ceiling values for the number of processes to unlimited.
127
128 *prlimit --cpu=10 sort -u hugefile*::
129 Set both the soft and hard CPU time limit to ten seconds and run *sort*(1).
130
131 == AUTHORS
132
133 mailto:dave@gnu.org[Davidlohr Bueso] - In memory of Dennis M. Ritchie.
134
135 == SEE ALSO
136
137 *ulimit*(1p),
138 *prlimit*(2)
139
140 include::man-common/bugreports.adoc[]
141
142 include::man-common/footer.adoc[]
143
144 ifdef::translation[]
145 include::man-common/translation.adoc[]
146 endif::[]