On 3 August 2010 09:04, Alexander King <new...@foxmail.com> wrote:
> I want to the init_uit routine can get data periodically

The "init_xxx"  routine is called *once* to set up the module,
when the agent first starts  That's what the word initialise means.
It will not be called repeatedly, and is not the right place to
handle (re-)loading data.

> Would you give me some hits?

Look at using the cache helper.

If you run 'mib2c -Scache=1  mib2c.iterate.conf   myTable'
    then this should generate a suitable template.

I don't think the scalar mib2c template has a similar option,
but you can always apply the same techniques there.

As regards generating notifications, it would probably be
more sensible to either pass the relevant data into the
routine that generates the trap.   Or else have this routine
refresh the cached data itself.
   There's no point in re-loading the data just in case the
agent might possibly need to send a trap

Dave

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to