Hi Nigel,
Your setup is absolutely fine and the recommended one for that task.
Have you checked that the agent isn't the problem?
Agents (except AGENT++ and SNMP4J-Agent based) are often single
threaded and many do not implement thread safe lexicographic ordering
correctly.
Also check the timeout values, because the agent will need more than
twice the time if polled concurrently from two threads (if not
multi-threaded).
Best regards,
Frank
Am 19.06.2014 19:32, schrieb Nigel Thomas:
Hi
I have a system with multiple threads getting different SNMP subtrees from
the same target server concurrently using TreeUtils.getSubtree. One thread
alone seems to work exactly as expected, but when a second thread starts up
the two get confused; the first table receives no data.
Clearly I am having some sort of thread safety problem - but with which
object/method? I am using
- a singleton instance of Snmp
- a single instance of CommunityTarget (for each monitored server -
currently just localhost)
- therefore a single instance of TransportMapping - a
DefaultUdpTransportMapping; I have tried
setAsyncMsgProcessingSupported(true)
- a separate instance of TreeUtils per thread
- SNMPv2
- snmp4j-2.3.0
Any thoughts would be very welcome
TIA
Nigel
_______________________________________________
SNMP4J mailing list
[email protected]
https://oosnmp.net/mailman/listinfo/snmp4j
--
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax: +49 7024 8688231
_______________________________________________
SNMP4J mailing list
[email protected]
https://oosnmp.net/mailman/listinfo/snmp4j