Re: net-snmp startup issue

Martin Townsend <[email protected]>
Newsgroups gmane.network.net-snmp.user
Organization Power Oasis
Message-ID <[email protected]>
On 14/01/2011 18:08, Dave Shield wrote:
> On 14 January 2011 15:22, Martin Townsend
> <[email protected]>  wrote:
>> 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.
>>                    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.
> What happens if you put the directive to load this MIB into a
> system-level config file, rather than root's "personal" one?
>
> I.e. move
>
>     mibs +DeltaTelecomPower-MIB
>
> into /usr/local/etc/snmp/snmp.conf  (or /etc/snmp/snmp.conf
> depending on how the library was compiled)
>
> Dave
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1191 / Virus Database: 1435/3385 - Release Date: 01/16/11
>
Thanks Dave, I can see what the problem is now, as we are running from 
init we are using init's environment, which doesn't have the "HOME" 
environment variable set which means net-snmp won't find the 
snmp.local.conf file and the mibs within this directory.  I set HOME 
from my daemon before calling init_snmp and the problem was solved.

-Martin.


------------------------------------------------------------------------------
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
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.