1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 2001 - 2007, Tomasz Kłoczko
4 Copyright (c) 2005 - 2006, Yuri Kozlov
5 Copyright (c) 2005 - 2008, Nicolas François
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions
11 1. Redistributions of source code must retain the above copyright
12 notice, this list of conditions and the following disclaimer.
13 2. Redistributions in binary form must reproduce the above copyright
14 notice, this list of conditions and the following disclaimer in the
15 documentation and/or other materials provided with the distribution.
16 3. The name of the copyright holders or contributors may not be used to
17 endorse or promote products derived from this software without
18 specific prior written permission.
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 <refentry id='limits.5'>
35 <refentrytitle>limits</refentrytitle>
36 <manvolnum>5</manvolnum>
37 <refmiscinfo class="sectdesc">File Formats and Conversions</refmiscinfo>
39 <refnamediv id='name'>
40 <refname>limits</refname>
41 <refpurpose>resource limits definition</refpurpose>
43 <!-- body begins here -->
45 <refsect1 id='description'>
46 <title>DESCRIPTION</title>
48 The <emphasis remap='I'>limits</emphasis> file
49 (<filename>/etc/limits</filename> by default
50 or LIMITS_FILE defined <filename>config.h</filename>) describes
51 the resource limits you wish to impose. It should be owned by
52 root and readable by root account only.
56 By default no quota is imposed on 'root'. In fact, there is no way to
57 impose limits via this procedure to root-equiv accounts (accounts with
61 <para>Each line describes a limit for a user in the form:</para>
64 <emphasis remap='I'>user LIMITS_STRING</emphasis>
68 The <emphasis>LIMITS_STRING</emphasis> is a string of a concatenated
69 list of resource limits. Each limit consists of a letter identifier
70 followed by a numerical limit.
73 <para>The valid identifiers are:</para>
76 <listitem><para>A: max address space (KB)</para></listitem>
77 <listitem><para>C: max core file size (KB)</para></listitem>
78 <listitem><para>D: max data size (KB)</para></listitem>
79 <listitem><para>F: maximum filesize (KB)</para></listitem>
80 <listitem><para>M: max locked-in-memory address space (KB)</para></listitem>
81 <listitem><para>N: max number of open files</para></listitem>
82 <listitem><para>R: max resident set size (KB)</para></listitem>
83 <listitem><para>S: max stack size (KB)</para></listitem>
84 <listitem><para>T: max CPU time (MIN)</para></listitem>
85 <listitem><para>U: max number of processes</para></listitem>
86 <listitem><para>K: file creation mask, set by
88 <refentrytitle>umask</refentrytitle><manvolnum>2</manvolnum>
89 </citerefentry>.</para>
91 <listitem><para>L: max number of logins for this user</para></listitem>
92 <listitem><para>P: process priority, set by
94 <refentrytitle>setpriority</refentrytitle><manvolnum>2</manvolnum>
95 </citerefentry>.</para>
97 <listitem><para>I: max nice value (0..39 which translates to
98 20..-19)</para></listitem>
99 <listitem><para>O: max real time priority</para></listitem>
103 For example, <emphasis remap='I'>L2D2048N5</emphasis> is a valid
104 <emphasis>LIMITS_STRING</emphasis>. For reading convenience, the
105 following entries are equivalent:
114 Be aware that after <emphasis remap='I'>username</emphasis> the rest
115 of the line is considered a limit string, thus comments are not
116 allowed. A invalid limits string will be rejected (not considered) by
117 the <command>login</command> program.
121 The default entry is denoted by username "<emphasis>*</emphasis>". If
122 you have multiple <emphasis remap='I'>default</emphasis> entries in
123 your <emphasis>LIMITS_FILE</emphasis>, then the last one will be used
124 as the default entry.
128 To completely disable limits for a user, a single dash
129 "<emphasis>-</emphasis>" will do.
133 Also, please note that all limit settings are set PER LOGIN. They are
134 not global, nor are they permanent. Perhaps global limits will come,
135 but for now this will have to do ;)
139 <refsect1 id='files'>
143 <term><filename>/etc/limits</filename></term>
144 <listitem><para></para></listitem>
149 <refsect1 id='see_also'>
150 <title>SEE ALSO</title>
153 <refentrytitle>login</refentrytitle><manvolnum>1</manvolnum>
156 <refentrytitle>setpriority</refentrytitle><manvolnum>2</manvolnum>
159 <refentrytitle>setrlimit</refentrytitle><manvolnum>2</manvolnum>