[Twisted-Python] twisted pysnmp status
daedalus at eigenmagic.com
Mon Apr 2 02:07:03 EDT 2007
On Fri, 2007-03-30 at 12:57 -0400, Mike C. Fletcher wrote:
> Justin Warren wrote:
> > The performance of PySNMP (many years ago) was the main reason we wrote
> > libsnmp; PySNMP seemed to have been written from a very CompSci
> > perspective with full abstract ASN.1 model that gets subclassed to SNMP
> > via many steps, all of which slow it down. We went for a more
> > engineering approach, hardcoding lookup tables for values that never
> > change for the specific ASN.1 instanciation that is SNMP, for example.
> > libsnmp isn't integrated into twisted, though we do use it with twisted
> > with great success in seafelt; there has been some interest in
> > integrating libsnmp with twisted in recent times. libsnmp also lacks
> > SNMPv3 support, only because we haven't had a need to add it yet, but
> > this means it probably doesn't meet your needs.
> Actually, would meet our client's needs well enough. SNMPv3 isn't a
> requirement, just a small nicety for them.
Neato. That was our approach also, given the relatively small number of
devices, etc. that implement SNMPv3 and the development effort required.
It will get added when there is sufficient need.
> > However, I am interested in both of these goals: twisted integration,
> > and SNMPv3 support, so perhaps if there enough people interested in such
> > an outcome we could work together to achieve it?
> Looking over your code it seems like it would be fairly easy to make it
> an option in TwistedSNMP. Currently TwistedSNMP has an abstraction
> point that allows regular or speed-enhanced PySNMP to be used. By the
> look of it a very simple wrapper module would let libsnmp provide the
> (small set of) features we use (basically just encode/decode and
> translation of result values to/from Pythonic values with a few "type"
> operations as well (OID, EndOfMibView, that kind of thing)).
That should certainly be fairly simple with libsnmp, yes.
> BTW, I notice that none of your code uses GetBulk (though you define
> it)? Bulk operations were a *huge* speed win for our application.
> Hopefully you're doing it in your real-world code.
Not that I recall, probably because we haven't hit a speed hurdle that
would be solved by using it thus far. We've had more issues with SNMP
bugs on remote devices, such as certain brands of wireless router
crashing when polled with multi-variable SNMP packets. :)
> Anyway, I'll see if there's any interest from the customer in trying out
> libsnmp with the code-base. That would let me take company time to work
> on integrating it into TwistedSNMP. They almost certainly don't care
> enough to have it do v3 operations, but raw speed on v2 operations is
> something they may care about enough to pay for a few hours of work.
Cool. Let me know how you get on.
Justin Warren <daedalus at eigenmagic.com>
More information about the Twisted-Python