[SNMP4J] Need Help/Info reg. INFORMs

Reddy Alok-a22624 alokreddy at motorola.com
Tue Apr 25 09:01:51 CEST 2006


Hi,
    I have basically written a Trap/Inform Handler using SNMP4J. The
requirement is that I should be able to handle 50 INFORMs/second. That
is the Trap/INFORM Handler should be able to receive and send responses
to 50 INFORMs/second. Actually, it seems to work fine but sometimes I
find some INFORMs to which a RESPONSE never goes out. This seems to
occur when I receive more than one INFORM at the same instance of a
hundredth of a milli-second. For example, if I receive an INFORM at
"1.000" sec and then another INFORM at "1.004" sec, then the RESPONSE to
the second INFORM is not being sent out sometimes (that is I do not find
the RESPONSE in the Ethereal Logs where as the code actually seems to
send it).
 
    I am not really sure if I need to do any other setup on the SNMP4J
side. Find below the code that I have written (only the code that I feel
important is being put in here):
 
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------
 
public class SnmpTrapHandler implements CommandResponder, Runnable {
 
    // An SNMP object is being created with a thread pool of size 10,
addCommandResponder(this) is being called on it 
    // and then "listen" method is being called on it.
 
    // processPdu method
    public void processPdu (CommandResponderEvent e)
    {
        if(e.getPDU ().getType() == PDU.INFORM)
        {
                     s_logger.finest("Received PDU of type INFORM");
                     //Send RESPONSE to Inform Request
                     sendAcknowledgement(e);
        }
 
        // Further processing of the event
    }
 
}
 
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------
 
Thanks in Advance,
Alok.
 



More information about the SNMP4J mailing list