A Smart SNMP Agent

Recent News

Active Discussions

Docs for Newbies

Latest Documents



SmartSNMP is a minimal easy-config agent for network management supporting SNMPv1/v2c/v3(non-encryption) and AgentX. It is written in C99 and Lua5.1. It can run both on PC platforms like Linux and embedded systems such as OpenWRT.


SmartSNMP is licensed under GPLv2 with "PRIVATE MIB" EXCEPTION, see LICENSE file for more details.


One of the biggest bonuses (aka smartest features) of this agent is that you can write your own private mibs and load it only if you learn to write lua files as shown in config and mibs directory.


SmartSNMP can run in two modes: the SNMP mode and the AgentX mode. In SNMP mode the agent will run as an independent SNMP agent and process SNMP datagram from the client, while in AgentX mode the agent will run as an sub-agent against NET-SNMP as the master agent and process AgentX datagram from the master.

Revelant test samples are shown respectively as tests/ and tests/


  • Lua 5.1
  • One of transports
    • built-in
    • select
    • kqueue (not tested yet)
    • epoll
    • libevent
    • libubox/uloop (for OpenWrt)


Different event-driven mechanisms and transport options need respective libraries. For expample, in libevent transport you need to install libevent, in uloop transport you need to install libubox. Especially, on Ubuntu you should install liblua5.1 while liblua is needed on other platforms.

Assume SmartSNMP is running on Ubuntu, you shall install libraries such as:

# lua5.1
sudo apt-get install -y lua5.1 liblua5.1-0-dev

# scons & git
sudo apt-get install -y scons git

# clone with git
git clone

Test script

Any SNMP daemon installed in you system should be closed before test.

sudo /etc/init.d/snmpd stop

In SNMP mode, we would run the SmartSNMP daemon:

cd smartsnmp
sudo ./tests/

Then run test cases at another terminal:

cd smartsnmp

In AgentX mode, NET-SNMP will be tested as the master agent, so we will download NET-SNMP- source and build out the image in tests directory:

cd smartsnmp

Then run NET-SNMP as the master agent:

sudo ./tests/net-snmp-release/sbin/snmpd -f -Lo -m "" -C -c tests/snmpd.conf

Then run the SmartSNMP as a sub-agent at another terminal:

cd smartsnmp

Then run test cases at the third terminal:

cd smartsnmp