Re: cache problems with table data mib2c

Kathy McLeod <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <OF7EAA8BD5.40EBEC7B-ON86257745.004EB958-86257745.004F129D@us.ibm.com>
Ah.  I thought there would only be one load per command (like snmptable),
not for every get that is happening.  I think I will avoid the -1 setting.

Thanks.

Repeat question from previous note (in case I go with the autounload option
for some tables) -


-- Re this excerpt from the cache_handler documentation page:

xxx - method to prevent cache from expiring while a request is being
processed (e.g. delegated request). proposal: set a flag, which would be
cleared when request finished (which could be acomplished by a dummy data
list item in agent req info & custom free function).

Has this been implemented, or will it be in the near future?  Thanks.


Kathy McLeod



                                                                           
             Dave Shield                                                   
             <D.T.Shield@liver                                             
             pool.ac.uk>                                                To 
             Sent by:                  Kathy McLeod/Rochester/IBM@IBMUS    
             dave.shield@googl                                          cc 
             email.com                 net-snmp users                      
                                       <[email protected] 
                                       et>                                 
             06/17/2010 03:03                                      Subject 
             AM                        Re: cache problems with table data  
                                       mib2c                               
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




On 16 June 2010 20:14, Kathy McLeod <[email protected]> wrote:
> Problem 2:  the -1 setting is not working for me for some of the
commands.

"for some of the commands" is a bit vague.
Can you be more specific?

A test such as:
    $ snmpgetnext LLDP-MIB::lldpPortConfigAdminStatus ; \
       snmpgetnext LLDP-MIB::lldpPortConfigAdminStatus ; \
       snmpgetnext LLDP-MIB::lldpPortConfigAdminStatus ; \
       snmpgetnext LLDP-MIB::lldpPortConfigAdminStatus

works as expected:

LLDP-MIB::lldpPortConfigAdminStatus.5 = INTEGER: rxOnly(2)
LLDP-MIB::lldpPortConfigAdminStatus.9 = INTEGER: rxOnly(2)
LLDP-MIB::lldpPortConfigAdminStatus.13 = INTEGER: rxOnly(2)
LLDP-MIB::lldpPortConfigAdminStatus.17 = INTEGER: rxOnly(2)

showing that the cache is being reloaded for every request,
with the index values increasing automatically.


Now that index behaviour might well confuse a command that ends up
sending multiple SNMP requests (such as snmptable or snmpbulkwalk),
since the list of valid rows is changing under its feet.
   And a command such as "snmpwalk" (or "snmptable -CB") relies
on reaching the end of the table, and moving on the next one.  Which
will never happen in this case, so the command will run indefinitely.

But that's a consequence of the re-indexing in your dummy load command.
If you replace this with a fixed allocation
     "for(i=0; i<4; i++)"  instead of  "for(i=j; i<j+4; i++)"
            then everything should work OK.

Dave



------------------------------------------------------------------------------
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
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.