Initial commit for Tizen
[profile/extras/shadow-utils.git] / man / limits.5
1 '\" t
2 .\"     Title: limits
3 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5 .\"      Date: 02/16/2011
6 .\"    Manual: File Formats and Conversions
7 .\"    Source: File Formats and Conversions
8 .\"  Language: English
9 .\"
10 .TH "LIMITS" "5" "02/16/2011" "File Formats and Conversions" "File Formats and Conversions"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 limits \- resource limits definition
32 .SH "DESCRIPTION"
33 .PP
34 The
35 \fIlimits\fR
36 file (/etc/limits
37 by default or LIMITS_FILE defined
38 config\&.h) describes the resource limits you wish to impose\&. It should be owned by root and readable by root account only\&.
39 .PP
40 By default no quota is imposed on \*(Aqroot\*(Aq\&. In fact, there is no way to impose limits via this procedure to root\-equiv accounts (accounts with UID 0)\&.
41 .PP
42 Each line describes a limit for a user in the form:
43 .PP
44
45 \fIuser LIMITS_STRING\fR
46 .PP
47 The
48 \fILIMITS_STRING\fR
49 is a string of a concatenated list of resource limits\&. Each limit consists of a letter identifier followed by a numerical limit\&.
50 .PP
51 The valid identifiers are:
52 .sp
53 .RS 4
54 .ie n \{\
55 \h'-04'\(bu\h'+03'\c
56 .\}
57 .el \{\
58 .sp -1
59 .IP \(bu 2.3
60 .\}
61 A: max address space (KB)
62 .RE
63 .sp
64 .RS 4
65 .ie n \{\
66 \h'-04'\(bu\h'+03'\c
67 .\}
68 .el \{\
69 .sp -1
70 .IP \(bu 2.3
71 .\}
72 C: max core file size (KB)
73 .RE
74 .sp
75 .RS 4
76 .ie n \{\
77 \h'-04'\(bu\h'+03'\c
78 .\}
79 .el \{\
80 .sp -1
81 .IP \(bu 2.3
82 .\}
83 D: max data size (KB)
84 .RE
85 .sp
86 .RS 4
87 .ie n \{\
88 \h'-04'\(bu\h'+03'\c
89 .\}
90 .el \{\
91 .sp -1
92 .IP \(bu 2.3
93 .\}
94 F: maximum filesize (KB)
95 .RE
96 .sp
97 .RS 4
98 .ie n \{\
99 \h'-04'\(bu\h'+03'\c
100 .\}
101 .el \{\
102 .sp -1
103 .IP \(bu 2.3
104 .\}
105 M: max locked\-in\-memory address space (KB)
106 .RE
107 .sp
108 .RS 4
109 .ie n \{\
110 \h'-04'\(bu\h'+03'\c
111 .\}
112 .el \{\
113 .sp -1
114 .IP \(bu 2.3
115 .\}
116 N: max number of open files
117 .RE
118 .sp
119 .RS 4
120 .ie n \{\
121 \h'-04'\(bu\h'+03'\c
122 .\}
123 .el \{\
124 .sp -1
125 .IP \(bu 2.3
126 .\}
127 R: max resident set size (KB)
128 .RE
129 .sp
130 .RS 4
131 .ie n \{\
132 \h'-04'\(bu\h'+03'\c
133 .\}
134 .el \{\
135 .sp -1
136 .IP \(bu 2.3
137 .\}
138 S: max stack size (KB)
139 .RE
140 .sp
141 .RS 4
142 .ie n \{\
143 \h'-04'\(bu\h'+03'\c
144 .\}
145 .el \{\
146 .sp -1
147 .IP \(bu 2.3
148 .\}
149 T: max CPU time (MIN)
150 .RE
151 .sp
152 .RS 4
153 .ie n \{\
154 \h'-04'\(bu\h'+03'\c
155 .\}
156 .el \{\
157 .sp -1
158 .IP \(bu 2.3
159 .\}
160 U: max number of processes
161 .RE
162 .sp
163 .RS 4
164 .ie n \{\
165 \h'-04'\(bu\h'+03'\c
166 .\}
167 .el \{\
168 .sp -1
169 .IP \(bu 2.3
170 .\}
171 K: file creation mask, set by
172 \fBumask\fR(2)\&.
173 .RE
174 .sp
175 .RS 4
176 .ie n \{\
177 \h'-04'\(bu\h'+03'\c
178 .\}
179 .el \{\
180 .sp -1
181 .IP \(bu 2.3
182 .\}
183 L: max number of logins for this user
184 .RE
185 .sp
186 .RS 4
187 .ie n \{\
188 \h'-04'\(bu\h'+03'\c
189 .\}
190 .el \{\
191 .sp -1
192 .IP \(bu 2.3
193 .\}
194 P: process priority, set by
195 \fBsetpriority\fR(2)\&.
196 .RE
197 .sp
198 .RS 4
199 .ie n \{\
200 \h'-04'\(bu\h'+03'\c
201 .\}
202 .el \{\
203 .sp -1
204 .IP \(bu 2.3
205 .\}
206 I: max nice value (0\&.\&.39 which translates to 20\&.\&.\-19)
207 .RE
208 .sp
209 .RS 4
210 .ie n \{\
211 \h'-04'\(bu\h'+03'\c
212 .\}
213 .el \{\
214 .sp -1
215 .IP \(bu 2.3
216 .\}
217 O: max real time priority
218 .RE
219 .PP
220 For example,
221 \fIL2D2048N5\fR
222 is a valid
223 \fILIMITS_STRING\fR\&. For reading convenience, the following entries are equivalent:
224 .sp
225 .if n \{\
226 .RS 4
227 .\}
228 .nf
229       username L2D2048N5
230       username L2 D2048 N5
231     
232 .fi
233 .if n \{\
234 .RE
235 .\}
236 .PP
237 Be aware that after
238 \fIusername\fR
239 the rest of the line is considered a limit string, thus comments are not allowed\&. A invalid limits string will be rejected (not considered) by the
240 \fBlogin\fR
241 program\&.
242 .PP
243 The default entry is denoted by username "\fI*\fR"\&. If you have multiple
244 \fIdefault\fR
245 entries in your
246 \fILIMITS_FILE\fR, then the last one will be used as the default entry\&.
247 .PP
248 To completely disable limits for a user, a single dash "\fI\-\fR" will do\&.
249 .PP
250 Also, please note that all limit settings are set PER LOGIN\&. They are not global, nor are they permanent\&. Perhaps global limits will come, but for now this will have to do ;)
251 .SH "FILES"
252 .PP
253 /etc/limits
254 .RS 4
255 .RE
256 .SH "SEE ALSO"
257 .PP
258
259 \fBlogin\fR(1),
260 \fBsetpriority\fR(2),
261 \fBsetrlimit\fR(2)\&.