SNMP_Util v1.8 usage problems

Posted by deesh on 2010-03-19 08:39

Hi All,

I am trying to script a Perl program which uses snmpwalk feature. But the Net::SNMP is not providing the service. Only the SNMP_Util v1.8 provides the walk function. I installed this using the PPM, installation was fine. But when I try to use SNMP_Util or use SNMP::Util, I get the following error.

C:\Perl>perl test.pl
Can't locate SNMP.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at
C:/Perl/site/lib/SNMP/Util.pm line 15.
BEGIN failed--compilation aborted at C:/Perl/site/lib/SNMP/Util.pm line 15.
Compilation failed in require at test.pl line 4.
BEGIN failed--compilation aborted at test.pl line 4.

Line 4 in test.pl is actuallu the use command. Do I have to install the SNMP.pm , it is not installable in ppm(shown as SNMP in ppm).Please can anyone help me. I am a newbie to perl and the forum. please help me.

Thanks,
Deesh

troyt
ActiveState Staff
Mon, 2010-03-22 17:35

SNMP and SNMP::Util are not available from the ActiveState repositories. You could try installing these modules using the cpan shell:

cpan SNMP::Util

... but be aware there are some software requirements for this module, notably Net-SNMP (this is not the same as the Net::SNMP perl module). It is available for download here:

http://net-snmp.sourceforge.net/download.html

Even with this installed, I wasn't able to get the SNMP module to build on Windows, however, the Net-SNMP distribution above comes with an 'snmpwalk' executable if that's any help.

deesh | Tue, 2010-03-23 05:44

Thank you :). I will try to install the net-snmp module an will try the snmpwalk in that.

Thanks,
prakadeesh