[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, "1.3.6.1.2.1.2.2.1.7.$oid");
my($connector) = snmpUtils::get($snmp, "1.3.6.1.2.1.31.1.1.1.17.$oid");
my($desc) = snmpUtils::get($snmp, "1.3.6.1.2.1.31.1.1.1.18.$oid");
my($type) = snmpUtils::get($snmp, ".1.3.6.1.2.1.2.2.1.3.$oid");
my($speed) = snmpUtils::get($snmp, ".1.3.6.1.2.1.2.2.1.5.$oid");
my($speed_str) = &fmi($speed);
my($phys_addr) = snmpUtils::get($snmp, ".1.3.6.1.2.1.2.2.1.6.$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
12.1(1a).
Using the UCD-SNMP snmpget I get:
interfaces.ifTable.ifEntry.ifPhysAddress.2 = Hex: 00 02 17 26 E0 1C
-Tim
--
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