[mrtg] snmpget

Tim Kennedy tkennedy at yellowbrix.com
Thu Aug 17 07:52:07 MEST 2000

Hello, folks.

I have a quick question.   I am trying to add the macaddresses to an html
table that is built as a front end for 14all.cgi.

Getting the speed and all is not a problem.

        my($stat) = snmpUtils::get($snmp, "$oid");
        my($connector) = snmpUtils::get($snmp, "$oid");
        my($desc) = snmpUtils::get($snmp, "$oid");
        my($type) = snmpUtils::get($snmp, ".$oid");
        my($speed) = snmpUtils::get($snmp, ".$oid");
        my($speed_str) = &fmi($speed);
        my($phys_addr) = snmpUtils::get($snmp, ".$oid");

Is the part that does the getting.  The last entry is the one I use.
However, the $phys_addr is returned apparently as: av&à{

How do I change that av&à{ into the more readable format xx:xx:xx:xx:xx?

this is the value returned by the snmpget to a cisco 7206 vxr running IOS

Using the UCD-SNMP snmpget I get:
interfaces.ifTable.ifEntry.ifPhysAddress.2 =  Hex: 00 02 17 26 E0 1C


Timothy Kennedy
Network Operations Manager
YellowBrix, Inc.
tkennedy at yellowbrix.com
Cell: 703-216-5957

Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the mrtg mailing list