hi dave,

btw:  net-snmp-5.2.1, perl-5.8.6, SuSE 9.2

-ok, i can try specifying version.

... and ... doing that didn't change the result ... but your exercise got 
me to focus more closely on what i'm doing ... and to realize that i 
misreported what i was seeing in my previous message.  contrary to my 
earlier claim, the two requests are *not* identical ... in fact, in the 
broken case, the request (in the packet trace) is for OID "0.1" .... 
whereas in the working case the request is for the full OID:  
".1.3.6.1.4.1.9.9.10.1.1.4.1.1.6.2.1"

-so ... at this point ... it's obvious why the agent returns NOSUCHOBJECT

guru> snmpget -c public -v 2c ja-b-rtr ciscoFlashPartitionFileCount.2.1
 CISCO-FLASH-MIB::ciscoFlashPartitionFileCount.2.1 = Wrong Type (should be 
Gauge32 or Unsigned32): INTEGER: 2
guru> 

guru> cat test
#!/opt/vdops/bin/perl
use strict;
use warnings;
use SNMP;
my ($sess, $val);
$SNMP::dump_packet = 1;
$sess = new SNMP::Session ( Community => 'public',
                            DestHost  => 'ja-b-rtr',
                            Version   => '2c',
                          );
#$val = $sess->get(".1.3.6.1.4.1.9.9.10.1.1.4.1.1.6.2.1");
$val = $sess->get("ciscoFlashPartitionFileCount.2.1");
print "val = $val\n";
guru> 

guru> ./test

Sending 36 bytes to UDP: [140.107.6.206]:161
0000: 30 22 02 01  01 04 06 70  75 62 6C 69  63 A0 15 02    0".....public...
0016: 04 00 EA B4  DB 02 01 00  02 01 00 30  07 30 05 06    ...........0.0..
0032: 01 01 05 00                                           ....


Received 36 bytes from UDP: [140.107.6.206]:161
0000: 30 22 02 01  01 04 06 70  75 62 6C 69  63 A2 15 02    0".....public...
0016: 04 00 EA B4  DB 02 01 00  02 01 00 30  07 30 05 06    ...........0.0..
0032: 01 01 80 00                                           ....

val = NOSUCHOBJECT
guru> 

[traces posted to https://vishnu.fhcrc.org/net-snmp]

-ok, so the Perl client is having trouble converting the object value  
ciscoFlashPartitionFileCount.2.1 into an OID ... it comes up with "0.1" 
instead of the full ".1.3.6.1.4.1.9.9.10.1.1.4.1.1.6.2.1"


would you have any suggestions on how i might dig deeper from here?

--sk

stuart kendrick
fhcrc


On Mon, 25 Apr 2005, Dave Shield wrote:

> On Mon, 2005-04-25 at 03:12, Stuart Kendrick wrote:
> > i'm seeing a discrepancy in the value returned by a command-line
> > get versus a get originating from within the Perl SNMP.pm.
> 
> Hmmm....  that looks somewhat strange.
> The two requests certainly look the same.
> 
> All I can suggest is a difference in the SNMP version
> being used.  Try specifying this explicitly in both cases.
> 
> 
> Otherwise, you might have to turn on debugging in the agent.
> Try dumping incoming packets, and compare these two requests.
> Can you spot anything that looks significant?
> 
> Dave
> 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to