On 11 March 2011 02:41, sunaina mangla <[email protected]> wrote:
> 1. What mib2c configuration file to use with scalar and tabular. (
> given the fact they are with other process).

The scalar objects should be generated using 'mib2c.scalar.conf'
This is really the only template designed for handling scalar objects.


> 2.  Do I need to register a callback function for accessing scalar
>    objects which in turn call the IPC API or I can cache the data on SNMP
>    Agent. Does net-snmp provide any caching for scalar data which
>    periodically fetch the data from other process.?

Registering a scalar object includes specifying the callback function
which is invoked whenever a request for that object is received.

You can either call the IPC API directly from within the handler
function (to retrieve the corresponsing value on demand).
Alternatively, you can insert a cache helper within the handler
chain.   This would normally call the 'load' hook when necessary
(which would then invoke your IPC APIs),  but this could also be
set to automatically re-load the cache on a regular basis.


> 3  What about tables? How should I go about them ?
>     Do I also need to cache them?

There are a variety of table-based mib2c templates you can use,
either with or without caching.   Personally, I tend to use the
'mib2c.table_data.conf' template,  but 'mib2c.iterate.conf' or
'mib2c.mdf.conf' might also work for you.
   Try them out, have a look at the code that's produced, and
use whatever you feel most comfortable with.

With most of these, running  "mib2c -S cache=1 ...." will pull
in the cache helper support.


> 4. Any other good design which I should consider ?

If you are modelling the MIB from scratch, think about how
you expect the tables to be used - and hence how best to
structure them.   A good choice of index may help avoid
client applications having to search the table every time.
Remember that the MIB table structure doesn't *need* to
match the underlying data - if there's good reason to do
otherwise.
   You can even have more than one view of the same
data, if this would be useful.  (In which case, it's probably
worth looking at using a shared cache for both)


Dave

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
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