]>
Commit | Line | Data |
---|---|---|
6bac2825 DB |
1 | .\" prlimit.1 -- |
2 | .\" Copyright 2011 Davidlohr Bueso <dave@gnu.org> | |
3 | .\" May be distributed under the GNU General Public License | |
4 | ||
1f94a78c | 5 | .TH PRLIMIT 1 "July 2014" "util-linux" "User Commands" |
6bac2825 | 6 | .SH NAME |
1b19ea31 | 7 | prlimit \- get and set process resource limits |
6bac2825 | 8 | .SH SYNOPSIS |
1f94a78c BS |
9 | .BR prlimit " [options]" |
10 | .RB [ \-\-\fIresource\fR [ =\fIlimits\fR] | |
11 | .RB [ \-\-pid\ \fIPID\fR] | |
53e1f461 | 12 | |
1f94a78c BS |
13 | .BR prlimit " [options]" |
14 | .RB [ \-\-\fIresource\fR [ =\fIlimits\fR] | |
15 | .IR "command " [ argument ...] | |
6bac2825 DB |
16 | |
17 | .SH DESCRIPTION | |
9184323a | 18 | Given a process ID and one or more resources, \fBprlimit\fP tries to retrieve |
6bac2825 DB |
19 | and/or modify the limits. |
20 | ||
53e1f461 BV |
21 | When \fIcommand\fR is given, |
22 | .B prlimit | |
23 | will run this command with the given arguments. | |
24 | ||
1f94a78c BS |
25 | The \fIlimits\fP parameter is composed of a soft and a hard value, separated |
26 | by a colon (:), in order to modify the existing values. If no \fIlimits\fR are | |
27 | given, \fBprlimit\fP will display the current values. If one of the values | |
28 | is not given, then the existing one will be used. To specify the unlimited or | |
1c4c6024 | 29 | infinity limit (RLIM_INFINITY), the \-1 or 'unlimited' string can be passed. |
6bac2825 | 30 | |
1f94a78c BS |
31 | Because of the nature of limits, the soft limit must be lower or equal to the |
32 | high limit (also called the ceiling). To see all available resource limits, | |
33 | refer to the RESOURCE OPTIONS section. | |
6bac2825 | 34 | |
1f94a78c BS |
35 | .IP "\fIsoft\fP:\fIhard\fP Specify both limits." |
36 | .IP "\fIsoft\fP: Specify only the soft limit." | |
37 | .IP ":\fIhard\fP Specify only the hard limit." | |
c6f637e6 | 38 | .IP "\fIvalue\fP Specify both limits to the same value." |
6bac2825 DB |
39 | |
40 | .SH GENERAL OPTIONS | |
1f94a78c BS |
41 | .IP "\fB\-h, \-\-help\fP" |
42 | Display help text and exit. | |
43 | .IP "\fB\-\-noheadings\fP" | |
44 | Do not print a header line. | |
6bac2825 | 45 | .IP "\fB\-o, \-\-output \fIlist\fP" |
1f94a78c BS |
46 | Define the output columns to use. If no output arrangement is specified, |
47 | then a default set is used. | |
48 | Use \fB\-\-help\fP to get a list of all supported columns. | |
49 | .IP "\fB\-p, \-\-pid\fP" | |
50 | Specify the process id; if none is given, the running process will be used. | |
d254c1db KZ |
51 | .IP "\fB\-\-raw\fP" |
52 | Use the raw output format. | |
1f94a78c BS |
53 | .IP "\fB\-\-verbose\fP" |
54 | Verbose mode. | |
55 | .IP "\fB\-V, \-\-version\fP" | |
56 | Display version information and exit. | |
6bac2825 DB |
57 | |
58 | .SH RESOURCE OPTIONS | |
1f94a78c | 59 | .IP "\fB\-c, \-\-core\fP[=\fIlimits\fR]" |
6bac2825 | 60 | Maximum size of a core file. |
1f94a78c | 61 | .IP "\fB\-d, \-\-data\fP[=\fIlimits\fR]" |
6bac2825 | 62 | Maximum data size. |
1f94a78c | 63 | .IP "\fB\-e, \-\-nice\fP[=\fIlimits\fR]" |
6bac2825 | 64 | Maximum nice priority allowed to raise. |
1f94a78c | 65 | .IP "\fB\-f, \-\-fsize\fP[=\fIlimits\fR]" |
6bac2825 | 66 | Maximum file size. |
1f94a78c | 67 | .IP "\fB\-i, \-\-sigpending\fP[=\fIlimits\fR]" |
1023db50 | 68 | Maximum number of pending signals. |
1f94a78c | 69 | .IP "\fB\-l, \-\-memlock\fP[=\fIlimits\fR]" |
6bac2825 | 70 | Maximum locked-in-memory address space. |
1f94a78c | 71 | .IP "\fB\-m, \-\-rss\fP[=\fIlimits\fR]" |
6bac2825 | 72 | Maximum Resident Set Size (RSS). |
1f94a78c | 73 | .IP "\fB\-n, \-\-nofile\fP[=\fIlimits\fR]" |
1023db50 | 74 | Maximum number of open files. |
1f94a78c | 75 | .IP "\fB\-q, \-\-msgqueue\fP[=\fIlimits\fR]" |
1023db50 | 76 | Maximum number of bytes in POSIX message queues. |
1f94a78c | 77 | .IP "\fB\-r, \-\-rtprio\fP[=\fIlimits\fR]" |
6bac2825 | 78 | Maximum real-time priority. |
1f94a78c | 79 | .IP "\fB\-s, \-\-stack\fP[=\fIlimits\fR]" |
6bac2825 | 80 | Maximum size of the stack. |
1f94a78c | 81 | .IP "\fB\-t, \-\-cpu\fP[=\fIlimits\fR]" |
6bac2825 | 82 | CPU time, in seconds. |
1f94a78c | 83 | .IP "\fB\-u, \-\-nproc\fP[=\fIlimits\fR]" |
1023db50 | 84 | Maximum number of processes. |
1f94a78c | 85 | .IP "\fB\-v, \-\-as\fP[=\fIlimits\fR]" |
6bac2825 | 86 | Address space limit. |
1f94a78c | 87 | .IP "\fB\-x, \-\-locks\fP[=\fIlimits\fR]" |
1023db50 | 88 | Maximum number of file locks held. |
1f94a78c | 89 | .IP "\fB\-y, \-\-rttime\fP[=\fIlimits\fR]" |
6bac2825 DB |
90 | Timeout for real-time tasks. |
91 | ||
67e63c12 MK |
92 | .SH NOTES |
93 | The prlimit system call is supported since Linux 2.6.36, older kernels will | |
94 | break this program. | |
95 | ||
bc281b09 | 96 | .SH EXAMPLE |
6bac2825 DB |
97 | .IP "\fBprlimit \-\-pid 13134\fP" |
98 | Display limit values for all current resources. | |
1c4c6024 | 99 | .IP "\fBprlimit \-\-pid 13134 \-\-rss \-\-nofile=1024:4095\fP" |
1f94a78c | 100 | Display the limits of the RSS, and set the soft and hard limits for the number |
6bac2825 | 101 | of open files to 1024 and 4095, respectively. |
1c4c6024 | 102 | .IP "\fBprlimit \-\-pid 13134 \-\-nproc=512:\fP" |
1023db50 | 103 | Modify only the soft limit for the number of processes. |
1c4c6024 | 104 | .IP "\fBprlimit \-\-pid $$ \-\-nproc=unlimited\fP" |
1f94a78c | 105 | Set for the current process both the soft and ceiling values for the number of |
a55f60a1 | 106 | processes to unlimited. |
1c4c6024 | 107 | .IP "\fBprlimit \-\-cpu=10 sort \-u hugefile\fP" |
c6f637e6 | 108 | Set both the soft and hard CPU time limit to ten seconds and run 'sort'. |
6bac2825 | 109 | |
6bac2825 DB |
110 | .SH AUTHORS |
111 | .nf | |
112 | Davidlohr Bueso <dave@gnu.org> - In memory of Dennis M. Ritchie. | |
113 | .fi | |
ade04bb8 MK |
114 | .SH SEE ALSO |
115 | .BR ulimit (1p), | |
116 | .BR prlimit (2) | |
117 | ||
6bac2825 DB |
118 | .SH AVAILABILITY |
119 | The prlimit command is part of the util-linux package and is available from | |
d673b74e | 120 | https://www.kernel.org/pub/linux/utils/util-linux/. |