I'm trying to monitor about 250 devices with SNMP, using PySNMP version
4. I use the threading.Thread to create a threadpool of 10 threads, so
devices not responding won't slow down the monitoring process too much.
Here comes my problem. When using PySNMP single threaded, every this
goes well; but if I create 10 threads, it all goes awry... It seems
PySNMP is not thread safe? Can anyone elaborate on this? 3 2816
On Mon, Jul 24, 2006 at 02:21:10AM -0700, ro************@gmail.com wrote:
I'm trying to monitor about 250 devices with SNMP, using PySNMP version
4. I use the threading.Thread to create a threadpool of 10 threads, so
devices not responding won't slow down the monitoring process too much.
Here comes my problem. When using PySNMP single threaded, every this
goes well; but if I create 10 threads, it all goes awry... It seems
PySNMP is not thread safe? Can anyone elaborate on this?
What does 'goes awry' mean? Your statement is too vague to be able to help
you figure out your problem.
>
-- http://mail.python.org/mailman/listinfo/python-list
pysnmp has been designed to be MT-safe. Although, I've never used it in
a MT app, so there may be a bug showing up when you do threading...
At its simplest, I'd advise snooping on the wire to make sure you are
querying different devices at the same time and also to see where the
[I assume] bottleneck really is -- is it in a sending or receiving
phase of the query.
If you could show me the code that causes the trouble? ro************@gmail.com писал(а):
I'm trying to monitor about 250 devices with SNMP, using PySNMP version
4. I use the threading.Thread to create a threadpool of 10 threads, so
devices not responding won't slow down the monitoring process too much.
Here comes my problem. When using PySNMP single threaded, every this
goes well; but if I create 10 threads, it all goes awry... It seems
PySNMP is not thread safe? Can anyone elaborate on this?
ro************@gmail.com <ro************@gmail.comwrote:
I'm trying to monitor about 250 devices with SNMP, using PySNMP version
4. I use the threading.Thread to create a threadpool of 10 threads, so
devices not responding won't slow down the monitoring process too
much.
This is surely a job for twisted not threads? You'd be able to poll
all 250 devices at once with twisted...
This might be helpful (haven't tried it myself though) http://twistedsnmp.sourceforge.net/
--
Nick Craig-Wood <ni**@craig-wood.com-- http://www.craig-wood.com/nick This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: WIWA |
last post by:
I have recently installed pySNMP 3.3.2 and use Python 2.2.2. Thanks to
Peter Hansen, I succeeded to install pySNMP properly. I'm not
completely new to SNMP (I know the basics), but I'm new to...
|
by: WIWA |
last post by:
Hi,
I have installed pySNMP. I want to make an application where I read
out all the OIDs of a MIB of a particular device. In other words, I
want to do an SNMPwalk for a certain MIB.
I can do...
|
by: Axel Scheepers |
last post by:
Hi All,
Python is so great. I've been creating a small set of objects to get some
stats from our adsl routers. So far it works great and fast. However, in the
shell script I created over a year...
|
by: Roy Smith |
last post by:
There's been some talk recently about the relative speeds of the various
python SNMP libraries. I just did a little benchmarking, and got some
surprising results.
I downloaded pysnmp-3.4.2 and...
|
by: Roman Suzi |
last post by:
(this is a repost with an addition - probably noone noticed my message first
time)
Hi!
Just to be sure, is email package of Python 2.3 thread-safe or not
(to use, for example, in...
|
by: Philip V Pham |
last post by:
These questions apply to std vector, map, and cout:
I am uncertain of the thread safety for reading/writing
for std templates. I know if all threads are reading
concurrently, it is thread...
|
by: Alexander Fleck |
last post by:
Hi,
I' ve to make a software module thread safe.
I know how to realize that and what' re the main topics of thread safety.
But I don' t know how thread safety can be tested. I read about a test...
|
by: Tom Vandeplas |
last post by:
Hi all,
When using an asynchronous API call (in my case WriteFileEx) in a thread it
seems to become blocking instead of non-blocking (see details below). Can
somebody explain me what is...
|
by: Dave Booker |
last post by:
I have a Thread making a callback to a Form function that alters Form data.
Of course, the debugger is telling me, "Cross-thread operation not valid:
Control 'FormTest' accessed from a thread other...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
| |