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