Re: snmp_set_quick_print or snmpwalkoid issue ?

From: Date: Thu, 02 May 2002 16:04:21 +0000
Subject: Re: snmp_set_quick_print or snmpwalkoid issue ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-95706@lists.php.net to get a copy of this message
Basically you are not going to get the value type of the snmp, ie OID, timeticks, integers, etc.. Ray Hunter "Razvan Cosma" <razvan.cosma@catv.telemach.ro> wrote in message 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. > > > >

« previous php.general (#95706) next »