Monks, this is my very first post. I am new to Perl, and SNMP. I however have more knowledge on Cisco IOS. When I create any perl script utilizing SNMP_util and it pulls a value that is HEX-string, the output looks like so: "180.20.137.96.107.0:▒▒`k'" The funny looking characters are supposed to be a mac address Expressed like so: FF FF FF FF FF FF. The walk works just fine if I run it from shell with net-snmp the Hex-String displays just fine. The issue happens with any OID that is supposed to pull Hex-Strings. Please Help. I think that the result of the snmpwalk is not displaying properly. But the best way to explain it is "it looks like a mushed together bar-code, it is by no means any alphanumeric characters. Additionaly, I have not found any documetation on SNMP_util.pm. Can you please point me to where I can find that Documentation? Thanks!
#!/usr/bin/perl use SNMP_util; $comunity = "rushnet"; $host = shift; $testOid = shift; print "----------------------------------------WALK------------------- +-------------\n"; (@result) = &snmpwalk("$comunity\@500\@$host", "$testOid"); foreach $lineBuf (@result){ print "$lineBuf\n";} print "----------------------------------------GET-------------------- +------------\n"; $result = &snmpget("$comunity\@$host", "$testOid"); #chomp($result); print "$result\n";
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |