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";

In reply to Hex-String retrieval is unsuccesful on SNMP Walk form Perl by adamZ88

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.