cygrunsrv --install "Net-SNMP Agent" --path
/usr/local/sbin/snmpd.exe --args "-f -c c:/cygwin/usr/local/share/snmp/snmpd.conf -C -Lf c:/cygwin/var/log/snmpd.log tcp:16100,udp:16100" --desc "Net-SNMP Service" --type auto --dep Tcpip --shutdown -e"SNMPCONFPATH=C:/cygwin/usr/local/share/snmp"
cygrunsrv --install "Net-SNMP Trap Agent" --path/usr/local/sbin/snmptrapd.exe --args "-f -c c:/cygwin/usr/local/share/snmp/snmptrapd.conf -Lf c:\cygwin\var\log\snmptrapd.log tcp:16200,udp:16200" --desc "Net-SNMP Trap Service" --type auto --dep Tcpip --shutdown -e"SNMPCONFPATH=C:/cygwin/usr/local/share/snmp"
I compiled Net-SNMP 5.3.0.1 from scratch on Cygwin since the 5.1.3.1 on Win32 didn't work the way I wanted it and 5.1.3.1 on Cygwin failed to compile for me.
I assume your Cygwin installation is in C:\cygwin (change that \ to / to stop Cygwin/bash from escaping it). The SNMPCONFPATH is the path to snmp.conf.
The SNMPCONFPATH turned out to be uberimportant!/usr/local/share/snmp/snmp.conf contains something like
persistentDir
/var/net-snmp
mibdirs/usr/local/share/snmp/mibs
mibs +BLAH
BLAH is where you put extra MIBs you want to load.
Try this (Score:1)