downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

snmprealwalk> <snmpget
[edit] Last updated: Fri, 25 May 2012

view this page in

snmpgetnext

(PHP 5)

snmpgetnext 指定したオブジェクト ID に続く SNMP オブジェクトを取得する

説明

string snmpgetnext ( string $host , string $community , string $object_id [, int $timeout = 1000000 [, int $retries = 5 ]] )

snmpgetnext() 関数は、 object_id で指定したオブジェクトに続く SNMP オブジェクトの値を取得します。

パラメータ

host

SNMP エージェント (サーバー) のホスト名。

community

リードコミュニティ。

object_id

前にある SNMP オブジェクトの ID。

timeout

最初のタイムアウトまでのマイクロ秒数。

retries

タイムアウト発生時の再試行回数。

返り値

成功した場合に SNMP オブジェクトの値、エラー時に FALSE を返します。 エラー時には E_WARNING が発生します。

例1 snmpgetnext() の使用法

<?php
$nameOfSecondInterface 
snmpgetnetxt('localhost''public''IF-MIB::ifName.1';
?>

参考

  • snmpget() - SNMP オブジェクトを取得する
  • snmpwalk() - エージェントから全ての SNMP オブジェクトを取得する



add a note add a note User Contributed Notes snmpgetnext
achalsaraiya at yahoo dot co dot in 25-Mar-2010 02:46
with snmpget api, the agent returns the value associated
with the OID (or OIDs) specified in the original request.
The snmpgetnext api is  similar, but the agent returns the
value associated with the next (valid) OID

eg:
snmpgetnext('192.168.40.134',
                   'public',
                   'SNMPv2-MIB::sysUpTime.0');

will give the output:
STRING: user@hostname

 
show source | credits | stats | sitemap | contact | advertising | mirror sites