Mini SNMP Daemon
July 2, 2026 ยท View on GitHub
The Mini SNMP daemon is a minimal implementation of an SNMP daemon. It
is primarily targeted at embedded systems with limited disk and memory
resources. All configuration can be done using command line arguments,
or using the optional /etc/mini-snmpd.conf file. It supports basic
CPU, memory, disk, and network interface statistics.
mini-snmpd is not as flexible as, and does not support the same
features as, the de-facto standard net-snmp, but this also means
it does not have the same footprint and overhead.
Supported features:
- SNMP version 1 and 2c
- Community string authentication when using 2c or explicitly configured
- Read-only access (writing is not supported)
- Dual-stack: serves IPv4 and IPv6 simultaneously
- SNMPv2c traps: coldStart, linkUp/linkDown, and authentication failure
- Includes basic system info like CPU load, memory, disk and network interfaces
- Temperature sensors from Linux hwmon, via LM-SENSORS-MIB
- Custom static responses on any OID, e.g. to emulate another device
- Does not need a configuration file, but one is supported
- Reloads the configuration on
SIGHUP, command line and file combined - Supports UDP and TCP (thus supports SSH tunneling of SNMP connections)
- Supports Linux 2.6 and later
- Supports FreeBSD (needs procfs mounted using "mount_linprocfs procfs /proc")
Note
SNMPv3 (USM authentication and privacy) is out of scope for now. Contributions welcome; if you need v3 today, use net-snmp.
mini-snmpd has been tested on x86 and ARM platforms in Ubuntu Linux,
Alpine Linux, and FreeBSD, using net-snmp and SnmpB as clients. Big
endian may not work.
- For info about licensing, see the file COPYING
- For info about using the program, see the file mini-snmpd.8
- For the list of supported MIBs and objects, see the file MIBS.md
- For info about how to (cross)compile the program, see the file Makefile
- For info about how to extend the MIB, see the file extending.md
Examples
Start the daemon:
$ ./mini-snmpd -n -p 16161 -D "My laptop" -L "Batcave" \
-C "Ops <ops@example.com>" -d '/' -i wlp3s0
Check uptime, useful to "ping" a device over SNMP:
$ snmpget -c public -v2c 127.0.0.1:16161 system.sysUpTime.0
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (93103) 0:15:31.03
Complete walk:
$ snmpwalk -v2c -c public 127.0.0.1:16161 .1
SNMPv2-MIB::sysDescr.0 = STRING: My laptop
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (93103) 0:15:31.03
SNMPv2-MIB::sysContact.0 = STRING: Ops <ops@example.com>
SNMPv2-MIB::sysName.0 = STRING: luthien
SNMPv2-MIB::sysLocation.0 = STRING: Batcave
IF-MIB::ifNumber.0 = INTEGER: 1
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifDescr.1 = STRING: wlp3s0
IF-MIB::ifType.1 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifMtu.1 = INTEGER: 1500
IF-MIB::ifSpeed.1 = Gauge32: 1000000000
IF-MIB::ifPhysAddress.1 = STRING: 6c:88:14:48:57:1c
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
IF-MIB::ifOperStatus.1 = INTEGER: up(1)
IF-MIB::ifLastChange.1 = Timeticks: (0) 0:00:00.00
IF-MIB::ifInOctets.1 = Counter32: 207845364
IF-MIB::ifInUcastPkts.1 = Counter32: 154221
IF-MIB::ifInDiscards.1 = Counter32: 0
IF-MIB::ifInErrors.1 = Counter32: 0
IF-MIB::ifOutOctets.1 = Counter32: 13323787
IF-MIB::ifOutUcastPkts.1 = Counter32: 88071
IF-MIB::ifOutDiscards.1 = Counter32: 0
IF-MIB::ifOutErrors.1 = Counter32: 0
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (454155) 1:15:41.55
...
Check load average:
$ snmpwalk -v2c -c public 127.0.0.1:16161 UCD-SNMP-MIB::laLoad
UCD-SNMP-MIB::laLoad.1 = STRING: 0.56
UCD-SNMP-MIB::laLoad.2 = STRING: 0.46
UCD-SNMP-MIB::laLoad.3 = STRING: 0.36
Check monitored disks:
$ snmpwalk -v2c -c public 127.0.0.1:16161 UCD-SNMP-MIB::dskTable
UCD-SNMP-MIB::dskIndex.1 = INTEGER: 1
UCD-SNMP-MIB::dskPath.1 = STRING: /
UCD-SNMP-MIB::dskTotal.1 = INTEGER: 245084448
UCD-SNMP-MIB::dskAvail.1 = INTEGER: 38953552
UCD-SNMP-MIB::dskUsed.1 = INTEGER: 206130896
UCD-SNMP-MIB::dskPercent.1 = INTEGER: 85
UCD-SNMP-MIB::dskPercentNode.1 = INTEGER: 10
Send SNMPv2c traps to a manager, -T addr[:port] (repeatable):
$ ./mini-snmpd -n -c public -i eth0 -T 192.0.2.5
This emits coldStart at start-up, linkUp/linkDown as eth0 changes
state, and authenticationFailure on a wrong community. Receive them
with, e.g., snmptrapd -f -Lo --disableAuthorization=yes udp:162.
Build & Install
The GNU Configure & Build system use /usr/local as the
default install prefix. Usually this is sufficient, the below example
installs to /usr instead:
$ tar xf mini-snmpd-X.Y.tar.xz
$ cd mini-snmpd-X.Y/
$ ./configure --prefix=/usr
$ make -j5
$ sudo make install-strip
The /etc/mini-snmpd.conf support is enabled by default and needs the
pkgconfig and libConfuse packages; use --without-config to build
without it. Installing from pre-built packages differ between systems,
check naming and suffix (-dev) to match your system.
Note
mini-snmpd-X.Y.tar.gz is not an actual release. See the releases page on GitHub for the latest versioned release.
Building from GIT
If you want to contribute, or simply want to try out the latest but still unreleased features, then you need to know a few things about the GNU Configure & Build system:
configure.acand a per-directoryMakefile.amare key filesconfigureandMakefile.inare generated fromautogen.sh, they are not stored in GIT but automatically generated for the release tarballsMakefileis generated byconfigurescript
To build from GIT you first need to clone the repository and run the
autogen.sh script. This requires automake and autoconf to be
installed on your system.
$ git clone https://github.com/troglobit/mini-snmpd.git
$ cd mini-snmpd/
$ ./autogen.sh
$ ./configure && make
A default configure enables .conf support and so needs libConfuse;
build with --without-config if you do not have it.
GIT sources are a moving target and are not recommended for production systems, unless you know what you are doing!
Origin & References
mini-snmpd is an effort by Joachim Wiberg to create a focal point for patches and development of the original mini_snmpd project by Robert Ernst, since the original site now has gone dark.
This project is maintained at GitHub. Use its issue tracker and pull request functions to report bugs or contribute new features.