Ire w <[email protected]> writes: > I am running snmp agent in a target device on linux 2.6. I need to debug > IF-MIB C codes and print out my debug information. Because it is a daemon > process, printf will not send to console.
First off, you should read about Net-SNMP's debugging mechanisms: http://www.net-snmp.org/wiki/index.php/Debugging_output In particular, if you use lines like this for debugging: DEBUGMSGTL(("mytoken", "my favorite number: %d\n", 42)); Then you can redirect the output to a number of different places, including syslog, at runtime. > So, I used : syslog( LOG_DEBUG, " ifTable: testing") ; and check : cat > /var/log/messages but I have not got that information. No snmpd.log > is found under /var/log. See the snmpd manual page for options to configure where logging information goes (including files, syslog, etc). -- Wes Hardaker Please mail all replies to [email protected] ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
