Il 21/09/2012 14:15, Giuseppe Modugno ha scritto: > Il 21/09/2012 13:07, Dave Shield ha scritto: >> On 21 September 2012 08:23, Giuseppe Modugno <[email protected]> >> wrote: >>> Another idea would be the use of caching data helper, but I don't if it >>> could be a real solution. Consider that many variables accessed from the >>> serial bus are analog signals (voltages, currents, ...) and they may >>> change frequently over time, so the cache timeout period could be around >>> 100-500ms, no more. Usually the user polls the agent every 1-10s with >>> multiple-variables requests, so the serial bus access won't be avoided. >> Using a cache with a very low timeout (say 1s) would probably be the >> simplest approach here. Processing the first varbind in each query >> would trigger the cache reload (and hence the serial bus access). >> Subsequent varbinds within the same request could then use this >> cached datam thus avoiding the serial delays (as well as reporting >> consistent values - all retrieved via the same serial bus query). >> >> By the time of the next poll, the cache would be stale, so the process >> would begin again. > Thank you for your answer, but I don't think this could be a good > solution in my case. > > Your solution could work if I could retrive all the managed variables in > a single serial > bus access, but this is not the case. Consider that the managed > variables are about > 200 or even more, and the protocol on the serial bus provides the > possibility to ask > for just *some* variables (from 1 to 20). > > I only see the possibility to prepare and send a single requests on the > serial bus for > the same variables requested in the PDU. If the number N of requested > variables are > more than 20 (however I don't think this could be a frequent case), I > can send N / 20 > requests on the serial bus.
I'm stuck yet on this point. I tried to avoid serialization without success (my handler function is called many times, one for each variable in the variable bindings request). Someone can help me pointing to the right direction? ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
