MultiThread dispatcher

Hello,

I'm using SNMP4J 1.11.2. I use one SNMP instance with multithread
dispatcher (thread pool 20). My manager can be connected to 1500 agents
using snmpv3 over TCP.

I checked that on some occasions, the notifications of a specific agent
can be processed in a different order that the one sent by the agent.
Below one can see an example of such a case. The threadpool name is
"SNMP Dispatcher".

So from this example I can see that notification with sysupTime = 4
days, 0:09:55.97 has reached my manager before the other one with a
earlier time (4 days, 0:09:55.93). I can see also that each notification
reached my manager by a different thread (SNMP Dispatcher.0, SNMP
Dispatcher.1).

The problem is that using an SNMP instance for each agent
(singlethreaded) I can end up with thousands of threads that don't work
most of the time. It's a waste of resources.

My question: is there a way to avoid this issue? (beside using one snmp
instance for each target)
Thanks

KREgards,
RAR

Example:
15:43:47,206 DEBUG SNMP Dispatcher.0 [SNMP] Processing PDU
(Continue reading)

Dong Pan | 6 Oct 2011 18:24
Picon
Favicon

Re: 4

Any type of meds you need is available here:. http://79.96.74.146/sites.friend.php?ahotmailID=10d9
 		 	   		  
namitha | 7 Oct 2011 20:43
Picon

Snmp4j traps - 1000/second

Hi,

I want to support for 1000 traps/second using snmp4j and have been using the
code attached in this mail.
As of now my target is to support atleast 500 traps.

I am new to this and need some help or suggestions in order to get it.

I have heard of thread pooling too for this but dont know where and how
exactly to implement here.

Any suggestions or solutions would be of great help.

Thanks in advance

--

-- 
NAM

package com.tel.Fault;

import java.io.IOException;
import java.net.UnknownHostException;

import org.apache.log4j.Logger;
import org.snmp4j.CommandResponder;
import org.snmp4j.CommandResponderEvent;
import org.snmp4j.MessageDispatcherImpl;
import org.snmp4j.Snmp;
(Continue reading)

Kishan Bora | 10 Oct 2011 03:15
Picon
Favicon

(no subject)

.IMHO it’s the most useful and interesting sites.  http://www.lowicz.spinet.pl/com.friend.php?qucid_friend=50qu2
_______________________________________________
SNMP4J mailing list
SNMP4J <at> agentpp.org
http://lists.agentpp.org/mailman/listinfo/snmp4j
Miroslav Genov | 11 Oct 2011 18:53
Picon

Sending hexadecimal string values (snmp set)

Hello,

I'm encountering a strange issue with snmp4j (2.0.2) when I'm sending snmp
set commands.

When I sent the same command using the standard snmpset I got the right
result. I'm doing the same think that with snmp4j but I'm encountering a bad
response:

mgenov:Huawei_last$ snmpset -v 2c -c evo-wr xx.xx.xx.xx \
1.3.6.1.4.1.2011.6.128.1.1.2.43.1.2.4194312192.4294967295 i 1 \
1.3.6.1.4.1.2011.6.128.1.1.2.43.1.3.4194312192.4294967295 x
"48575443d0bf3004" \
1.3.6.1.4.1.2011.6.128.1.1.2.43.1.7.4194312192.4294967295 s "8245_3" \
1.3.6.1.4.1.2011.6.128.1.1.2.43.1.8.4194312192.4294967295 s "8245_0204" \
1.3.6.1.4.1.2011.6.128.1.1.2.43.1.6.4194312192.4294967295 i 1 \
1.3.6.1.4.1.2011.6.128.1.1.2.43.1.10.4194312192.4294967295 i 1
SNMPv2-SMI::enterprises.2011.6.128.1.1.2.43.1.2.4194312192.0 = INTEGER: 1
SNMPv2-SMI::enterprises.2011.6.128.1.1.2.43.1.3.4194312192.0 = Hex-STRING:
48 57 54 43 D0 BF 30 04
SNMPv2-SMI::enterprises.2011.6.128.1.1.2.43.1.7.4194312192.0 = STRING:
"8245_3"
SNMPv2-SMI::enterprises.2011.6.128.1.1.2.43.1.8.4194312192.0 = STRING:
"8245_0204"
SNMPv2-SMI::enterprises.2011.6.128.1.1.2.43.1.6.4194312192.0 = INTEGER: 1
SNMPv2-SMI::enterprises.2011.6.128.1.1.2.43.1.10.4194312192.0 = INTEGER: 1

Everything is looking fine. When I try to make the same think using snmp4j,
I get the following responses:

(Continue reading)

Frank Fock | 11 Oct 2011 20:02
Favicon

Re: Sending hexadecimal string values (snmp set)

Hello Miroslav,

You should use OctetString.fromHexString("48 57 54 43 d0 bf 30 04", ' ')
to create the OctetString value you set.

Alternatively you can also use
OctetString s = OctetString.fromHexString("48:57:54:43:d0:bf:30:04");

Best regards,
Frank

