On Wed, 10 Nov 2010 17:01:37 +0200 Timo wrote:
TT> Looking at agent/mibgroup/ip-mib/data_access/arp_linux.c it's doing
TT> snapshot dumps from the kernels tables, and apparently higher layers are
TT> doing the caching.

Yep. You could set the cache timeout lower if you wanted fresher data, but
there will always be that window where the cache could be a little stale.

TT> Now, I'm asking which is better, and if there's any existing example
TT> code (so I can fix the arp_linux.c):
TT> 
TT>  1) Dynamically listen Linux netlink events and add/delete/update
TT> entries on the snmpd's copy of ARP table?
TT> 
TT> -or-
TT> 
TT>  2) On request to specific IP-address (specific MIB entry with IP
TT> address part of the request OID), request the kernels for up-to-date
TT> information on that specific IP-address and dynamically create the result?

I'd vote for 2. You'd just have to disable the cache reload at the higher
levels (there are some flags that can be set when the cache is created) and
keep the cache consistent via netlink.

There is already some code in net-snmp that is using netlink grep should help
your find where that is. just make sure that you are using the agent's main
select loop to monitor the netlink socket.

If the code was configurable at runtime, that would be ideal. People who
aren't monitoring/using the arp module might not want the overhead of an
unused cache being constantly updated.

------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to