1
2PRLIMIT(1)                       User Commands                      PRLIMIT(1)
3
4
5

NAME

7       prlimit - get and set process resource limits
8

SYNOPSIS

10       prlimit [options] [--resource[=limits] [--pid PID]
11
12       prlimit [options] [--resource[=limits] command [argument...]
13
14

DESCRIPTION

16       Given a process ID and one or more resources, prlimit tries to retrieve
17       and/or modify the limits.
18
19       When command is given, prlimit will run this  command  with  the  given
20       arguments.
21
22       The  limits parameter is composed of a soft and a hard value, separated
23       by a colon (:), in order to modify the existing values.  If  no  limits
24       are given, prlimit will display the current values.  If one of the val‐
25       ues is not given, then the existing one will be used.  To  specify  the
26       unlimited  or  infinity  limit  (RLIM_INFINITY),  the -1 or 'unlimited'
27       string can be passed.
28
29       Because of the nature of limits, the soft limit must be lower or  equal
30       to  the  high  limit  (also  called the ceiling).  To see all available
31       resource limits, refer to the RESOURCE OPTIONS section.
32
33
34       soft:hard    Specify both limits.
35
36       soft:        Specify only the soft limit.
37
38       :hard        Specify only the hard limit.
39
40       value        Specify both limits to the same value.
41
42

GENERAL OPTIONS

44       -h, --help
45              Display help text and exit.
46
47       --noheadings
48              Do not print a header line.
49
50       -o, --output list
51              Define the output columns to use.  If no output  arrangement  is
52              specified, then a default set is used.  Use --help to get a list
53              of all supported columns.
54
55       -p, --pid
56              Specify the process id; if none is given,  the  running  process
57              will be used.
58
59       --raw  Use the raw output format.
60
61       --verbose
62              Verbose mode.
63
64       -V, --version
65              Display version information and exit.
66
67

RESOURCE OPTIONS

69       -c, --core[=limits]
70              Maximum size of a core file.
71
72       -d, --data[=limits]
73              Maximum data size.
74
75       -e, --nice[=limits]
76              Maximum nice priority allowed to raise.
77
78       -f, --fsize[=limits]
79              Maximum file size.
80
81       -i, --sigpending[=limits]
82              Maximum number of pending signals.
83
84       -l, --memlock[=limits]
85              Maximum locked-in-memory address space.
86
87       -m, --rss[=limits]
88              Maximum Resident Set Size (RSS).
89
90       -n, --nofile[=limits]
91              Maximum number of open files.
92
93       -q, --msgqueue[=limits]
94              Maximum number of bytes in POSIX message queues.
95
96       -r, --rtprio[=limits]
97              Maximum real-time priority.
98
99       -s, --stack[=limits]
100              Maximum size of the stack.
101
102       -t, --cpu[=limits]
103              CPU time, in seconds.
104
105       -u, --nproc[=limits]
106              Maximum number of processes.
107
108       -v, --as[=limits]
109              Address space limit.
110
111       -x, --locks[=limits]
112              Maximum number of file locks held.
113
114       -y, --rttime[=limits]
115              Timeout for real-time tasks.
116
117

EXAMPLES

119       prlimit --pid 13134
120              Display limit values for all current resources.
121
122       prlimit --pid 13134 --rss --nofile=1024:4095
123              Display  the limits of the RSS, and set the soft and hard limits
124              for the number of open files to 1024 and 4095, respectively.
125
126       prlimit --pid 13134 --nproc=512:
127              Modify only the soft limit for the number of processes.
128
129       prlimit --pid $$ --nproc=unlimited
130              Set for the current process both the soft and ceiling values for
131              the number of processes to unlimited.
132
133       prlimit --cpu=10 sort -u hugefile
134              Set both the soft and hard CPU time limit to ten seconds and run
135              'sort'.
136
137

SEE ALSO

139       ulimit(1p), prlimit(2)
140
141

NOTES

143       The prlimit system call is supported since Linux 2.6.36, older  kernels
144       will break this program.
145
146

AUTHORS

148       Davidlohr Bueso <dave@gnu.org> - In memory of Dennis M. Ritchie.
149

AVAILABILITY

151       The  prlimit command is part of the util-linux package and is available
152       from https://www.kernel.org/pub/linux/utils/util-linux/.
153
154
155
156util-linux                         July 2014                        PRLIMIT(1)
Impressum