I found on Windows (PHP 5) an empty string did not return anything, it just timed out. I had to use null instead:
<?php
$a = snmpwalk("127.0.0.1", "public", null);
?>
![]() | snmpwalk描述array snmpwalk ( string hostname, string community, string object_id [, int timeout [, int retries]] )返回由 object_id 作为根的 SNMP 对象值所组成的数组,错误则返回 FALSE。 snmpwalk() 函数是用来读取所有由 hostname 指定的 SNMP 代理的值。Community 指定该代理中具有读权限的域。一个为 NULL 的 object_id 将被看作 SNMP 对象树的根,而在此树下的所有对象将作为一个数组被返回。如果指定了 object_id,则返回所有在 object_id 下的 SNMP 对象。 上边的函数调用将从运行于本机的 SNMP 代理那里返回所有的 SNMP 对象。可使用循环遍历这些值。 ![]()
http://mike.eire.ca
24-Mar-2005 02:54
I found on Windows (PHP 5) an empty string did not return anything, it just timed out. I had to use null instead:
bobby [dot] clark [at] eku [dot] edu
18-Sep-2003 05:29
I had to use an object_id like these.
Lars Troen
14-Mar-2003 07:18
Note that there's different behaviuor in php snmpwalk and ucd snmpwalk. If you try to walk an oid that has one value not under a subkey of the walked oid, ucd snmpwalk will return the value while php's snmpwalk will not.
anders at ei dot nu
30-Jan-2003 02:11
It would be nice to be able to specify what snmp version to use ( 1,2c,3 )
layer2 at www dot com
29-Aug-2001 11:52
Something to care about in dealing with snmpwalk:<BR>
john at antefacto dot com
17-Aug-2001 11:21
Ah. That's why all of our SNMP stuff was timing out anytime there was any load on the system. Sigh. A waste of two weeks trying to debug snmp....
billf at freebsd dot org
01-Aug-2001 05:22
for the poster wondering what the
jmartinson(AT_nospam)info234.com
20-Jun-2001 10:41
A quick router device view:
| ![]() |