|Do you know where your variables are?|
Perl Net::SNMP returns 1 instead of the desired outcomeby vlad3848 (Acolyte)
|on Oct 25, 2013 at 07:34 UTC||Need Help??|
vlad3848 has asked for the wisdom of the Perl Monks concerning the following question:
I am writing a script that will check date/time on a network device. I am using Net::SNMP module to walk the OID for the current time on the device and then will compare it against current time on a server..However, whenever i walk the switch for the time, the return value comes back as 1 instead of the actual value. I can manually walk the switch, or use system call to invoke snmpwalk, but since i need to do this on a couple of thousand of devices i am really trying to stick with SNMP module. Any ideas of what i am doing wrong?
Just to illustrate what output i am expecting. The following code invokes snmpwalk utility and produces the desired output:
SNMPv2-SMI::enterprises.15184.108.40.206.220.127.116.11 = STRING: "Fri Oct 25 07:23:33 2013 "
However, when i try to use the Net:SNMP module it produces output $VAR1 = 1;
Any help would be appreciated!!
Thanks in advance