shadow/man/limits.5.xml

145 lines
4.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<refentry id='limits5'>
<!-- $Id: limits.5.xml,v 1.5 2005/04/27 16:44:12 kloczek Exp $ -->
<refmeta>
<refentrytitle>LIMITS</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>
<refnamediv id='name'>
<refname>limits</refname>
<refpurpose>Resource limits definition</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsect1 id='description'>
<title>DESCRIPTION</title>
<para>
The <emphasis remap='I'>limits</emphasis> file (/etc/limits by
default or LIMITS_FILE defined
config.h) describes the resource limits you wish to impose. It
should be
owned by root and readable by root account only.
</para>
<para>By default no quotas are imposed on 'root'. In fact, there is no
way to impose
limits via this procedure to root-equiv accounts (accounts with UID
0).
</para>
<para>Each line describes a limit for a user in the form:</para>
<para>
<emphasis remap='I'>user LIMITS_STRING</emphasis>
</para>
<para>
The <emphasis remap='B'>LIMITS_STRING</emphasis> is a string of a
concatenated list of resource limits.
Each limit consists of a letter identifier followed by a numerical
limit.
</para>
<para>The valid identifiers are:</para>
<para>A: max address space (KB)
<!-- .br -->
C: max core file size (KB)
<!-- .br -->
D: max data size (KB)
<!-- .br -->
F: maximum filesize (KB)
<!-- .br -->
M: max locked-in-memory address space (KB)
<!-- .br -->
N: max number of open files
<!-- .br -->
R: max resident set size (KB)
<!-- .br -->
S: max stack size (KB)
<!-- .br -->
T: max CPU time (MIN)
<!-- .br -->
U: max number of processes
<!-- .br -->
K: file creation mask, set by
<citerefentry>
<refentrytitle>umask</refentrytitle><manvolnum>2</manvolnum>
</citerefentry>
.
<!-- .br -->
L: max number of logins for this user
<!-- .br -->
P: process priority, set by
<citerefentry>
<refentrytitle>setpriority</refentrytitle><manvolnum>2</manvolnum>
</citerefentry>
.
</para>
<para> For example, <emphasis remap='I'>L2D2048N5</emphasis> is a valid
<emphasis remap='B'>LIMITS_STRING </emphasis>. For reading
convenience, the following entries are equivalent:
</para>
<para>username L2D2048N5
<!-- .br -->
username L2 D2048 N5
</para>
<para> Be aware that after <emphasis remap='I'>username</emphasis> 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 login program.
</para>
<para> The default entry is denoted by username "<emphasis
remap='B'>*</emphasis>". If you have multiple <emphasis
remap='I'>default</emphasis> entries in your <emphasis
remap='B'>LIMITS_FILE</emphasis>, then the last one will be used as
the default entry.
</para>
<para>To completely disable limits for a user, a single dash "<emphasis
remap='B'>-</emphasis> "will do.
</para>
<para>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 ;)
</para>
</refsect1>
<refsect1 id='files'>
<title>FILES</title>
<variablelist>
<varlistentry>
<term><filename>/etc/limits</filename></term>
<listitem></listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id='see_also'>
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>login</refentrytitle><manvolnum>1</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>setpriority</refentrytitle><manvolnum>2</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>setrlimit</refentrytitle><manvolnum>2</manvolnum>
</citerefentry>
</para>
</refsect1>
<refsect1 id='author'>
<title>AUTHOR</title>
<para>Cristian Gafton (gafton@sorosis.ro)</para>
</refsect1>
</refentry>