Hi, I have an daemon application that uses net-snmp to perform GET REQUESTS to an SNMP device to obtain information periodically and this works fine when developing. The problem I have is that it doesn't work when starting the application from boot time. I have logging turned on in net-snmp:
snmp_enable_syslog(); init_snmp(ssmd_app_name); When running my application manually when the system has already booted I can see all the debug info in my log file, e.g. Jan 14 15:52:56 ts7800 net-snmp[1039]: trace: Jan 14 15:52:56 ts7800 net-snmp[1039]: read_config(): read_config.c, 777: Jan 14 15:52:56 ts7800 net-snmp[1039]: read_config: Jan 14 15:52:56 ts7800 net-snmp[1039]: /root/.snmp/snmp.local.conf:5 examining: mibs +DeltaTelecomPower-MIB^M Jan 14 15:52:56 ts7800 net-snmp[1039]: trace: Jan 14 15:52:56 ts7800 net-snmp[1039]: run_config_handler(): read_config.c, 498: Jan 14 15:52:56 ts7800 net-snmp[1039]: read_config: Jan 14 15:52:56 ts7800 net-snmp[1039]: Found a parser. Calling it: mibs / +DeltaTelecomPower-MIB^M Jan 14 15:52:56 ts7800 net-snmp[1039]: trace: But if I reboot the system and let my application startup automatically I get nothing in the net-snmp log and my application log indicates that it is failing to parse OOID names from the DeltaTelecomPower-MIB, it looks like the init_snmp call hasn't read and processed the config. The application is one of the last applications to startup, here is the complete list (smu is my application) lrwxrwxrwx 1 root root 18 Jul 7 2010 S10sysklogd -> ../init.d/sysklogd* lrwxrwxrwx 1 root root 15 Jul 7 2010 S11klogd -> ../init.d/klogd* -rwxr-xr-x 1 root root 3888 Jan 17 2008 S20exim4* lrwxrwxrwx 1 root root 15 Jul 7 2010 S20inetd -> ../init.d/inetd* lrwxrwxrwx 1 root root 17 Jul 7 2010 S20makedev -> ../init.d/makedev* lrwxrwxrwx 1 root root 15 Jul 7 2010 S20rsync -> ../init.d/rsync* lrwxrwxrwx 1 root root 15 Jul 7 2010 S20samba -> ../init.d/samba* lrwxrwxrwx 1 root root 15 Jul 13 2010 S20snmpd -> ../init.d/snmpd* lrwxrwxrwx 1 root root 13 Jul 7 2010 S20ssh -> ../init.d/ssh* lrwxrwxrwx 1 root root 20 Jul 7 2010 S21nfs-common -> ../init.d/nfs-common* lrwxrwxrwx 1 root root 17 Jul 7 2010 S50wu-ftpd -> ../init.d/wu-ftpd* lrwxrwxrwx 1 root root 13 Jul 7 2010 S80smu -> ../init.d/smu* lrwxrwxrwx 1 root root 14 Jul 7 2010 S89cron -> ../init.d/cron* lrwxrwxrwx 1 root root 17 Jul 7 2010 S90ts7kvfb -> ../init.d/ts7kvfb* lrwxrwxrwx 1 root root 17 Jul 7 2010 S91apache2 -> ../init.d/apache2* lrwxrwxrwx 1 root root 19 Jul 7 2010 S99rmnologin -> ../init.d/rmnologin* lrwxrwxrwx 1 root root 23 Jul 7 2010 S99stop-bootlogd -> ../init.d/stop-bootlogd* Interestingly snmpd works fine as I use this to mimic the SNMP device for initial development. OS is linux, processor is arm. I built the net-snmp 5.5 library using the default configuration. Any ideas as this has got me stumped? Best Regards, Martin. ----- No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1191 / Virus Database: 1435/3378 - Release Date: 01/13/11 ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ 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/listinfo/net-snmp-users