mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-26 05:48:57 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337883 c90b9560-bf6c-de11-be94-00142212c4b1
190 lines
4.5 KiB
XML
190 lines
4.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="function.posix-getrlimit" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>posix_getrlimit</refname>
|
|
<refpurpose>Return info about system resource limits</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>posix_getrlimit</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>posix_getrlimit</function> returns an <type>array</type>
|
|
of information about the current resource's soft and hard limits.
|
|
</para>
|
|
&posix.rlimits;
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Returns an associative <type>array</type> of elements for each
|
|
limit that is defined. Each limit has a soft and a hard limit.
|
|
<table>
|
|
<title>List of possible limits returned</title>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>Limit name</entry>
|
|
<entry>Limit description</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>core</entry>
|
|
<entry>
|
|
The maximum size of the core file. When 0, not core files are
|
|
created. When core files are larger than this size, they will
|
|
be truncated at this size.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>totalmem</entry>
|
|
<entry>
|
|
The maximum size of the memory of the process, in bytes.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>virtualmem</entry>
|
|
<entry>
|
|
The maximum size of the virtual memory for the process, in bytes.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>data</entry>
|
|
<entry>
|
|
The maximum size of the data segment for the process, in bytes.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>stack</entry>
|
|
<entry>
|
|
The maximum size of the process stack, in bytes.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>rss</entry>
|
|
<entry>
|
|
The maximum number of virtual pages resident in RAM
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>maxproc</entry>
|
|
<entry>
|
|
The maximum number of processes that can be created for the
|
|
real user ID of the calling process.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>memlock</entry>
|
|
<entry>
|
|
The maximum number of bytes of memory that may be locked into RAM.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>cpu</entry>
|
|
<entry>
|
|
The amount of time the process is allowed to use the CPU.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>filesize</entry>
|
|
<entry>
|
|
The maximum size of the data segment for the process, in bytes.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>openfiles</entry>
|
|
<entry>
|
|
One more than the maximum number of open file descriptors.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Example use of <function>posix_getrlimit</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
$limits = posix_getrlimit();
|
|
|
|
print_r($limits);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[soft core] => 0
|
|
[hard core] => unlimited
|
|
[soft data] => unlimited
|
|
[hard data] => unlimited
|
|
[soft stack] => 8388608
|
|
[hard stack] => unlimited
|
|
[soft totalmem] => unlimited
|
|
[hard totalmem] => unlimited
|
|
[soft rss] => unlimited
|
|
[hard rss] => unlimited
|
|
[soft maxproc] => unlimited
|
|
[hard maxproc] => unlimited
|
|
[soft memlock] => unlimited
|
|
[hard memlock] => unlimited
|
|
[soft cpu] => unlimited
|
|
[hard cpu] => unlimited
|
|
[soft filesize] => unlimited
|
|
[hard filesize] => unlimited
|
|
[soft openfiles] => 1024
|
|
[hard openfiles] => 1024
|
|
)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member>man page GETRLIMIT(2)</member>
|
|
<member><function>posix_setrlimit</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|