[mrtg] Re: snmpget

Tobias Oetiker oetiker at ee.ethz.ch
Thu Aug 17 07:57:10 MEST 2000


Today you sent me mail regarding [mrtg] snmpget:

*> 
*> 
*> 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?

check the code in lib/mrtg2/MRTG_lib.pm under populateconfcache

cheers
tobi
*> 
*> 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
*> 
*> 

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker, Timelord & SysMgr @ EE-Dept ETH-Zurich
 / // _ \/ _ \/ / TEL: +41(0)1-6325286  FAX:...1517  ICQ: 10419518 
/_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://ee-staff.ethz.ch/~oetiker


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