This is a discussion on Re: snmptrapd - avoiding ambiguity in log files within the SNMP Users forums, part of the Networking and Network Related category; Thomas Anders writes: > For a test, only put "trapdhandle default /bin/cat" into your > snmptrapd.conf ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Thomas Anders writes: > For a test, only put "trapdhandle default /bin/cat" into your > snmptrapd.conf and run snmptrapd with "-Drun:exec" (in addition to "-f > -Lo -C -c ...". It should print something like: > > run:exec: running '/bin/cat' > run:exec: child 29893 finished. result=0 That's just what I get, but I expected to also see the output of cat! Which I did in 5.0.9. I guess one change is that stdout is redirected. I now put in my own (previous) handler and change it to write to a file and get output. So that problem is solved. Thomas Anders writes: > > BTW, here's what I view as confusing: > > make install > > ... > > [root@don-eve net-snmp-5.1.3.1]# which snmptrapd > > /usr/local/sbin/snmptrapd > > [root@don-eve net-snmp-5.1.3.1]# snmptrapd -v [=> NET-SNMP Version: 5.0.9] > > [root@don-eve net-snmp-5.1.3.1]# /usr/local/sbin/snmptrapd -v [=> NET-SNMP Version: 5.1.3.1] > Your system/environment looks utterly broken. Run "strace snmptrapd -v" > to see if it's calling the old binary or loading the old libraries. > Report back to the list if you have new information. I notice that the problem above is solved by starting a new shell. I next see that I get quoting only from running /root/net-snmp-5.1.3.1/apps/snmptrapd WHEN IT'S NOT INSTALLED ! When I make install I get no quoting whether I run /root/net-snmp-5.1.3.1/apps/snmptrapd or /usr/local/sbin/snmptrapd (or just snmptrapd from a new shell where that's 5.1.3.1). # ldd ./apps/.libs/lt-snmptrapd gives same output in either installed or uninstalled state Strace shows the same files being loaded until we get to loading mibs, where one case succeeds and the other fails. I now install again and find that I get quoting if I add -M / (which causes all attempts to load mibs to fail)! So there's something about loading mibs that causes the quoting to be disabled! Does this make sense? [root@don-eve net-snmp-5.1.3.1]# snmptrapd -f -Lo -C -M / Cannot find module (IP-MIB): At line 0 in (none) ... Cannot find module (SNMPv2-TM): At line 0 in (none) 2005-09-10 15:45:59 NET-SNMP version 5.1.3.1 Started. 2005-09-10 15:46:04 number3 [10.0.0.1] (via 10.0.0.1) TRAP, SNMP v1, community private iso.3.6.1.4.1.2021.13.991 Enterprise Specific Trap (117) Uptime: 148 days, 19:14:14.87 iso.3.6.1.2.1.1.6.0 = STRING: "XXX\\\" iso.2.3.4 = INTEGER: 1234" 2005-09-10 15:50:20 NET-SNMP version 5.1.3.1 Stopped. [root@don-eve net-snmp-5.1.3.1]# snmptrapd -f -Lo -C 2005-09-10 15:50:24 NET-SNMP version 5.1.3.1 Started. 2005-09-10 15:50:28 number3 [10.0.0.1] (via 10.0.0.1) TRAP, SNMP v1, community private UCD-SNMP-MIB::ucdExperimental.991 Enterprise Specific Trap (117) Uptime: 148 days, 19:18:38.54 SNMPv2-MIB::sysLocation.0 = STRING: XXX\" iso.2.3.4 = INTEGER: 1234 ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/...net-snmp-users |