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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
'\" te
.\" Copyright (c) 1998 by Sun Microsystems, Inc. All rights reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH PLIMIT 1 "Jun 8, 1998"
.SH NAME
plimit \- get or set the resource limits of running processes
.SH SYNOPSIS
.LP
.nf
\fBplimit\fR [\fB-km\fR] \fIpid\fR...
.fi
.LP
.nf
\fBplimit\fR {\fB-cdfnstv\fR} \fIsoft\fR,\fIhard\fR... pid...
.fi
.SH DESCRIPTION
.sp
.LP
If one or more of the \fBcdfnstv\fR options is specified, \fBplimit\fR sets the
soft (current) limit and/or the hard (maximum) limit of the indicated
resource(s) in the processes identified by the process-ID list, \fIpid\fR.
Otherwise \fBplimit\fR reports the resource limits of the processes identified
by the process-ID list, \fIpid\fR.
.sp
.LP
Only the owner of a process or the super-user is permitted either to get or to
set the resource limits of a process. Only the super-user can increase the hard
limit.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-k\fR\fR
.ad
.RS 6n
On output, show file sizes in kilobytes (1024 bytes) rather than in 512-byte
blocks.
.RE
.sp
.ne 2
.na
\fB\fB-m\fR\fR
.ad
.RS 6n
On output, show file and memory sizes in megabytes (1024*1024 bytes).
.RE
.sp
.LP
The remainder of the options are used to change specified resource limits. They
each accept an argument of the form:
.sp
.LP
\fIsoft\fR,\fIhard\fR
.sp
.LP
where \fIsoft\fR specifies the soft (current) limit and \fIhard\fR specifies
the hard (maximum) limit. If the hard limit is not specified, the comma may be
omitted. If the soft limit is an empty string, only the hard limit is set. Each
limit is either the literal string \fBunlimited\fR, or a number, with an
optional scaling factor, as follows:
.sp
.ne 2
.na
\fB\fIn\fR\fBk\fR\fR
.ad
.RS 9n
\fIn\fR kilobytes
.RE
.sp
.ne 2
.na
\fB\fIn\fR\fBm\fR\fR
.ad
.RS 9n
\fIn\fR megabytes (minutes for CPU time)
.RE
.sp
.ne 2
.na
\fB\fIn\fR\fBh\fR\fR
.ad
.RS 9n
\fIn\fR hours (for CPU time only)
.RE
.sp
.ne 2
.na
\fB\fImm\fR\fB:\fR\fIss\fR\fR
.ad
.RS 9n
minutes and seconds (for CPU time only)
.RE
.sp
.LP
The soft limit cannot exceed the hard limit.
.sp
.ne 2
.na
\fB\fB-c\fR\fI soft,hard\fR\fR
.ad
.RS 16n
Set core file size limits (default unit is 512-byte blocks).
.RE
.sp
.ne 2
.na
\fB\fB-d\fR\fI soft,hard\fR\fR
.ad
.RS 16n
Set data segment (heap) size limits (default unit is kilobytes).
.RE
.sp
.ne 2
.na
\fB\fB-f\fR\fI soft,hard\fR\fR
.ad
.RS 16n
Set file size limits (default unit is 512-byte blocks).
.RE
.sp
.ne 2
.na
\fB\fB-n\fR\fI soft,hard\fR\fR
.ad
.RS 16n
Set file descriptor limits (no default unit).
.RE
.sp
.ne 2
.na
\fB\fB-s\fR\fI soft,hard\fR\fR
.ad
.RS 16n
Set stack segment size limits (default unit is kilobytes).
.RE
.sp
.ne 2
.na
\fB\fB-t\fR\fI soft,hard\fR\fR
.ad
.RS 16n
Set CPU time limits (default unit is seconds).
.RE
.sp
.ne 2
.na
\fB\fB-v\fR\fI soft,hard\fR\fR
.ad
.RS 16n
Set virtual memory size limits (default unit is kilobytes).
.RE
.SH OPERANDS
.sp
.LP
The following operands are supported.
.sp
.ne 2
.na
\fBpid\fR
.ad
.RS 7n
Process ID list.
.RE
.SH EXIT STATUS
.sp
.LP
\fBplimit\fR returns the exit value zero on success, non-zero on failure (such
as no such process, permission denied, or invalid option).
.SH FILES
.sp
.ne 2
.na
\fB\fB/proc/\fR\fIpid\fR\fB/*\fR\fR
.ad
.RS 15n
process information and control files
.RE
.SH SEE ALSO
.sp
.LP
\fBulimit\fR(1), \fBproc\fR(1), \fBgetrlimit\fR(2), \fBsetrlimit\fR(2),
\fBproc\fR(5), \fBattributes\fR(7),
|