snmpwalkoid
snmpwalkoid
Query for a tree of information about a network entity
**snmpwalkoid** string $hostname string $community $object_id int $timeout int $retries
function is used to read all object ids
and their respective values from an SNMP agent specified by
.
snmpwalkoid``hostname
The existence of and
has historical reasons. Both
functions are provided for backward compatibility.
Use instead.
snmpwalkoid``snmpwalk``snmprealwalk
hostnameThe SNMP agent.
communityThe read community.
object_id
If null, is taken as the root of
the SNMP objects tree and all objects under that tree are returned as
an array.
object_id
If is specified, all the SNMP objects
below that are returned.
`object_id``object_id`
timeoutThe number of microseconds until the first timeout.
retriesThe number of times to retry if timeouts occur.
Returns an associative array with object ids and their respective
object value starting from the
as root or false on error.
object_id
Voorbeeld: Example
<?php
$a = snmpwalkoid("127.0.0.1", "public", "");
for (reset($a); $i = key($a); next($a)) {
echo "$i: $a[$i]<br />\n";
}
?>
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
snmpwalk