]> granicus.if.org Git - shadow/blob - man/limits.5
[svn-upgrade] Integrating new upstream version, shadow (4.0.16)
[shadow] / man / limits.5
1 .\"     Title: limits
2 .\"    Author: 
3 .\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
4 .\"      Date: 06/06/2006
5 .\"    Manual: File Formats and Conversions
6 .\"    Source: File Formats and Conversions
7 .\"
8 .TH "LIMITS" "5" "06/06/2006" "File Formats and Conversions" "File Formats and Conversions"
9 .\" disable hyphenation
10 .nh
11 .\" disable justification (adjust text to left margin only)
12 .ad l
13 .SH "NAME"
14 limits \- resource limits definition
15 .SH "DESCRIPTION"
16 .PP
17 The
18 \fIlimits\fR
19 file (\fI/etc/limits\fR
20 by default or LIMITS_FILE defined
21 \fIconfig.h\fR) describes the resource limits you wish to impose. It should be owned by root and readable by root account only.
22 .PP
23 By default no quota is imposed on 'root'. In fact, there is no way to impose limits via this procedure to root\-equiv accounts (accounts with UID 0).
24 .PP
25 Each line describes a limit for a user in the form:
26 .PP
27
28 \fIuser LIMITS_STRING\fR
29 .PP
30 The
31 \fILIMITS_STRING\fR
32 is a string of a concatenated list of resource limits. Each limit consists of a letter identifier followed by a numerical limit.
33 .PP
34 The valid identifiers are:
35 .TP 3n
36 \(bu
37 A: max address space (KB)
38 .TP 3n
39 \(bu
40 C: max core file size (KB)
41 .TP 3n
42 \(bu
43 D: max data size (KB)
44 .TP 3n
45 \(bu
46 F: maximum filesize (KB)
47 .TP 3n
48 \(bu
49 M: max locked\-in\-memory address space (KB)
50 .TP 3n
51 \(bu
52 N: max number of open files
53 .TP 3n
54 \(bu
55 R: max resident set size (KB)
56 .TP 3n
57 \(bu
58 S: max stack size (KB)
59 .TP 3n
60 \(bu
61 T: max CPU time (MIN)
62 .TP 3n
63 \(bu
64 U: max number of processes
65 .TP 3n
66 \(bu
67 K: file creation mask, set by
68 \fBumask\fR(2).
69 .TP 3n
70 \(bu
71 L: max number of logins for this user
72 .TP 3n
73 \(bu
74 P: process priority, set by
75 \fBsetpriority\fR(2).
76 .sp
77 .RE
78 .PP
79 For example,
80 \fIL2D2048N5\fR
81 is a valid
82 \fILIMITS_STRING \fR. For reading convenience, the following entries are equivalent:
83 .sp
84 .RS 3n
85 .nf
86       username L2D2048N5
87       username L2 D2048 N5
88     
89 .fi
90 .RE
91 .PP
92 Be aware that after
93 \fIusername\fR
94 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
95 \fBlogin\fR
96 program.
97 .PP
98 The default entry is denoted by username "\fI*\fR". If you have multiple
99 \fIdefault\fR
100 entries in your
101 \fILIMITS_FILE\fR, then the last one will be used as the default entry.
102 .PP
103 To completely disable limits for a user, a single dash "\fI\-\fR" will do.
104 .PP
105 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 ;)
106 .SH "FILES"
107 .TP 3n
108 \fI/etc/limits\fR
109 .SH "SEE ALSO"
110 .PP
111
112 \fBlogin\fR(1),
113 \fBsetpriority\fR(2),
114 \fBsetrlimit\fR(2).