mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-29 07:18:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@78496 c90b9560-bf6c-de11-be94-00142212c4b1
83 lines
2.6 KiB
XML
83 lines
2.6 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.2 $ -->
|
|
<!-- splitted from ./en/functions/snmp.xml, last change in rev 1.2 -->
|
|
<refentry id="function.snmpwalk">
|
|
<refnamediv>
|
|
<refname>snmpwalk</refname>
|
|
<refpurpose>Fetch all the SNMP objects from an agent</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>snmpwalk</methodname>
|
|
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>community</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>object_id</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>timeout</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>retries</parameter></methodparam>
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
Returns an array of SNMP object values starting from the
|
|
<parameter>object_id</parameter> as root and &false; on error.
|
|
</para>
|
|
|
|
<para>
|
|
<function>snmpwalk</function> function is used to read all the
|
|
values from an SNMP agent specified by the
|
|
<parameter>hostname</parameter>. <parameter>Community</parameter>
|
|
specifies the read community for that agent. A &null;
|
|
<parameter>object_id</parameter> is taken as the root of the SNMP
|
|
objects tree and all objects under that tree are returned as an
|
|
array. If <parameter>object_id</parameter> is specified, all the
|
|
SNMP objects below that <parameter>object_id</parameter> are
|
|
returned.
|
|
|
|
<informalexample>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
$a = snmpwalk("127.0.0.1", "public", "");
|
|
]]>
|
|
</programlisting>
|
|
</informalexample>
|
|
</para>
|
|
|
|
<para>
|
|
Above function call would return all the SNMP objects from the
|
|
SNMP agent running on localhost. One can step through the values
|
|
with a loop
|
|
|
|
<informalexample>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
for ($i=0; $i < count($a); $i++) {
|
|
echo $a[$i];
|
|
}
|
|
]]>
|
|
</programlisting>
|
|
</informalexample>
|
|
</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:"../../../../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
|
|
-->
|