Net-SNMP for AVR32 Linux

Simple Network Management Protocol (SNMP) is a widely used protocol for monitoring the health and welfare of network equipment (eg. routers), computer equipment and even devices like UPSs. Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6.

The snmpd could be usefull for monitoring and graphing network activity, load and such.

Building Net-SNMP

The source code for the latest version of Net-SNMP can be downloaded from http://net-snmp.sourceforge.net/ No patches are necessary for it to work on AVR32.

Configure Net-SNMP by running something like:

./configure --enable-mini-agent \
        --host=avr32-linux \
        --with-endianness=big \
        --with-default-snmp-version=3 \
        --with-sys-contact="[email protected]" \
        --with-sys-location=Home \
        --with-logfile=/var/log/snmpd.log \
        --with-persistent-directory=/var/net-snmp \
        --disable-shared \
        --enable-static \
        --disable-applications \
        --without-rpm \
        --without-dmalloc \
        --without-efence \
        --without-rsaref \
        --enable-mini-agent \
        --with-defaults \
        --prefix=/usr \
        --sysconfdir=/etc \
        --disable-manuals \
        --disable-debugging \
        --disable-scripts \
        --disable-mibs \
        --disable-mib-loading \
        --disable-ipv6 \
        --with-mib-modules="snmpv3mibs host smux ucd-snmp/proc ucd-snmp/loadave ucd-snmp/memory ucd-snmp/vmstat ucd-snmp/dlmod agent_mibs agentx target" \
        --with-install-prefix=

make 
make install

If you have a bit of free space in your filesystem you may want to remove the --with-mib-modules line and just let net-snmp build the default set. This is especially true if you are looking to extend the functionality of net-snmp in any way.

You should now have a snmpd binary in which may be copied onto your AVR32 system (it may be possible to reduce the total size a few bytes by building a non-static version - haven't tried that yet)

There is a EXAMPLE.conf included in the source package; copy it to /etc/snmp/snmpd.conf and do what ever changes you want. You have to set up community to security map, the rest is pretty much working ok as default.

If you have any problems, you may want to replace this config file with about the simplest one you can get away with, just a single line reading :

rwcommunity public
Also don't forget to check your log file, /var/log/snmpd.log

Tested versions

Usage

Start snmpd on the AVR:

snmpd 
If you leave the bind address blank, the daemon will listen on UDP port 161. This default works fine for most tasks.

From another computer you should now be able to run snmpwalk:

snmpwalk -v 1 -c  

Or point Munin at it:

Links

* Munin monitoring network traffic on eth0 on a NGW100:
ngw100-snmp_ngw100_if_2-day.png

* Munin monitoring load on a NGW100:
ngw100-snmp_ngw100_load-day.png

Attachment sort Action Size Date Who Comment
pngngw100-snmp_ngw100_load-day.png manage 19.5 K 10 Aug 2007 - 09:08 OleBendikKvisberg Munin monitoring load on a NGW100