[SNMP4J] UsmStatsnotintimewindow Report

Frank Fock fock at agentpp.com
Tue Feb 26 18:03:46 CET 2008


Hi,

You should read the SNMPv3 RFCs - particularly
about the boot counter. Then use it and
the notInTimeWindow reports will most likely
disappear.

Best regards,
Frank

jones vinu wrote:
> Hi all,
>    
> I have used the below code to create snmp instance in
> my factory class similar to approach in tool
> snmpRequest since security protocol is a singleton, 
> Do we need to share the Usm between session.I get an
> snmp report UsmStatsnotinwindow not very frequently in
> my application. Is this due to the way USM instance is
> used.
> 
>  public Snmp getSession() {
> 
>         // Create the session
>         Snmp session;
>         try {
>             UdpTransportMapping transportMapping = new
> BlockingUdpTransportMapping(m_executor);
>            
> transportMapping.setAsyncMsgProcessingSupported(false);
> // Disable it to get performance
>             MessageDispatcher mtDispatcher = new
> MessageDispatcherImpl();
>    
>             mtDispatcher.addMessageProcessingModel(new
> MPv3());
> 
>         
>            
> SecurityProtocols.getInstance().addDefaultProtocols();
> 
>            
>             session = new Snmp(mtDispatcher,
> transportMapping);
> 
>             USM usm = new
> USM(SecurityProtocols.getInstance(),
>                     new
> OctetString(MPv3.createLocalEngineID()), 0);
>            
> SecurityModels.getInstance().addSecurityModel(usm);
> 
>             session.listen(); // start listening for
> requests
>             TimeoutModel timeoutModel =
> m_retriesStrategy.getTimeoutModel(); 
>             session.setTimeoutModel(timeoutModel);
> 
>         } catch (SocketException e) {
>             m_log.error("SocketException creating the
> SNMP session: " + e.getMessage(), e);
>             throw new
> SnmpException(SnmpException.SnmpInternalError);
>         } catch (IOException e) {
>             m_log.error("IOException creating the SNMP
> session: " + e.getMessage(), e);
>             throw new
> SnmpException(SnmpException.SnmpInternalError);
>         }
>         return session;
>     }
> 
> Snmp session = m_factory.getSession();               
> session.getUSM().addUser(getSecurityName(),getUsmUser());
> 
> 
> Thanks & Regards
> Jones
> 
> 
>       ____________________________________________________________________________________
> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
> 
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list