[SNMP4J] SNMP examples...

Frank Fock fock at agentpp.com
Fri Apr 21 19:52:36 CEST 2006


Hi Evan,

There are currently no other examples that I am aware of.
The 2nd edition of "Essential SNMP" by Kevin Schmidt
has a brief tutorial and examples for SNMP4J.

Best regards,
Frank

Evan Fraser wrote:
> Hey folks,
>  
> I'm new to the SNMP4J API, and SNMP itself and would like some guidance here.  The windows 2K machine runs the SNMP4J API with jdk1.5.
>  
> In using the tools available in SNMP4J I've managed to receive trap msgs and get msgs from a cisco device.  This can be accomplished using commands like:
> snmp4j -v 1 -c <communityName> -Ow <ipAddress>
> or
> snmp4j -v 1 -c <communityName> -p GET <ipAddress> "1.3.6.1.2.1.1.5.0"
>  
> Next, I found a java version of the snmp4j_tools/snmp4j.exe within the java source tree which operates the same way.  Operationally its the same:
> java -classpath lib/log4j-1.2.9.jar;. org.snmp4j.tools.console.SnmpRequest -v 1 -c <communityName> -Ow <ipAddress>
>  
> Looking through that source code I admit it doesn't make the whole coding structure too obvious.  
>  
> Does anyone have some simple source code that can accomplish the same basic operations as this command line?  Indeed, would it be possible for SNMP4J to post a list of example sources that we can all use? or is there a location for such example source code that I'm not aware of?  If so can someone point me to this code!?
>  
> Thank you in advance,
>  
> Evan Fraser
>  
> 
> 
> Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
> _______________________________________________
> 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