Kathy, 
I just finished testing. This "fix" fixed my problem. My cache_load is
finally invoked. Maybe MFD is more memory intensive but if you don't mind
the extra memory, this would be a way to get un-stuck in your present
situation.

   cache->flags |=
        (NETSNMP_CACHE_DONT_AUTO_RELEASE | NETSNMP_CACHE_DONT_FREE_EXPIRED
        | NETSNMP_CACHE_DONT_FREE_BEFORE_LOAD | NETSNMP_CACHE_PRELOAD |
        NETSNMP_CACHE_AUTO_RELOAD | NETSNMP_CACHE_DONT_INVALIDATE_ON_SET);
Kavita


On 6/4/10 12:28 PM, "Kathy McLeod" <[email protected]> wrote:

> I tested with various flags.  Here is my code:
> 
>  /***********test code *****/
> // use these 3 for check table flag before freeing and reloading
>     cache->flags |= NETSNMP_CACHE_DONT_FREE_EXPIRED;
>     cache->flags |= NETSNMP_CACHE_DONT_AUTO_RELEASE;
>     cache->flags |= NETSNMP_CACHE_DONT_FREE_BEFORE_LOAD;
> // use this one for set commands
>     cache->flags |= NETSNMP_CACHE_DONT_INVALIDATE_ON_SET;
> // testing this one - periodic auto-refresh
> //    cache->flags |= NETSNMP_CACHE_AUTO_RELOAD;
>     /* end test code ********/
> 
> I did not use the MFD mib2c because it was posted in another thread that it
> is a poor performer so our code may be different.  I used
> mib2c.table_data.conf.  FYI.
> 
> 
> Kathy McLeod
> Dept S82  CCB - SNMP
> IBM Rochester, MN
> (507) 253-4803
> 
> 
>                  
>              Kavita
>              Raghunathan
>              <kavita.raghunath                                          To
>              [email protected]>          Kathy McLeod/Rochester/i...@ibmus
>                                                                         cc
>              06/04/2010 12:00          Wes Hardaker
>              PM                        <[email protected]>,
>                                        net-snmp users
>                                        <[email protected]
>                                        et>
>                                                                    Subject
>                                        Re: Cache load does not get called
>                  
>                  
>                  
>                  
>                  
>                  
> 
> 
> 
> 
> In my case reload flags were not set. NETSNMP CACHE RELOAD. See if
> that helps. It should be set at the bottom of the function
> container_init. See example in if-mib. I'm trying it out now.
> 
> 
> 
> On Jun 4, 2010, at 9:51 AM, "Kathy McLeod" <[email protected]> wrote:
> 
>> I am having many problems with the cache load/reload code, which I
>> have
>> explained in previous notes.  One thing is that the only command
>> that load
>> gets called for is snmpget.  See my previous posts for other details
>> (altho
>> there has been no resolution).
>> 
>> 
>> Kathy McLeod
>> Dept S82  CCB - SNMP
>> IBM Rochester, MN
>> (507) 253-4803
>> 
>> 
>> 
>>             Kavita
>>             Raghunathan
>> 
>> <kavita.raghunath                                          To
>>             [email protected]>          Wes Hardaker
>>                                       <[email protected]>
>>             06/03/2010
>> 04:36                                           cc
>>             PM                        net-snmp users
>>                                       <net-snmp-
>> [email protected]
>>                                       et>
>> 
>> Subject
>>                                       Re: Cache load does not get
>> called
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> You were correct. 1) was true. I killed other excess snmpd
>> processes. Now
>> init is called. I notice that the cache_load function is registered
>> correctly, but still not called.
>> 
>> Any other ideas ?
>> Kavita
>> 
>> 
>> On 6/2/10 10:35 PM, "Wes Hardaker" <[email protected]>
>> wrote:
>> 
>>>>>>>> On Wed, 2 Jun 2010 16:57:58 -0500, Kavita Raghunathan
>>>>>>>> <[email protected]> said:
>>> 
>>> KR> Does this mean I need to update a conf file ? Please let me
>>> know -
>>> 
>>> That means that the transport your trying to opened can't be opened.
>>> 
>>> If you're not specifying a transport:
>>> 
>>> 1) If you're running as root then there is likely an snmp agent
>>> already
>>>   running on port 161
>>> 2) If you're running as yourself then you don't have permission to
>>> open
>>>   a service on port 161 and you need to run it as root, or choose a
>>>   different transport address to open it on.
>>> 
>>> You can specify a transport address by appending "udp:9161" (for
>>> example) to the end of the snmpd command line arguments.
>> 
>> 
>> ---
>> ---
>> ---
>> ---------------------------------------------------------------------
>> 
>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>> lucky parental unit.  See the prize list and enter to win:
>> http://p.sf.net/sfu/thinkgeek-promo
>> _______________________________________________
>> 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
>> 
>> 
> 
> 


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
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