[SNMP4J] a multithread approach

Stefan M smu.23 at web.de
Sun Feb 26 14:25:36 CET 2006


Hello,

   At first I want to thank for this snmp package -- even I do not know 
at the moment how to use it properly:)

   I want to monitor a set of 1000 wlan access points and wrote a little 
visualisation for this. Now I want to connect this visualisation with 
the snmp data and I want to know if my approach is correct.

To retrieve the data:

1. I create one intance of an snmp class during program start like so:
Snmp snmp = new Snmp(new DefaultUdpTransportMapping());

2. I send the pdu as asynchronous message like so:
snmp.send(pdu, target, null, new RespListener());

Therein RespListener() is a class wich implements the ResponseListener 
interface.

3. I set snmp to listen like so:
snmp.listen();

I would do the step 2 for every access point I have (and for every OID I 
want to know about). And then I would do step 3. Is this correct? It 
works for one access point but would it work for 1000?

How can I determine then, which access point send the answer? Do I need 
to remember the request id or is there a way to retrieve the ip? Is 
there a standard way to do it...

Another question: Is there a way to emulate an snmp agent that answers 
my requests (to test) -- i.e. is this the purpose of snmp4jagent?

Thanks for any suggestions.

Stefan







More information about the SNMP4J mailing list