DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Configuring the Simple Network Management Protocol (SNMP)

Modifying SNMP variables

The setany(ADMN) command is used to modify the values of variables. Its basic syntax is:

setany node community variable type value

The legal values for the type argument are given in ``setany type values'', along with their corresponding object types. For a complete explanation of these types, refer to RFC 1155.

setany type values

Object type setany type arguments
Integer -i
Octet string -o
Object identifier -d
IP address -a
Counter -c
Gauge -g
Time_ticks -t
Display string -s
Null -n

The following shows an example of using setany to alter the status of an interface. The status is checked before and after the change to verify that the change took place correctly. Changing the status from 1 to 2 marks the interface as ``down'':

Altering interface status

   # getone paris public ifAdminStatus.2
   

Name: ifAdminStatus.2 Value: 1

# setany paris public ifAdminStatus.2 -i 2

Name: ifAdminStatus.2 Value: 2

# getone paris public ifAdminStatus.2

Name: ifAdminStatus.2 Value: 2

See also:



Next topic: Viewing SNMP status
Previous topic: Getting a subset of routing information

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003