On Sat, 28 Aug 2004 15:51:36 -0500 Gary wrote:
GC> This is what confused me. I have two configuration files both called
GC> snmpd.conf.
GC> One is for persistence and one is for general configuration which is
GC> produced using snmpconf -g basic_setup.
GC> My SNMPCONFPATH was set to the point general at /usr/var/local/share. The
GC> persistence configuration resides in /var/net-snmp.
GC> 
GC> I was manually inserting my token into the persistence file. Thinking that
GC> it would be
GC> read and my callback function would be called. Idiot, total idiot. The
GC> callback function would only be called if the token resided in the
GC> snmpd.conf file pointed to...yes you get it SNMPCONFPATH.
GC> At some point I must of altered this environment variable to point to
GC> /var/net-snmp and pick up the tokens.
GC> 
GC> The reason why I am doing this. Basically when the agent restarts I want to
GC> pull the tokens from the persistence and re-create the oids.
GC> 
GC> The question begs. The SNMPCONFPATH points to the general agent
GC> configuration.

No, SNMPCONFPATH is a path. If there are multipe directories, multiple files
can be read. If you unset SNMPCONFPATH, you'll find that both will magically be
read. Run with-Dread_config to watch it in action. The default will look
something like this:

read_config: reading premib configuration tokens
read_config: config path used:
/usr/local/etc/snmp:/usr/local/share/snmp:/usr/local/lib/snmp:/home/rks/.snmp:
/var/net-snmp


GC> Should there be two configuration files?
GC> I think there should just be one right?

Nope. The persistence file is separate because it is re-written by the agent.
The main configuration file is usually pretty static.

-- 
Robert Story; NET-SNMP Junkie <http://www.net-snmp.org/>
<irc://irc.freenode.net/#net-snmp>  
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users>

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
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

Reply via email to