Skip navigation.
Downloads | Product Documentation | Support

WebLogic Server Command Reference

## snmpget

Retrieves the value of one or more object instances. This command does not accept OIDs for object types.

### Syntax

>     java snmpget [-d] [-v (v1,v2)] [-c snmpCommunity] [-p snmpPort]
>                  [-t timeout] [-r retries] host object-instance-OID
>                  [object-instance-OID]...

Argument | Definition
--- | ---
`object-instance-OID` [`object-instance-OID`]... | The object ID of an object instance. This command does not accept OIDs for object types. Start the value with '.'; otherwise, references are assumed to be relative to the standard MIB, not the WebLogic Server MIB.

### Example

The following example retrieves the value of the `serverRuntimeState` and `serverRuntimeListenPort` attribute instances for the Administration Server.

>     java snmpget localhost .1.3.6.1.4.1.140.625.360.1.60.32.102.100.48.98.101.102.100.99.102.52.98.
>     97.48.48.49.102.57.53.51.50.100.102.53.55.97.101.52.56.99.99.97.99
>     .1.3.6.1.4.1.140.625.360.1.35.32.102.100.48.98.101.102.100.99.102.52.
>     98.97.48.48.49.102.57.53.51.50.100.102.53.55.97.101.52.56.99.99.97.99

If you invoke this command from a computer that is running the example MedRecServer, the command returns output similar to the following:

>     Response PDU received from /127.0.0.1, community: public
>     Object ID:
>     .1.3.6.1.4.1.140.625.360.1.60.32.102.100.48.98.101.102.100.99.102.52.
>     98.97.48.48.49.102.57.53.51.50.100.102.53.55.97.101.52.56.99.99.97.99
>     STRING: RUNNING
>     Object ID:
>     .1.3.6.1.4.1.140.625.360.1.35.32.102.100.48.98.101.102.100.99.102.52.
>     98.97.48.48.49.102.57.53.51.50.100.102.53.55.97.101.52.56.99.99.97.99
>     INTEGER: 7001

# Commands for Testing Traps

Table 6-3 is an overview of commands that generate and receive traps for testing purposes.

Table 6-3 Overview of Commands for Retrieving Information about WebLogic Server

Command | Description
--- | ---
`snmpv1trap` | Constructs an SNMPv1 trap and distributes it to the SNMP manager or trap daemon that is running on the specified host and listening on the specified port number. See snmpv1trap.
`snmptrapd` | Starts a daemon that receives traps and prints information about the trap. See snmptrapd.