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