Re: Being persistent with persistence

2004-08-29 Thread Gary Clark
Ahh. Much appreciated.

Garyc

- Original Message -
From: Robert Story (Users) [EMAIL PROTECTED]
To: Gary Clark [EMAIL PROTECTED]
Cc: Gary Clark [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Saturday, August 28, 2004 7:49 PM
Subject: Re: Being persistent with persistence


 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/.snm
p:
 /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=5047alloc_id=10808op=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


Re: Being persistent with persistence

2004-08-28 Thread Gary Clark
Hello,

Ok I was on the right path. Basically I completely forgot the little trick I
did.

This is what confused me. I have two configuration files both called
snmpd.conf.
One is for persistence and one is for general configuration which is
produced using snmpconf -g basic_setup.
My SNMPCONFPATH was set to the point general at /usr/var/local/share. The
persistence configuration resides in /var/net-snmp.

I was manually inserting my token into the persistence file. Thinking that
it would be
read and my callback function would be called. Idiot, total idiot. The
callback function would only be called if the token resided in the
snmpd.conf file pointed to...yes you get it SNMPCONFPATH.
At some point I must of altered this environment variable to point to
/var/net-snmp and pick up the tokens.

The reason why I am doing this. Basically when the agent restarts I want to
pull the tokens from the persistence and re-create the oids.

The question begs. The SNMPCONFPATH points to the general agent
configuration. Should there be two configuration files?
I think there should just be one right?

Thanks,
Garyc

- Original Message -
From: Gary Clark [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, August 28, 2004 11:39 AM
Subject: Being persistent with persistence


 Hello,

 Ok I messed up somewhere. Just dont know where. I think its an environment
 variable issue?
 I have been using persistence. Extracting tokens and creating oids in my
MIB
 tree and all is well.
 Then I did something which has caused my environment to change. I cannot
get
 persistence to load again.

 Here is what I am doing:

 ./configure --with-mib-modules=psb_test
 make

 Everything builds fine and I can perform set and get requests on the oid.
I
 register the app handler
 and create a function that should be called.

 snmpd_register_config_handler(myFredToken,parse_func,NULL,NULL);


 I manully modify the /var/snmpd.conf to contain:

 myfredToken 1

 I dont see my parse function being called. I enabled trace and saw that
the
 token is getting registered however no callback is made.
 This is probably going to be blatently obvious to the net-snmp gurus,
myself
 a humble novice has been stumped.

 However I think its my configuration environment. Likely SNMPCONFPATH
 environment variable?

 I use snmpconf -g basic_setup. This produces the snmpd.conf configuration.
I
 point the SNMPCONFPATH to /usr/local/share/snmp?

 Is this OK.

 If anybody can shed some light on this blind fellow much appreciated and
 promise to return help if I can.

 Cheers,
 Garyc





 ---
 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=5047alloc_id=10808op=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



---
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=5047alloc_id=10808op=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


Re: Being persistent with persistence

2004-08-28 Thread Users
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=5047alloc_id=10808op=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