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

Modifying SNMP variables

The setany(1Msnmp) 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


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004