First of all, gretings to everyone (I'm new here).

 And the problem:
#!/usr/local/bin/php -q
<?
snmp_set_quick_print(0);
$test=snmpwalkoid("1.1.1.1","public",".1.3.6.1.2.1.2.2.1.16");
for (reset($test); $i = key($test); next($test)) {
echo "$i:\n$test[$i]\n";
}
?>
results in:
interfaces.ifTable.ifEntry.ifOutOctets.1:
interfaces.ifTable.ifEntry.ifOutOctets.1 = Counter32: 137600220
interfaces.ifTable.ifEntry.ifOutOctets.2:
interfaces.ifTable.ifEntry.ifOutOctets.2 = Counter32: 25026545

and with snmp_set_quick_print(1):
interfaces.ifTable.ifEntry.ifOutOctets.1:
interfaces.ifTable.ifEntry.ifOutOctets.1 137600606
interfaces.ifTable.ifEntry.ifOutOctets.2:
interfaces.ifTable.ifEntry.ifOutOctets.2 25031056

Shouldn't I get only the last field with the actual value ??
Details: php-4.1.2 ucd-snmp-4.2.4 both from tarballs.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to