xxx_Table_handler() not being called if table is empty.

2012-03-28 Thread Francois Bouchard
Hello list, If empty, the xxx_Table_handler() is not called upon 'get' request from the browser. Unless doing a preload of that table in initialize_table_xxx() function, is there a way to trig the handler at any 'get request'. I'm asking because it is needed to call xxx_Table_load() function

Reload table in xxx_Table_handler()

2012-03-28 Thread Francois Bouchard
Hello list It seems that forcing a cache xxx_table_load() from the handler with a Global table_data variable is not a good idea. When the handler is called, does it hold a copy of the table? Note: cache machanism is disabled. But xxx_Table_load() routine is kept. should I use

Re: xxx_Table_handler() not being called if table is empty.

2012-03-28 Thread Dave Shield
On 28 March 2012 14:49, Francois Bouchard francois.bouch...@mpbc.ca wrote: If empty, the xxx_Table_handler() is not called upon 'get' request from the browser.  Unless doing a preload of that table in initialize_table_xxx() function, is there a way to trig the handler at any 'get request'.

Re: xxx_Table_handler() not being called if table is empty.

2012-03-28 Thread Francois Bouchard
Which framework are you using to build the MIB code? the script used is mib2c.table_data.conf, opt 1) cache data is held externally. But I want to reload the data using xxx_Table_load() only in the handler, so disabled the following: // cache = netsnmp_cache_create(MPBCRMHOSUTABLE_TIMEOUT,

Re: xxx_Table_handler() not being called if table is empty.

2012-03-28 Thread Dave Shield
On 28 March 2012 16:26, Francois Bouchard francois.bouch...@mpbc.ca wrote: Which framework are you using to build the MIB code? the script used is mib2c.table_data.conf, Remember that the basic model for the table_data framework is that the agent holds an internal representation of the table.

Re: xxx_Table_handler() not being called if table is empty.

2012-03-28 Thread Francois Bouchard
You can actually load the column data from within the handler, but at the very least - the helper needs to know the list of valid row indexes beforehand. ok. That's a fundamental design aspect of this particular helper. by helper do you mean the script to build the MIB code? thanks

Regarding System Mib get/set on SysLocation, and SysContact

2012-03-28 Thread Suresh kumar
Hello All, I using net-snmp 7.1,we have get/set operation on system mib like sysName, sysContact and sysLocation.i know that get/set working fine for sysName. and Set operation only work for sysContact and sysLocation if is not configure in snmpd.conf. My Requirement is that .1. What we set

Re: xxx_Table_handler() not being called if table is empty.

2012-03-28 Thread Francois Bouchard
I forgot... But in either case, the table_data model requires the list of valid rows to be known *before* the table-specific handler is called. That's a fundamental design aspect of this particular helper. Is there a hook somewhere where the table could be reloaded just before the handler -

Re: xxx_Table_handler() not being called if table is empty.

2012-03-28 Thread Dave Shield
On 28 March 2012 19:13, Francois Bouchard francois.bouch...@mpbc.ca wrote:   That's a  fundamental design aspect of this particular helper. by helper do you mean the script to build the MIB code? No - I mean the 'table_tdata' code - see 'agent/helpers/table_tdata'. When you register a MIB table

Re: xxx_Table_handler() not being called if table is empty.

2012-03-28 Thread Dave Shield
On 28 March 2012 20:18, Francois Bouchard francois.bouch...@mpbc.ca wrote: Having the timeout period to 0 could also work. If you set the cache timeout to be 0, then the load hook will be called for every single request - yes. Obviously, there's a performance impact here. But if that's what

Re: Regarding System Mib get/set on SysLocation, and SysContact

2012-03-28 Thread Dave Shield
On 28 March 2012 19:44, Suresh kumar skjaiswa...@hotmail.com wrote: But unable find that how its pass for snmpget and how this value are set when we do snmpset operation Both SET and GET requests are handled by a generic watched scalar mechanism. This specifies an internal buffer which