[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]


    Search the Q&A Archives


Hi, Do you know iReasoning? It's a library for SNMP...

<< Back to: comp.protocols.snmp SNMP FAQ Part 1 of 2

Question by fad
Submitted on 3/16/2004
Related FAQ: comp.protocols.snmp SNMP FAQ Part 1 of 2
Rating: Not yet rated Rate this question: Vote
Hi,

Do you know iReasoning?

It's a library for SNMP written with JAVA.

I wan'tto know what library is better: iResoning, Dart, AdventNet or another...?

I not succeed in writing a program (iReasoning)that send Snmp Get:

try
       {
      
        _host = "a.a.a.a";//@IP for exemple a.a.a.a
        _port = 161;
        _oids = new String(".1.3.6.1.2.1.1.2.0");
        SnmpOID oo = new SnmpOID(_oids);
        _community = "public";
        _version = SnmpConst.SNMPV2;
        
        SnmpSession session = new SnmpSession (_host, _port, _community, _community, _version);

           session.loadMib2();

           session.setTimeout(10000);
           session.setRetries(0);
    SnmpPdu retPdu =  session.snmpGetRequest(oo);
           SnmpVarBind[]  vblist = new SnmpVarBind[oo.getLength()];
           int nb = retPdu.getVarBindCount();

           for ( int i = 0; i < nb ; i++)
           {
             vblist[i] = retPdu.getVarBind(i);
            SnmpDataType  n = vblist[i].getName();
           SnmpDataType  v = vblist[i].getValue();
            System.out.print(n.toString());
         System.out.print("\t"+v.toString()+"\n");
           }

                 session.close();
       }
       catch(TimeoutException timeout)
       {
           System.out.println( "time out");
           System.exit(0);
       }

Usually the exception "time out" is displayed!

Thanks and A+,


Answer by iReasoning Support
Submitted on 4/6/2004
Rating: Not yet rated Rate this answer: Vote
We have example code showing how to implement SNMP operations, such as GET, GET-NEXT, GET-BULK, WALK, etc. You can create your own program based on those example code.
Please check out

SNMP-GET:
http://ireasoning.com/javadocs/examples/snmp/snmpget.java.html

Others:
http://ireasoning.com/javadocs/examples/snmp/AllClasses.html

Please contact us directly at support(AT)ireasoning.com if you have any questions.
Thanks.

iReasoning Support

 

Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.


Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.

 

FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

 

<< Back to: comp.protocols.snmp SNMP FAQ Part 1 of 2


[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.