Am 11.10.2011 18:53, schrieb Miroslav Genov:
> Hello,
>
> I'm encountering a strange issue with snmp4j (2.0.2) when I'm sending snmp
> set commands.
>
> When I sent the same command using the standard snmpset I got the right
> result. I'm doing the same think that with snmp4j but I'm encountering a bad
> response:
>
>
> mgenov:Huawei_last$ snmpset -v 2c -c evo-wr xx.xx.xx.xx \
> 1.3.6.1.4.1.2011.6.128.1.1.2.43.1.2.4194312192.4294967295 i 1 \
> 1.3.6.1.4.1.2011.6.128.1.1.2.43.1.3.4194312192.4294967295 x
> "48575443d0bf3004" \
> 1.3.6.1.4.1.2011.6.128.1.1.2.43.1.7.4194312192.4294967295 s "8245_3" \
> 1.3.6.1.4.1.2011.6.128.1.1.2.43.1.8.4194312192.4294967295 s "8245_0204" \
> 1.3.6.1.4.1.2011.6.128.1.1.2.43.1.6.4194312192.4294967295 i 1 \
> 1.3.6.1.4.1.2011.6.128.1.1.2.43.1.10.4194312192.4294967295 i 1
(Continue reading)

Frank Fock | 12 Oct 2011 23:06
Favicon

MIB Explorer 3 Released

MIB Explorer 3 has been released and is ready for download
from http://www.mibexplorer.com

With MIB Explorer, the AGENT++ Tool Suite is now completely
at version 3.x.

The major new features are:
* Java WebStart support (Java 6 or later)
* Monitors stored in relational databases (PostgreSQL and DB2 are 
supported by default)
* Table View column width auto-save/restore
* Improved manual and online help.

Users who have purchased MIB Explorer 2.x since 2011-04-01
will receive a 3.x license key by E-mail until 2011-10-18.
Users of the AGENT++ Tool Suite can directly download/start
MIB Explorer Pro 3.x and use their existing license key.

The next MIB Explorer release (3.1) will focus on usability enhancements
on the basic browser functions. Feature requests are highly appreciated
and can be sent to support@... The 3.1 release date
is planned for Q1/2012.

Frank Fock
justdoit.pli | 13 Oct 2011 16:58

How to "walk" mib in multi thread environment

Hi Frank:
              I attempt to write a tool to get serval MIB values with hign-performance, if the number of MIB is too big I need
to do that in multi thread environment.  
              I have complete function that "get" mib value with multi thread scene (with
MultiThreadedMessageDispatcher) but I also need "walk" values of mib.  I don't know how to do that. Could
you help me? thanks
              The "get" code is as follows:

public class commonSnmpSynchronousSender {
private ConcurrentHashMap<String, HashMap<String, String>> result = new ConcurrentHashMap<String,
HashMap<String, String>>();
private Snmp snmp;
MessageDispatcher dispatcher;
private String threadPoolName = "default";
private int threadPoolSize = 10;
public commonSnmpSynchronousSender(String threadPoolName, int threadPoolSize) throws IOException{
this.threadPoolName = threadPoolName;
this.threadPoolSize = threadPoolSize;
dispatcher = new MultiThreadedMessageDispatcher(ThreadPool.create(threadPoolName, threadPoolSize),
                        new MessageDispatcherImpl());
snmp = new Snmp(dispatcher,new DefaultUdpTransportMapping());
    snmp.getMessageDispatcher().addMessageProcessingModel(new MPv1());
    snmp.getMessageDispatcher().addMessageProcessingModel(new MPv2c());
    snmp.getMessageDispatcher().addMessageProcessingModel(new MPv3());
snmp.listen();
}
public ConcurrentHashMap<String, HashMap<String, String>> getResult() throws IOException{
((MultiThreadedMessageDispatcher) dispatcher).stop();
snmp.close();
return result;
(Continue reading)

Gerd Raudenbusch | 14 Oct 2011 08:47
Picon
Favicon

Collect V3 traps from multiple notification originators

Hello, all. 

Actually I'm using the westhawk SNMP stack and got a problem (can receive v3-AuthPriv-traps from only one
device because the stack compares the engineId) - so before switching over to SNMP4J I have to solve a
general question because the people from westhawk are pretty sure they didn't do anything wrong. So
here's my question : 
Is it generally possible with SNMPv3 to have agent++ on multiple devices sending v3 encoded traps (with
auth and priv all using the same user and passwords) sending their traps to a network management system
that uses SNMP4J to collect and decode all the traps ? 
Can you please help me to solve this question. 

Thanks in advance 
and best regards, 

--

-- 

Gerd Raudenbusch 
Dipl.  Informatiker (FH) 
Software Development 

Power Plus Communications AG | Am Exerzierplatz 2 | 68167 Mannheim | Germany 
Tel.: +49 621 40165-221 | Fax: +49 621 40165-111 
E-Mai l: g.raudenbusch <at> ppc-ag.de | http://www.ppc-ag.de 

Handelsregister-Nr.: HRB 8853 | Sitz und Registergericht: Mannheim 
Vorstand: Ingo Schönberg (Vorsitzender), Eugen Mayer | Vorsitzender des Aufsichtsrates: Dr. Manfred
Krüper 
_______________________________________________
SNMP4J mailing list
SNMP4J <at> agentpp.org
(Continue reading)

Mike.Holloway | 17 Oct 2011 22:03

Does snmp4j agent support snmp3 contexts? How to configue?

Didn’t see any FAQ on this.

Gmane