]>
Commit | Line | Data |
---|---|---|
295b3979 | 1 | //po4a: entry man manual |
14179682 MB |
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 | |
f42ed819 | 9 | :man manual: User Commands |
14179682 MB |
10 | :man source: util-linux {release-version} |
11 | :page-layout: base | |
12 | :command: prlimit | |
4eab78d3 | 13 | :colon: : |
14179682 MB |
14 | |
15 | == NAME | |
16 | ||
17 | prlimit - get and set process resource limits | |
18 | ||
19 | == SYNOPSIS | |
20 | ||
4d297435 | 21 | *prlimit* [options] [*--resource*=_limits_]] [*--pid* _PID_] |
14179682 | 22 | |
4d297435 | 23 | *prlimit* [options] [*--resource*=_limits_]] _command_ [_argument_...] |
14179682 MB |
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 | ||
4eab78d3 MB |
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. | |
14179682 MB |
39 | * _value_ Specify both limits to the same value. |
40 | ||
41 | == GENERAL OPTIONS | |
42 | ||
43 | *-h, --help*:: | |
4eab78d3 | 44 | Display help text and exit. |
14179682 MB |
45 | |
46 | *--noheadings*:: | |
4eab78d3 | 47 | Do not print a header line. |
14179682 MB |
48 | |
49 | *-o, --output* _list_:: | |
4eab78d3 | 50 | 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. |
14179682 MB |
51 | |
52 | *-p, --pid*:: | |
4eab78d3 | 53 | Specify the process id; if none is given, the running process will be used. |
14179682 MB |
54 | |
55 | *--raw*:: | |
4eab78d3 | 56 | Use the raw output format. |
14179682 MB |
57 | |
58 | *--verbose*:: | |
4eab78d3 | 59 | Verbose mode. |
14179682 MB |
60 | |
61 | *-V, --version*:: | |
4eab78d3 | 62 | Display version information and exit. |
14179682 MB |
63 | |
64 | == RESOURCE OPTIONS | |
65 | ||
66 | *-c, --core*[=_limits_]:: | |
4eab78d3 | 67 | Maximum size of a core file. |
14179682 MB |
68 | |
69 | *-d, --data*[=_limits_]:: | |
4eab78d3 | 70 | Maximum data size. |
14179682 MB |
71 | |
72 | *-e, --nice*[=_limits_]:: | |
4eab78d3 | 73 | Maximum nice priority allowed to raise. |
14179682 MB |
74 | |
75 | *-f, --fsize*[=_limits_]:: | |
4eab78d3 | 76 | Maximum file size. |
14179682 MB |
77 | |
78 | *-i, --sigpending*[=_limits_]:: | |
4eab78d3 | 79 | Maximum number of pending signals. |
14179682 MB |
80 | |
81 | *-l, --memlock*[=_limits_]:: | |
4eab78d3 | 82 | Maximum locked-in-memory address space. |
14179682 MB |
83 | |
84 | *-m, --rss*[=_limits_]:: | |
4eab78d3 | 85 | Maximum Resident Set Size (RSS). |
14179682 MB |
86 | |
87 | *-n, --nofile*[=_limits_]:: | |
4eab78d3 | 88 | Maximum number of open files. |
14179682 MB |
89 | |
90 | *-q, --msgqueue*[=_limits_]:: | |
4eab78d3 | 91 | Maximum number of bytes in POSIX message queues. |
14179682 MB |
92 | |
93 | *-r, --rtprio*[=_limits_]:: | |
4eab78d3 | 94 | Maximum real-time priority. |
14179682 MB |
95 | |
96 | *-s, --stack*[=_limits_]:: | |
4eab78d3 | 97 | Maximum size of the stack. |
14179682 MB |
98 | |
99 | *-t, --cpu*[=_limits_]:: | |
4eab78d3 | 100 | CPU time, in seconds. |
14179682 MB |
101 | |
102 | *-u, --nproc*[=_limits_]:: | |
4eab78d3 | 103 | Maximum number of processes. |
14179682 MB |
104 | |
105 | *-v, --as*[=_limits_]:: | |
4eab78d3 | 106 | Address space limit. |
14179682 MB |
107 | |
108 | *-x, --locks*[=_limits_]:: | |
4eab78d3 | 109 | Maximum number of file locks held. |
14179682 MB |
110 | |
111 | *-y, --rttime*[=_limits_]:: | |
4eab78d3 | 112 | Timeout for real-time tasks. |
14179682 MB |
113 | |
114 | == NOTES | |
115 | ||
116 | The *prlimit* system call is supported since Linux 2.6.36, older kernels will break this program. | |
117 | ||
118 | == EXAMPLES | |
119 | ||
120 | *prlimit --pid 13134*:: | |
4eab78d3 | 121 | Display limit values for all current resources. |
14179682 MB |
122 | |
123 | *prlimit --pid 13134 --rss --nofile=1024:4095*:: | |
4eab78d3 | 124 | Display the limits of the RSS, and set the soft and hard limits for the number of open files to 1024 and 4095, respectively. |
14179682 MB |
125 | |
126 | *prlimit --pid 13134 --nproc=512:*:: | |
4eab78d3 | 127 | Modify only the soft limit for the number of processes. |
14179682 MB |
128 | |
129 | *prlimit --pid $$ --nproc=unlimited*:: | |
4eab78d3 | 130 | Set for the current process both the soft and ceiling values for the number of processes to unlimited. |
14179682 MB |
131 | |
132 | *prlimit --cpu=10 sort -u hugefile*:: | |
4eab78d3 | 133 | Set both the soft and hard CPU time limit to ten seconds and run 'sort'. |
14179682 MB |
134 | |
135 | == AUTHORS | |
136 | ||
137 | mailto:dave@gnu.org[Davidlohr Bueso] - In memory of Dennis M. Ritchie. | |
138 | ||
139 | == SEE ALSO | |
140 | ||
141 | *ulimit*(1p), | |
142 | *prlimit*(2) | |
143 | ||
144 | include::../man-common/bugreports.adoc[] | |
145 | ||
146 | include::../man-common/footer.adoc[] | |
147 | ||
148 | ifdef::translation[] | |
149 | include::../man-common/translation.adoc[] | |
150 | endif::[] |