On 03/04/2008, Vishal Nandanwar <[EMAIL PROTECTED]> wrote:
> I have created code fro table using mib2c utility. I used following command,
>
>      mib2c -S cache=1 -c mib2c.table_data.conf inputPortTable

So you are using the caching helper - good.
That will definitely.

> 1) Table is created at the time of initialization.

And refreshed whenever the cache is "too old".
(How long is "too old" is efined as part of registering the cache)


>              As my data is in the files and going to change
> frequently I want at every get request its should read the file and
> change/create the table values. How to do this?

Set the cache timeout to 0.

But this will obviously have an impact on the performance of the
agent.   It means that the agent has to re-load the whole table for
*every* individual request.   So when walking a large table,
there will be a lot of unnecessary refreshing of the same data.

I would strongly suggest that you try working with a cache
timeout of 5s or so first.   You may well find that this gives
a better performance while reporting reasonably up-to-date
information.

Note that you can even adjust the cache time while the agent
is running.   That's the beauty of using the cache helper!



> 2) These table values can be set from NMS. I found this is handled by code
> automatically and we don't need to do anything here. But I want to set this
> value in file, so where to put the code to set this value in file?

There should be a routine 'load_inputPortTable'.
This is where you would set up the table values.


> 3) in entry structure there is filed "valid". What is the meaning of this
> filed? and what value we should set in this field?

This is used when creating a row dynamically (via RowStatus
createAndWait/Active requests).       The template code for the
RowStatus column should handle this automatically.
   All you need to do is set this to 1 for rows created via the cache
load mechanism (which should be handled in the template code
anyway, I think).

Dave

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
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