On Sun, 2011-10-02 at 10:37 +0530, Vivek Nagaraj wrote: > Ok. That sounds reasonable. Thanks a lot! Hope you can can answer my > following questions: > > 1) What is the difference between snmp.conf and snmpd.conf files in > '/etc/snmp/' directory?
snmp.conf is used by all snmp*-programs snmpd.conf is only used by snmpd The items you can specify in each of them also differs. Please see the man pages snmp.conf(5) and snmpd.conf(5) for more discussion. > 2) When I execl 'snmptrap' command from my program, which of the above > two *.conf files are actually used? snmp.conf. You could ask snmptrap this using the -H command line option. That lists the available configuration items as well as the files were they can be placed. Another thing to consider is that you can control this on the command line of snmptrap as well. snmptrap ... udp:host:port ... sends a trap to host:port. If you really want to do it like you have up til now then snmptrap ... --defTarget="snmptrap udp :port" host ... also would send the trap to host:port. When you starts talking about execl snmptrap I also have to say that I wouldn't have done it that way... I would probably either embed the library to send the traps directly or let the program act as an AgentX subagent and use that to make the agent send the traps to the places that are specified in it's configuration file. But I admit that your solution is quicker to get started with. /MF ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders