Hi,

Comments inline..

----- Original Message -----
From: Robert Story (Coders) <[EMAIL PROTECTED]>
To: "Karthikeyan N" <[EMAIL PROTECTED]>
Subject: Re: regarding agent implementation
Date: Tue, 12 Oct 2004 15:07:38 -0400

> 
> On Tue, 12 Oct 2004 18:40:50 +0530 Karthikeyan wrote:
> KN> 1. I have some api's about the mib data which I need to call in a common
> KN> place in a loop so that the current data will get updated frequently.
> 
> This can be done with a netsnmp_cache helper. For examples, see the following
> mib modules (or grep through the code for 'netsnmp_cache'):
> 
>       agent/mibgroup/agent/nsCache.c
>       agent/mibgroup/mibII/tcpTable.c
>       agent/mibgroup/mibII/tcp.c
> 
> You might want to extract the cache_helper from 5.2, which will allow you to
> have the cache refreshed periodically. Otherwise, you can use a timer in 5.1.2
> to achieve a similar effect.
> 

Please elaborate in detail about these examples. I am not getting it properly. I 
searched for the code netsnmp_cache in nsCache.c file. This strcuture is used to 
retrieve the information for this table. But, where we are actually filling this 
structure with datas. For tcpTable example, this netsnm-_cache is called as a 
paramenter for tcpTable_load but never used. 



> KN> the first time, data should be stored in the agent memeory for all the
> KN> tables when we start the agent ( as like snmpd.conf) . Then it should
> KN> update the latest data after a certain time interval delay.
> 
> Then you want to look into the persistent store routines. You can find an
> example in
> 
>       agent/mibgroup/disman/mteTriggerTable.c
> 
> You'll need to add a timer to periodically call the persistent store callbacks.

Yes. you are correct and we can do it like that. But I need to catch all the datafor 
all the tables at one place and use it whenever i need it. But, these data should get 
updated at regular intervals. If I call anything inside init() method, then during 
agent startup it will retrieve the data, but then init() method will never b call 
again. So, I cannot fetch the current data in regular intervals. is there any function 
which calls in loop throughtout the snmpd is running? 


Thanks for your help.

Regards,
Karthik. N
-- 
______________________________________________
IndiaInfo Mail - the free e-mail service with a difference! www.indiainfo.com 
Check out our value-added Premium features, such as an extra 20MB for mail storage, 
POP3, e-mail forwarding, and ads-free mailboxes!

Powered by Outblaze


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to