Hi Dave,

Thanks for your suggestion.

Loading the internal cache in the 'init_xxx()' routine is not fisable for my 
case, becaues my external data will be updated periodically.
Also the loacl structure needs to be updated periodically.

In my case, do you have any other suggestion?
The time it took to get the external data is really much(about several 
minutes).
So I still try to not get *all* the external data.
If I can get the index values in an incoming request, I can just get one 
entry(row) from outside one time.

Do you agree to this?


Thanks,

永鈦鑫   iTAS Corporation
新竹市水源街75號
NO. 75,Shuiyuan St., Hsinchu City, Taiwan, R.O.C.
Tel:03-5716099 Ext.1208
E-mail:tewen.hs...@itas.com.tw
----- Original Message ----- 
From: "Dave Shield" <d.t.shi...@liverpool.ac.uk>
To: "Tewen Hsieh" <tewen.hs...@itas.com.tw>
Cc: <net-snmp-coders@lists.sourceforge.net>
Sent: Monday, June 08, 2009 7:27 PM
Subject: Re: Could anyone give me some suggestions?


2009/6/8 Tewen Hsieh <tewen.hs...@itas.com.tw>:
> I used "mib2c.iterate_access.conf" to generate my template code for XXX
> table.
> In XXXTable_get_first_data_point(), I use XXXTable_createStructure() to 
> get
> external data and store them in a local structure when this table is
> accessed at the first time. (The external data are all PHY register 
> values.)
> So the agent can response very fast after the first request.
> But the external data I must get at the first time is very huge, the agent
> always timeouts when it still works in XXXTable_createStructure() to get
> external data.
> Could anyone give me some suggestions about resolving this condition?


Why not load this internal cache in the 'init_xxx()' routine, rather than
the get_first hook?   You'll still have the same delay, but it will happen 
when
the agent first starts up, rather then when it receives a request.

Dave 


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to