]> granicus.if.org Git - shadow/blob - man/limits.5.xml
remove unused fn commonio_next
[shadow] / man / limits.5.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3    Copyright (c) 1997       , Luca Berra
4    Copyright (c) 2001 - 2007, Tomasz Kłoczko
5    Copyright (c) 2005 - 2006, Yuri Kozlov
6    Copyright (c) 2005 - 2008, Nicolas François
7    All rights reserved.
8   
9    Redistribution and use in source and binary forms, with or without
10    modification, are permitted provided that the following conditions
11    are met:
12    1. Redistributions of source code must retain the above copyright
13       notice, this list of conditions and the following disclaimer.
14    2. Redistributions in binary form must reproduce the above copyright
15       notice, this list of conditions and the following disclaimer in the
16       documentation and/or other materials provided with the distribution.
17    3. The name of the copyright holders or contributors may not be used to
18       endorse or promote products derived from this software without
19       specific prior written permission.
20   
21    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
24    PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT
25    HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 -->
33 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
34   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
35 <!-- SHADOW-CONFIG-HERE -->
36 ]>
37 <refentry id='limits.5'>
38   <!-- $Id$ -->
39   <refentryinfo>
40     <author>
41       <firstname>Luca</firstname>
42       <surname>Berra</surname>
43       <contrib>Creation, 1997</contrib>
44     </author>
45     <author>
46       <firstname>Thomas</firstname>
47       <surname>Kłoczko</surname>
48       <email>kloczek@pld.org.pl</email>
49       <contrib>shadow-utils maintainer, 2000 - 2007</contrib>
50     </author>
51     <author>
52       <firstname>Nicolas</firstname>
53       <surname>François</surname>
54       <email>nicolas.francois@centraliens.net</email>
55       <contrib>shadow-utils maintainer, 2007 - now</contrib>
56     </author>
57   </refentryinfo>
58   <refmeta>
59     <refentrytitle>limits</refentrytitle>
60     <manvolnum>5</manvolnum>
61     <refmiscinfo class="sectdesc">File Formats and Conversions</refmiscinfo>
62     <refmiscinfo class="source">shadow-utils</refmiscinfo>
63     <refmiscinfo class="version">&SHADOW_UTILS_VERSION;</refmiscinfo>
64   </refmeta>
65   <refnamediv id='name'>
66     <refname>limits</refname>
67     <refpurpose>resource limits definition</refpurpose>
68   </refnamediv>
69   <!-- body begins here -->
70
71   <refsect1 id='description'>
72     <title>DESCRIPTION</title>
73     <para>
74       The <emphasis remap='I'>limits</emphasis> file 
75       (<filename>/etc/limits</filename> by default
76       or LIMITS_FILE defined <filename>config.h</filename>) describes 
77       the resource limits you wish to impose. It should be owned by 
78       root and readable by root account only.
79     </para>
80
81     <para>
82       By default no quota is imposed on 'root'. In fact, there is no way to
83       impose limits via this procedure to root-equiv accounts (accounts with
84       UID 0).
85     </para>
86
87     <para>Each line describes a limit for a user in the form:</para>
88
89     <para>
90       <emphasis remap='I'>user LIMITS_STRING</emphasis>
91     </para>
92
93     <para>or in the form:</para>
94
95     <para>
96       <emphasis remap='I'>@group LIMITS_STRING</emphasis>
97     </para>
98
99     <para>
100       The <emphasis>LIMITS_STRING</emphasis> is a string of a concatenated
101       list of resource limits. Each limit consists of a letter identifier
102       followed by a numerical limit.
103     </para>
104
105     <para>The valid identifiers are:</para>
106
107     <itemizedlist>
108       <listitem><para>A: max address space (KB)</para></listitem>
109       <listitem><para>C: max core file size (KB)</para></listitem>
110       <listitem><para>D: max data size (KB)</para></listitem>
111       <listitem><para>F: maximum file size (KB)</para></listitem>
112       <listitem><para>K: file creation mask, set by
113         <citerefentry>
114           <refentrytitle>umask</refentrytitle><manvolnum>2</manvolnum>
115         </citerefentry>.</para>
116       </listitem>
117       <listitem><para>I: max nice value (0..39 which translates to
118       20..-19)</para></listitem>
119       <listitem><para>L: max number of logins for this user</para></listitem>
120       <listitem><para>M: max locked-in-memory address space (KB)</para></listitem>
121       <listitem><para>N: max number of open files</para></listitem>
122       <listitem><para>O: max real time priority</para></listitem>
123       <listitem><para>P: process priority, set by
124         <citerefentry>
125           <refentrytitle>setpriority</refentrytitle><manvolnum>2</manvolnum>
126         </citerefentry>.</para>
127       </listitem>
128       <listitem><para>R: max resident set size (KB)</para></listitem>
129       <listitem><para>S: max stack size (KB)</para></listitem>
130       <listitem><para>T: max CPU time (MIN)</para></listitem>
131       <listitem><para>U: max number of processes</para></listitem>
132     </itemizedlist>
133
134     <para>
135       For example, <emphasis remap='I'>L2D2048N5</emphasis> is a valid
136       <emphasis>LIMITS_STRING</emphasis>. For reading convenience, the
137       following entries are equivalent:
138     </para>
139
140     <programlisting>
141       username L2D2048N5
142       username L2 D2048 N5
143     </programlisting>
144
145     <para>
146       Be aware that after <emphasis remap='I'>username</emphasis> the rest
147       of the line is considered a limit string, thus comments are not
148       allowed. An invalid limits string will be rejected (not considered) by
149       the <command>login</command> program.
150     </para>
151
152     <para>
153       The default entry is denoted by username "<emphasis>*</emphasis>". If
154       you have multiple <emphasis remap='I'>default</emphasis> entries in
155       your <emphasis>LIMITS_FILE</emphasis>, then the last one will be used
156       as the default entry.
157     </para>
158
159     <para>
160       The limits specified in the form "<replaceable>@group</replaceable>"
161       apply to the members of the specified
162       <replaceable>group</replaceable>.
163     </para>
164
165     <para>
166       If more than one line with limits for a user exist, only the first line for
167       this user will be considered.
168     </para>
169
170     <para>
171       If no lines are specified for a user, the last
172       <replaceable>@group</replaceable> line matching a group whose the
173       user is a member of will be considered, or the last line with
174       default limits if no groups contain the user.
175     </para>
176
177     <para>
178       To completely disable limits for a user, a single dash
179       "<emphasis>-</emphasis>" will do.
180     </para>
181
182     <para>
183       To disable a limit for a user, a single dash
184       "<replaceable>-</replaceable>" can be used instead of the numerical
185       value for this limit.
186     </para>
187
188     <para>
189       Also, please note that all limit settings are set PER LOGIN. They are
190       not global, nor are they permanent. Perhaps global limits will come,
191       but for now this will have to do ;)
192     </para>
193   </refsect1>
194
195   <refsect1 id='files'>
196     <title>FILES</title>
197     <variablelist>
198       <varlistentry>
199         <term><filename>/etc/limits</filename></term>
200         <listitem><para></para></listitem>
201       </varlistentry>
202     </variablelist>
203   </refsect1>
204
205   <refsect1 id='see_also'>
206     <title>SEE ALSO</title>
207     <para>
208       <citerefentry>
209         <refentrytitle>login</refentrytitle><manvolnum>1</manvolnum>
210       </citerefentry>,
211       <citerefentry>
212         <refentrytitle>setpriority</refentrytitle><manvolnum>2</manvolnum>
213       </citerefentry>,
214       <citerefentry>
215         <refentrytitle>setrlimit</refentrytitle><manvolnum>2</manvolnum>
216       </citerefentry>.
217     </para>
218   </refsect1>
219 </refentry>