NeDi Community

NeDi Software Specific => Discovery => Topic started by: ablkshrt1 on April 12, 2011, 09:57:06 PM

Title: Problem with libsnmp.pm
Post by: ablkshrt1 on April 12, 2011, 09:57:06 PM
I keep getting

Use of uninitialized value $ifidiO in concatenation (.) or string at ./inc/libsnmp.pm line 949.
Use of uninitialized value $ifodiO in concatenation (.) or string at ./inc/libsnmp.pm line 950.

on a few of the switches during discovery

I am no SNMP expert, I looked in the libsnmp file at those lines and can't make sense of what might be wrong

I am running the latest RC1
Title: Re: Problem with libsnmp.pm
Post by: rickli on April 12, 2011, 10:55:24 PM
Are you saying you can't figure out my variable names? ;)

ifidiO = IF In Discard OID
ifodiO = IF Out Discard OID

Looks like the .def doesn't have those values defined. I updated all the .defs in the distribution, but you'll need to review your own. Defgen should be rather helpful...
Title: Re: Problem with libsnmp.pm
Post by: ceyu on April 19, 2011, 05:22:37 PM
I have a similar Problem, nedi.pl causes error messages only with a 48-port-Cisco-Switch (WS-C2960G-48TC-L)

10.11.80.1      c2960-c Use of uninitialized value in pattern match (m//) at ./inc/libsnmp.pm line 404.
Vmv17Use of uninitialized value in pattern match (m//) at ./inc/libsnmp.pm line 464.
SuUse of uninitialized value in pattern match (m//) at ./inc/libsnmp.pm line 483.
SmUse of uninitialized value in pattern match (m//) at ./inc/libsnmp.pm line 502.
SiStIv i51       p1/0 Use of uninitialized value in concatenation (.) or string at ./inc/libsnmp.pm line 2049.
Use of uninitialized value in concatenation (.) or string at ./inc/libsnmp.pm line 2049.
Use of uninitialized value in concatenation (.) or string at ./inc/libsnmp.pm line 2049.
Use of uninitialized value in concatenation (.) or string at ./inc/libsnmp.pm line 2049.

 f0Use of uninitialized value $f[3] in concatenation (.) or string at ./inc/libdb-msq.pm line 788.
Use of uninitialized value $f[4] in concatenation (.) or string at ./inc/libdb-msq.pm line 788.
Use of uninitialized value $f[1] in concatenation (.) or string at ./inc/libdb-msq.pm line 788.
Use of uninitialized value $f[3] in concatenation (.) or string at ./inc/libdb-msq.pm line 788.
Use of uninitialized value $f[4] in concatenation (.) or string at ./inc/libdb-msq.pm line 788.
Use of uninitialized value $f[1] in concatenation (.) or string at ./inc/libdb-msq.pm line 788.
Use of uninitialized value $f[3] in concatenation (.) or string at ./inc/libdb-msq.pm line 788.

What is going wrong?
Title: Re: Problem with libsnmp.pm
Post by: rickli on April 19, 2011, 09:32:45 PM
Can you post a nedi.pl -vt 10.11.80?

And the .def you're using?
Title: Re: Problem with libsnmp.pm
Post by: ceyu on April 20, 2011, 09:53:27 AM
The problem is solved, after I remove "^M" at the end of each line in the .def file (1.3.6.1.4.1.9.1.697.def). 

Thank you for your hint.


nedi.pl -vt 10.11.80.1

Started with relative path!
LWP :Loaded
OUI :17516 NIC vendor entries read
RDEV:52 devices read () from nedi.devices
RIF :2590 IF read () from nedi.interfaces
RLNK:0 links (WHERE type = "STAT") read from nedi.links
SEED:10.11.80.1 added for testing
MAIN:Ignoring 5 threads for testing

Discovery (1.0.6 rc1) with 1 seed at Wed Apr 20 00:15:24 2011
-------------------------------------------------------------------------------
Device            Status            Todo/Done-Time
===============================================================================

Discover     ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Identify     ------------------------------------------------------------------
SNMP:Connect 10.11.80.1 test v2 Tout:2s MaxMS:1472
IDNT:Name = c2960-c0-1
SOBJ:Reading 1.3.6.1.4.1.9.1.697.def
SYS :Con=test@, -99999 Loc=xxxx
SYS :OS=IOS^M SV=2 TY=WS-C2960G-48TC-L^M

Enterprise   ------------------------------------------------------------------
SNMP:Connect 10.11.80.1 test v2 Tout:2s MaxMS:1472
SERN:Serial number =
BOOT:Image =
VTP :Domain =
Use of uninitialized value in pattern match (m//) at ./inc/libsnmp.pm line 404.
ERR :VTP mode,


Use of uninitialized value in pattern match (m//) at ./inc/libsnmp.pm line 464.
ERR :CPU, Use of uninitialized value in pattern match (m//) at ./inc/libsnmp.pm line 483.
Use of uninitialized value in pattern match (m//) at ./inc/libsnmp.pm line 502.
ERR :Custom,
ERR :Temp, Invalid argument '^M'

Interfaces   ------------------------------------------------------------------
SNMP:Connect 10.11.80.1 test v2 Tout:7s MaxMS:2048
ERR :Vlan index Invalid argument '^M'


Modules      ------------------------------------------------------------------
SNMP:Connect 10.11.80.1 test v2 Tout:2s MaxMS:5500
Use of uninitialized value in concatenation (.) or string at ./inc/libsnmp.pm line 2049.
Use of uninitialized value in concatenation (.) or string at ./inc/libsnmp.pm line 2049.
Use of uninitialized value in concatenation (.) or string at ./inc/libsnmp.pm line 2049.
MOD :1.3.6.1.2.1.47.1.1.1.1.7.1039-GigabitEthernet0/35
Title: Re: Problem with libsnmp.pm
Post by: tristanbob on April 20, 2011, 05:56:05 PM
I checked the version of that def file that is included in 1.0.6-RC1 and I didn't see the "^M" characters.

How do you think that got in your file?  Are you running on Windows?

Thanks,

Tristan