MIB examples

SNMP examples

Commands

Look in the c:\net-snmp\binfolder for the various executables that you can use. The examples in this section use the following commands:

„snmpwalk: Walks through the MIB tree from a specified OID (along the branch).

„snmpget: Gets the value requested for a specified OID object

„snmpset: Sets a value to a specified OID object (must be a Read-Write OID).

Note

 

Chapter 3: MIB descriptions provides a read-write, read-only, or not-accessible designation

 

 

for each MIB object.

 

 

 

The following table shows you some options that you can specify with these commands.

 

 

 

 

 

 

 

 

Option or switch

Description

 

 

 

 

 

 

-v 2c

Indicates that “snmp version 2c", should always be specified when

 

 

 

using the MIBs.

 

 

 

 

 

 

-c

Used to specify the community string on the HP product (by default,

 

 

 

this is set to public).

 

 

 

 

 

 

-m ALL

Indicates that you want to use or refer to ALL the MIBs located at

 

 

 

$MIBDIRS.

 

 

 

 

 

 

-Mpath

Allows you to specify another location for your MIBs.

 

 

 

 

 

 

-Os

Causes the SNMP response to only show the OID name and not the

 

 

 

whole path.

 

 

 

 

 

 

-On

Causes the SNMP response to show the OID numeric value, not the

 

 

 

descriptive name.

 

 

 

 

 

 

i

Integer switch used to indicate whether the following value will be a

 

 

 

"1" or a "0".

 

 

 

 

 

 

o

String switch used to indicate whether the following value will be a

 

 

 

string.

 

 

 

 

 

 

u

Numeric switch used to indicate whether the following value will be

 

 

 

a numeric.

 

 

 

 

2-4

Page 24
Image 24
HP Guest Management Software manual Causes the Snmp response to only show the OID name and not