185 lines
5.9 KiB
HTML
185 lines
5.9 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of PRLIMIT</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>PRLIMIT</H1>
|
|
Section: User Commands (1)<BR>Updated: July 2014<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
prlimit - get and set process resource limits
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>prlimit</B> [options]
|
|
|
|
[<B>--</B><I>resource</I>[<B>=</B><I>limits</I>]
|
|
|
|
[<B>--pid </B><I>PID</I>]
|
|
|
|
<P>
|
|
<B>prlimit</B> [options]
|
|
|
|
[<B>--</B><I>resource</I>[<B>=</B><I>limits</I>]
|
|
|
|
<I>command </I>[<I>argument</I>...]
|
|
|
|
<P>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
Given a process ID and one or more resources, <B>prlimit</B> tries to retrieve
|
|
and/or modify the limits.
|
|
<P>
|
|
When <I>command</I> is given,
|
|
<B>prlimit</B>
|
|
|
|
will run this command with the given arguments.
|
|
<P>
|
|
The <I>limits</I> parameter is composed of a soft and a hard value, separated
|
|
by a colon (:), in order to modify the existing values. If no <I>limits</I> are
|
|
given, <B>prlimit</B> will display the current values. If one of the values
|
|
is not given, then the existing one will be used. To specify the unlimited or
|
|
infinity limit (RLIM_INFINITY), the -1 or 'unlimited' string can be passed.
|
|
<P>
|
|
Because of the nature of limits, the soft limit must be lower or equal to the
|
|
high limit (also called the ceiling). To see all available resource limits,
|
|
refer to the RESOURCE OPTIONS section.
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="1"><I>soft</I>:<I>hard</I> Specify both limits.<DD>
|
|
<DT id="2"><I>soft</I>: Specify only the soft limit.<DD>
|
|
<DT id="3">:<I>hard</I> Specify only the hard limit.<DD>
|
|
<DT id="4"><I>value</I> Specify both limits to the same value.<DD>
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>GENERAL OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="5"><B>-h, --help</B><DD>
|
|
Display help text and exit.
|
|
<DT id="6"><B>--noheadings</B><DD>
|
|
Do not print a header line.
|
|
<DT id="7"><B>-o, --output </B><I>list</I><DD>
|
|
Define the output columns to use. If no output arrangement is specified,
|
|
then a default set is used.
|
|
Use <B>--help</B> to get a list of all supported columns.
|
|
<DT id="8"><B>-p, --pid</B><DD>
|
|
Specify the process id; if none is given, the running process will be used.
|
|
<DT id="9"><B>--raw</B><DD>
|
|
Use the raw output format.
|
|
<DT id="10"><B>--verbose</B><DD>
|
|
Verbose mode.
|
|
<DT id="11"><B>-V, --version</B><DD>
|
|
Display version information and exit.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>RESOURCE OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="12"><B>-c, --core</B>[=<I>limits</I>]<DD>
|
|
Maximum size of a core file.
|
|
<DT id="13"><B>-d, --data</B>[=<I>limits</I>]<DD>
|
|
Maximum data size.
|
|
<DT id="14"><B>-e, --nice</B>[=<I>limits</I>]<DD>
|
|
Maximum nice priority allowed to raise.
|
|
<DT id="15"><B>-f, --fsize</B>[=<I>limits</I>]<DD>
|
|
Maximum file size.
|
|
<DT id="16"><B>-i, --sigpending</B>[=<I>limits</I>]<DD>
|
|
Maximum number of pending signals.
|
|
<DT id="17"><B>-l, --memlock</B>[=<I>limits</I>]<DD>
|
|
Maximum locked-in-memory address space.
|
|
<DT id="18"><B>-m, --rss</B>[=<I>limits</I>]<DD>
|
|
Maximum Resident Set Size (RSS).
|
|
<DT id="19"><B>-n, --nofile</B>[=<I>limits</I>]<DD>
|
|
Maximum number of open files.
|
|
<DT id="20"><B>-q, --msgqueue</B>[=<I>limits</I>]<DD>
|
|
Maximum number of bytes in POSIX message queues.
|
|
<DT id="21"><B>-r, --rtprio</B>[=<I>limits</I>]<DD>
|
|
Maximum real-time priority.
|
|
<DT id="22"><B>-s, --stack</B>[=<I>limits</I>]<DD>
|
|
Maximum size of the stack.
|
|
<DT id="23"><B>-t, --cpu</B>[=<I>limits</I>]<DD>
|
|
CPU time, in seconds.
|
|
<DT id="24"><B>-u, --nproc</B>[=<I>limits</I>]<DD>
|
|
Maximum number of processes.
|
|
<DT id="25"><B>-v, --as</B>[=<I>limits</I>]<DD>
|
|
Address space limit.
|
|
<DT id="26"><B>-x, --locks</B>[=<I>limits</I>]<DD>
|
|
Maximum number of file locks held.
|
|
<DT id="27"><B>-y, --rttime</B>[=<I>limits</I>]<DD>
|
|
Timeout for real-time tasks.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="28"><B>prlimit --pid 13134</B><DD>
|
|
Display limit values for all current resources.
|
|
<DT id="29"><B>prlimit --pid 13134 --rss --nofile=1024:4095</B><DD>
|
|
Display the limits of the RSS, and set the soft and hard limits for the number
|
|
of open files to 1024 and 4095, respectively.
|
|
<DT id="30"><B>prlimit --pid 13134 --nproc=512:</B><DD>
|
|
Modify only the soft limit for the number of processes.
|
|
<DT id="31"><B>prlimit --pid $$ --nproc=unlimited</B><DD>
|
|
Set for the current process both the soft and ceiling values for the number of
|
|
processes to unlimited.
|
|
<DT id="32"><B>prlimit --cpu=10 sort -u hugefile</B><DD>
|
|
Set both the soft and hard CPU time limit to ten seconds and run 'sort'.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+ulimit">ulimit</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+prlimit">prlimit</A></B>(2)
|
|
|
|
<P>
|
|
<A NAME="lbAI"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
The prlimit system call is supported since Linux 2.6.36, older kernels will
|
|
break this program.
|
|
<P>
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
<PRE>
|
|
Davidlohr Bueso <<A HREF="mailto:dave@gnu.org">dave@gnu.org</A>> - In memory of Dennis M. Ritchie.
|
|
</PRE>
|
|
|
|
<A NAME="lbAK"> </A>
|
|
<H2>AVAILABILITY</H2>
|
|
|
|
The prlimit command is part of the util-linux package and is available from
|
|
<A HREF="https://www.kernel.org/pub/linux/utils/util-linux/.">https://www.kernel.org/pub/linux/utils/util-linux/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="33"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="34"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="35"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="36"><A HREF="#lbAE">GENERAL OPTIONS</A><DD>
|
|
<DT id="37"><A HREF="#lbAF">RESOURCE OPTIONS</A><DD>
|
|
<DT id="38"><A HREF="#lbAG">EXAMPLES</A><DD>
|
|
<DT id="39"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
<DT id="40"><A HREF="#lbAI">NOTES</A><DD>
|
|
<DT id="41"><A HREF="#lbAJ">AUTHORS</A><DD>
|
|
<DT id="42"><A HREF="#lbAK">AVAILABILITY</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:25 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|