Basically you are not going to get the value type of the snmp, ie OID,
timeticks, integers, etc..

Ray Hunter



"Razvan Cosma" <[EMAIL PROTECTED]> wrote in message
Pine.LNX.4.44.0205011203110.32753-100000@mach2">news:Pine.LNX.4.44.0205011203110.32753-100000@mach2...
> 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