lights at cix.co.uk
Thu Jun 24 18:54:35 CEST 2004
Les Smithson <lsmithso at NOhare.SPAM.demon.co.uk> wrote in message news:<m3r7s55mv3.fsf at hare.demon.co.uk>...
> >>>>> "Matthew" == Matthew Bell <lights at cix.co.uk> writes:
> Matthew> Hi, I'm looking for a high-performance SNMP manager
> Matthew> toolkit (SNMPv1 / v2, GET / GETNEXT / GETBULK) I can use
> Matthew> with Python on Windows2K/XP.
> Pysnmp is the only 100% pure Python SNMP implementation I'm aware
> of. Perhaps you could address your program's inefficiencies instead?
> What are you doing that's so CPU intensive? SNMP agents/managers that
> I've worked on (admittedly not using Python) were always I/O bound,
> rather than CPU bound.
The application is monitoring 30+ big LAN switches with a large
variety of information being collected from each one. Using UCD-SNMP
then (if we ignore the way it tends to hang sometimes), indeed, I/O is
the limiting factor rather than CPU. The Python code I've written
that deals with all the data amazes me by how relatively little CPU it
consumes (yay for Python!); if I could find a way to get UCD-SNMP to
work reliably in a multi-threaded environment then I'd happily carry
on using that. But the hanging is getting really frustrating as not
even select() seems to be able to catch it. It just hangs.
Using PySNMP rather than UCD-SNMP certainly gets round the random
hanging, but it does make CPU go through the roof.
I'm not actually necessarily looking for a pure Python SNMP toolkit.
To be honest, given the large amounts of SNMP traffic that this
application has to generate, it would make an awful lot of sense to
have the low-level SNMP grunt work done in a C / C++ library and then
have the Python code just deal with the processed OIDs and values.
It's just that I can't find any such library that'll run on Win32 and
that has a convenient Python wrapper. I've got a recollection that I
stumbled across a commercial C++ based SNMP library that came with a
Python wrapper about a year ago, but no amount of googling has found
it again :-(
I have found any number of native COM/.NET/ASP/etc C++ SNMP toolkits
and tried using the Python Win32 extensions to talk to them but I just
don't understand enough about low-level Win32 calls, event handling
etc to get them to work, particularly as the code examples typically
expect you to either be using Visual C++ or Visual Basic.
More information about the Python-list