BEA Logo BEA WebLogic Server Release 5.0

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

SNMP Agent Command Line Applications

The WebLogic Server SNMP Agent distribution includes several basic SNMP command line applications which will allow you to execute individual SNMP requests.

Each of the following examples assumes that you have set up a WebLogic cluster running at the url t3://www.mycompany.com:7001 and you have started the WebLogic SNMP Agent on host snmp.mycompany.com using the following command:
java weblogic.SNMPAgent -serverURLs t3://www.mycompany.com:7001 -password foo

For additional information on these applications, please visit the AdventNet website.

snmpget

This application allows you to manually get information about one or more specific objects from the agent.
Snmpget has the following syntax:
java snmpget [-p snmpPort] [-d] [-c snmpCommunity] [-t timeout] [-r retries] host OID [OID...]
Arguments:
-p <snmpPort>
The port on which the agent is listening for SNMP requests.
Default = 161
-d
Turn on debug output.
-c <snmpCommunity>
The community string for the community to which the agent is restricted.
Default = "public".
-t <timeout>
Request timeout, milliseconds.
Default = 5000.
-r <retries>
Number of retries.
Default = 0.
<host>
The dns name or ip address of the host where the snmp agent is running.
<OID > [OID...]
The object id of the snmp variable of interest.
This should start with a '.'; otherwise, references are assumed to be relative to the standard mib, not the WebLogic Server mib.
Example:
java snmpget localhost .1.3.4.1.6.1.140.600.20.1.10.10.115.116.97.110.100.97.108.111.110.101.8.109.121.115.101.114.118.101.114

snmpgetnext

This application allows you to manually get information from the agent.
Snmpgetnext has the following syntax:
java snmpgetnext [-p snmpPort] [-d] [-c snmpCommunity] [-t timeout] [-r retries] host OID [OID...]
Arguments:
-p <snmpPort>
The port on which the agent is listening for SNMP requests.
Default = 161
-d
Turn on debug output.
-c <snmpCommunity>
The community string for the community to which the agent is restricted.
Default = "public".
-t <timeout>
Request timeout, milliseconds.
Default = 5000.
-r <retries>
Number of retries.
Default = 0.
<host>
The dns name or ip address of the host where the snmp agent is running.
<OID > [OID...]
The object id of the snmp variable of interest.
This should start with a '.'; otherwise, references are assumed to be relative to the standard mib, not the WebLogic Server mib.
Example:
java snmpgetnext localhost .1.3.4.1.6.1.140.600.20.1.10

snmptrapd

This application allows you to test receiving traps from the agent.
Arguments:
-d
Debug output
-p <snmpPort>
The port on which the manager will listen for traps. This should be the same as the port on which the agent is sending traps.
Default = 162
-c <snmp-community>
Sets the community for which the program interprets and prints traps.
Default = "public".
Example:
You can test receiving a trap by starting the trap daemon as follows:
java snmptrapd snmp.mycompany.com .1.3.4.1.6.1.140.600.20.1.10 java snmptrapd Once the trap daemon is running, start a server, then start the WebLogic SNMP agent. The daemon should report a trap for the server up condition. Shut down or kill the server. The daemon should report appropriately. When you restart the server; the daemon should report a server cold start.

snmpv1trap

This application allows you to generate a trap. It may be used to see if the manager receives the information.
Snmpv1trap has the following syntax:
java snmpv1trap [-p snmpPort] [-d] [-c snmpCommunity] host enterprise agent-addr generic-trap specific-trap timeticks [OID type value]
Arguments:
-d
Debug output
-p <snmpPort>
The port on which to send the trap. This should be the same port the manager is listening for traps.
Default = 162
-c <snmp-community>
String to set the community to use in the generated trap.
Default = "public".
Example:
You can generate a trap to test the connection to the manager as
$ java snmpv1trap snmp.mycompany.com .1.3.4.1.6.1.140.600.20.1.10 java snmpv1trap snmp.mycompany.com .1.3.4.1.6.1.140.600 snmp.mycompany.com 6 10 1000
This generates a server up trap with no variable values.

snmpwalk

This application uses a series of getnext commands to retrieve information from the agent.
Snmpwalk has the following syntax:
java snmpwalk [-p snmpPort] [-d] [-c snmpCommunity] [-t timeout] [-r retries] host OID
Arguments:
-p <snmpPort>
The port on which the agent is listening for SNMP requests.
Default = 161
-d
Turn on debug output.
-c <snmpCommunity>
The community string for the community to which the agent is restricted.
Default = "public".
-t <timeout>
Request timeout, milliseconds.
Default = 5000.
-r <retries>
Number of retries.
Default = 0.
<host>
The dns name or ip address of the host where the snmp agent is running.
<OID > [OID...]
The object id of the snmp variable of interest.
This should start with a '.'; otherwise, references are assumed to be relative to the standard mib, not the WebLogic Server mib.
Example:
You can query the entire server table as
java snmpwalk snmp.mycompany.com .1.3.4.1.6.1.140.600.20

 

Copyright © 2000 BEA Systems, Inc. All rights reserved.
Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.
Last updated 1/02/2000