File: prlimit.1

package info (click to toggle)
util-linux 2.34-0.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 46,508 kB
  • sloc: ansic: 129,594; sh: 15,590; yacc: 1,170; makefile: 397; xml: 369; python: 316; csh: 37; sed: 16; perl: 15
file content (120 lines) | stat: -rw-r--r-- 4,266 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
.\" prlimit.1 --
.\" Copyright 2011 Davidlohr Bueso <dave@gnu.org>
.\" May be distributed under the GNU General Public License

.TH PRLIMIT 1 "July 2014" "util-linux" "User Commands"
.SH NAME
prlimit \- get and set process resource limits
.SH SYNOPSIS
.BR prlimit " [options]"
.RB [ \-\-\fIresource\fR [ =\fIlimits\fR]
.RB [ \-\-pid\ \fIPID\fR]

.BR prlimit " [options]"
.RB [ \-\-\fIresource\fR [ =\fIlimits\fR]
.IR "command " [ argument ...]

.SH DESCRIPTION
Given a process ID and one or more resources, \fBprlimit\fP tries to retrieve
and/or modify the limits.

When \fIcommand\fR is given,
.B prlimit
will run this command with the given arguments.

The \fIlimits\fP parameter is composed of a soft and a hard value, separated
by a colon (:), in order to modify the existing values.  If no \fIlimits\fR are
given, \fBprlimit\fP 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.

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.

.IP "\fIsoft\fP:\fIhard\fP    Specify both limits."
.IP "\fIsoft\fP:        Specify only the soft limit."
.IP ":\fIhard\fP        Specify only the hard limit."
.IP "\fIvalue\fP        Specify both limits to the same value."

.SH GENERAL OPTIONS
.IP "\fB\-h, \-\-help\fP"
Display help text and exit.
.IP "\fB\-\-noheadings\fP"
Do not print a header line.
.IP "\fB\-o, \-\-output \fIlist\fP"
Define the output columns to use.  If no output arrangement is specified,
then a default set is used.
Use \fB\-\-help\fP to get a list of all supported columns.
.IP "\fB\-p, \-\-pid\fP"
Specify the process id; if none is given, the running process will be used.
.IP "\fB\-\-raw\fP"
Use the raw output format.
.IP "\fB\-\-verbose\fP"
Verbose mode.
.IP "\fB\-V, \-\-version\fP"
Display version information and exit.

.SH RESOURCE OPTIONS
.IP "\fB\-c, \-\-core\fP[=\fIlimits\fR]"
Maximum size of a core file.
.IP "\fB\-d, \-\-data\fP[=\fIlimits\fR]"
Maximum data size.
.IP "\fB\-e, \-\-nice\fP[=\fIlimits\fR]"
Maximum nice priority allowed to raise.
.IP "\fB\-f, \-\-fsize\fP[=\fIlimits\fR]"
Maximum file size.
.IP "\fB\-i, \-\-sigpending\fP[=\fIlimits\fR]"
Maximum number of pending signals.
.IP "\fB\-l, \-\-memlock\fP[=\fIlimits\fR]"
Maximum locked-in-memory address space.
.IP "\fB\-m, \-\-rss\fP[=\fIlimits\fR]"
Maximum Resident Set Size (RSS).
.IP "\fB\-n, \-\-nofile\fP[=\fIlimits\fR]"
Maximum number of open files.
.IP "\fB\-q, \-\-msgqueue\fP[=\fIlimits\fR]"
Maximum number of bytes in POSIX message queues.
.IP "\fB\-r, \-\-rtprio\fP[=\fIlimits\fR]"
Maximum real-time priority.
.IP "\fB\-s, \-\-stack\fP[=\fIlimits\fR]"
Maximum size of the stack.
.IP "\fB\-t, \-\-cpu\fP[=\fIlimits\fR]"
CPU time, in seconds.
.IP "\fB\-u, \-\-nproc\fP[=\fIlimits\fR]"
Maximum number of processes.
.IP "\fB\-v, \-\-as\fP[=\fIlimits\fR]"
Address space limit.
.IP "\fB\-x, \-\-locks\fP[=\fIlimits\fR]"
Maximum number of file locks held.
.IP "\fB\-y, \-\-rttime\fP[=\fIlimits\fR]"
Timeout for real-time tasks.

.SH EXAMPLES
.IP "\fBprlimit \-\-pid 13134\fP"
Display limit values for all current resources.
.IP "\fBprlimit \-\-pid 13134 \--rss --nofile=1024:4095\fP"
Display the limits of the RSS, and set the soft and hard limits for the number
of open files to 1024 and 4095, respectively.
.IP "\fBprlimit \-\-pid 13134 --nproc=512:\fP"
Modify only the soft limit for the number of processes.
.IP "\fBprlimit \-\-pid $$ --nproc=unlimited\fP"
Set for the current process both the soft and ceiling values for the number of
processes to unlimited.
.IP "\fBprlimit --cpu=10 sort -u hugefile\fP"
Set both the soft and hard CPU time limit to ten seconds and run 'sort'.

.SH "SEE ALSO"
.BR ulimit (1),
.BR prlimit (2)

.SH NOTES
The prlimit system call is supported since Linux 2.6.36, older kernels will
break this program.

.SH AUTHORS
.nf
Davidlohr Bueso <dave@gnu.org> - In memory of Dennis M. Ritchie.
.fi
.SH AVAILABILITY
The prlimit command is part of the util-linux package and is available from
https://www.kernel.org/pub/linux/utils/util-linux/.