Re: Re: snmp_set_quick_print or snmpwalkoid issue ?
| From: | Razvan Cosma | Date: | Fri, 03 May 2002 07:20:38 +0000 |
| Subject: | Re: Re: snmp_set_quick_print or snmpwalkoid issue ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95837@lists.php.net to get a copy of this message | ||
Yes, I have seen that, but the manual says I should get the only the
value, not also the OID. Can anyone please run this code and tell
me if they get the same result?
On Thu, 2 May 2002, Ray \BigDog\ Hunter wrote:
> 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.
> >
> >
> >
> >
>
>
>
>