

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.net-snmp.org/wiki/index.php?action=history&amp;feed=atom&amp;title=MFD%3AifTable%3ATesting</id>
		<title>MFD:ifTable:Testing - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.net-snmp.org/wiki/index.php?action=history&amp;feed=atom&amp;title=MFD%3AifTable%3ATesting"/>
		<link rel="alternate" type="text/html" href="http://www.net-snmp.org/wiki/index.php?title=MFD:ifTable:Testing&amp;action=history"/>
		<updated>2026-05-04T21:20:13Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.3</generator>

	<entry>
		<id>http://www.net-snmp.org/wiki/index.php?title=MFD:ifTable:Testing&amp;diff=5163&amp;oldid=prev</id>
		<title>Wes: Created page with &quot;{{MFDTutorial}}  == MFD : ifTable testing ==      If you have not been compiling as you went along, try and compile now.  &lt;table&gt;&lt;tr&gt;&lt;td width=20&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;$&lt;/code&gt;&lt;/td&gt;&lt;td ...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.net-snmp.org/wiki/index.php?title=MFD:ifTable:Testing&amp;diff=5163&amp;oldid=prev"/>
				<updated>2011-07-13T17:48:02Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{MFDTutorial}}  == MFD : ifTable testing ==      If you have not been compiling as you went along, try and compile now.  &amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td width=20&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{MFDTutorial}}&lt;br /&gt;
&lt;br /&gt;
== MFD : ifTable testing ==&lt;br /&gt;
    &lt;br /&gt;
If you have not been compiling as you went along, try and compile&lt;br /&gt;
now.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td width=20&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td bgcolor=CCCCCC&amp;gt;&lt;br /&gt;
 &amp;lt;font color=blue&amp;gt;make -f ifTable_Makefile&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After running make, you should have an executable named&lt;br /&gt;
&amp;#039;&amp;#039;ifTable&amp;#039;&amp;#039;. &lt;br /&gt;
    &lt;br /&gt;
=== Starting the agent ===&lt;br /&gt;
    &lt;br /&gt;
You can run the &amp;#039;&amp;#039;ifTable&amp;#039;&amp;#039; agent as a regular SNMP agent,&lt;br /&gt;
or as an AgentX sub-agent. The default is to run as a sub-agent. While&lt;br /&gt;
testing, the &amp;#039;&amp;#039;-f&amp;#039;&amp;#039; (do not fork into background) and &amp;#039;&amp;#039;-L&amp;#039;&amp;#039; (log&lt;br /&gt;
to stderr) options are recommended.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=20&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AgentX Sub-agent:&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td bgcolor=CCCCCC&amp;gt;&amp;lt;font color=blue&amp;gt;ifTable -f -L&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Standard SNMP Agent:&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td bgcolor=CCCCCC&amp;gt;&amp;lt;font color=blue&amp;gt;ifTable -M -f -L [udp[:port]]&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that running the sub-agent application as a master agent&lt;br /&gt;
will runwithout any access control. All SNMPv1 and SNMPv2c&lt;br /&gt;
requests will be accepted, regardless of the community string.&lt;br /&gt;
&lt;br /&gt;
For that reason, when testing I run as a regular user (not root), &lt;br /&gt;
and only bind to the localhost interface, like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td width=20&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td bgcolor=CCCCCC&amp;gt;&lt;br /&gt;
 $&amp;lt;font color=blue&amp;gt;./ifTable -f -L -DifTable -M localhost:1161&amp;lt;/font&amp;gt;&lt;br /&gt;
 2004-04-21 21:51:47 ifTable:init_ifTable: Registering ifTable as a mibs-for-dummies table.&lt;br /&gt;
 2004-04-21 21:51:48 ifTable: using linux 2.2 kernel /proc/net/dev&lt;br /&gt;
            &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Querying the agent ====&lt;br /&gt;
&lt;br /&gt;
A simple &amp;#039;&amp;#039;snmpwalk&amp;#039;&amp;#039; will quickly test the module:&lt;br /&gt;
&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td width=20&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td bgcolor=CCCCCC&amp;gt;&lt;br /&gt;
 $&amp;lt;font color=blue&amp;gt;snmpwalk -v1 localhost:1161 ifTable&amp;lt;/font&amp;gt;&lt;br /&gt;
 IF-MIB::ifIndex.1 = INTEGER: 1&lt;br /&gt;
 IF-MIB::ifIndex.2 = INTEGER: 2&lt;br /&gt;
 IF-MIB::ifIndex.3 = INTEGER: 3&lt;br /&gt;
 IF-MIB::ifDescr.1 = STRING: &lt;br /&gt;
 IF-MIB::ifDescr.2 = STRING: &lt;br /&gt;
 IF-MIB::ifDescr.3 = STRING: &lt;br /&gt;
 IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)&lt;br /&gt;
 IF-MIB::ifType.2 = INTEGER: ethernetCsmacd(6)&lt;br /&gt;
 IF-MIB::ifType.3 = INTEGER: tunnel(131)&lt;br /&gt;
 IF-MIB::ifPhysAddress.1 = STRING: 0:0:0:0:0:0&lt;br /&gt;
 IF-MIB::ifPhysAddress.2 = STRING: 0:30:65:cd:a3:c8&lt;br /&gt;
 IF-MIB::ifPhysAddress.3 = STRING: 0:0:0:0:0:0&lt;br /&gt;
 IF-MIB::ifInOctets.1 = Counter32: 51368348&lt;br /&gt;
 IF-MIB::ifInOctets.2 = Counter32: 2666605618&lt;br /&gt;
 IF-MIB::ifInOctets.3 = Counter32: 0&lt;br /&gt;
 IF-MIB::ifInUcastPkts.1 = Counter32: 415774&lt;br /&gt;
 IF-MIB::ifInUcastPkts.2 = Counter32: 13971039&lt;br /&gt;
 IF-MIB::ifInUcastPkts.3 = Counter32: 0&lt;br /&gt;
 IF-MIB::ifInDiscards.1 = Counter32: 0&lt;br /&gt;
 IF-MIB::ifInDiscards.2 = Counter32: 0&lt;br /&gt;
 IF-MIB::ifInDiscards.3 = Counter32: 0&lt;br /&gt;
 IF-MIB::ifInErrors.1 = Counter32: 0&lt;br /&gt;
 IF-MIB::ifInErrors.2 = Counter32: 0&lt;br /&gt;
 IF-MIB::ifInErrors.3 = Counter32: 0&lt;br /&gt;
 IF-MIB::ifOutOctets.1 = Counter32: 51370076&lt;br /&gt;
 IF-MIB::ifOutOctets.2 = Counter32: 879325033&lt;br /&gt;
 IF-MIB::ifOutOctets.3 = Counter32: 0&lt;br /&gt;
 IF-MIB::ifOutUcastPkts.1 = Counter32: 415798&lt;br /&gt;
 IF-MIB::ifOutUcastPkts.2 = Counter32: 8046959&lt;br /&gt;
 IF-MIB::ifOutUcastPkts.3 = Counter32: 0&lt;br /&gt;
 IF-MIB::ifOutDiscards.1 = Counter32: 0&lt;br /&gt;
 IF-MIB::ifOutDiscards.2 = Counter32: 0&lt;br /&gt;
 IF-MIB::ifOutDiscards.3 = Counter32: 0&lt;br /&gt;
 IF-MIB::ifOutErrors.1 = Counter32: 0&lt;br /&gt;
 IF-MIB::ifOutErrors.2 = Counter32: 0&lt;br /&gt;
 IF-MIB::ifOutErrors.3 = Counter32: 0&lt;br /&gt;
 IF-MIB::ifSpecific.3 = No more variables left in this MIB View (It is past the end of the MIB tree)&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you ran the agent with debugging, you should see something&lt;br /&gt;
like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td width=20&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td bgcolor=CCCCCC&amp;gt;&lt;br /&gt;
 $&amp;lt;font color=blue&amp;gt;./ifTable -f -L -DifTable -M localhost:1161&amp;lt;/font&amp;gt;&lt;br /&gt;
 2004-04-21 21:51:47 ifTable:init_ifTable: Registering ifTable as a mibs-for-dummies table.&lt;br /&gt;
 2004-04-21 21:51:48 ifTable: using linux 2.2 kernel /proc/net/dev&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wes</name></author>	</entry>

	</feed>