setany(1Msnmp)


setany -- retrieve and set objects in an SNMP entity

Synopsis

setany [-f defn_file] [-T timeout] entity_addr community_string
object_name -{i | o | d | a|c | g | t | s | n} value] ...

Description

The setany command does a GET request to get the current values of the objects to be set, then performs a SET request on the objects.

Options

The options and arguments are:

entity_addr
The entity address can be either an IP address or entity name (if name-to-address resolution is enabled).

community_string
The community string used must be valid on the given entity. On UnixWare, community strings are kept in /etc/netmgt/snmpd.comm.

-f defn_file
The argument is used to specify a file containing the mosy(1Msnmp) and post_mosy(1Msnmp) compiled list of object names and their numeric Object Identifiers, in addition to the objects in the standard MIB. This allows the user to dynamically augment the number of objects that can be recognized by the management utility.

-T timeout
Specifies the number of seconds the command will wait for a response from the entity specified by address. If not specified, this defaults to 20 seconds.

object_name -{i|o|d|a|c|g|t|s|n} value
One or more triplets for each object to be set, consisting of the object name, followed by a dash and a flag, followed by a value.
Object names must refer to a valid SNMP object or class of objects. Object names can be in the form of an identifier or the equivalent SNMP dot-notation. Identifiers for UnixWare SNMP objects are listed in ``UnixWare group and object descriptions'' in Configuring and administering SNMP. Equivalent SNMP dot-notation for these objects is defined in the files /etc/netmgt/nwumpsd.defs, /etc/netmgt/snmpd.defs, and /etc/netmgt/unixwared.defs. (For a general explanation of SNMP dot-notation, see RFC 1213.)

The available flags are:


-a
The object is an IP address (in dot notation); value is specified in decimal number in IP address format (xxx.xxx.xxx.xxx).

-c
The object is a counter; value is specified as a decimal integer.

-d
The object is an object identifier (in dot notation); value is specified as a decimal OID (see RFC 1213).

-g
The object is a gauge; value is specified as a decimal integer.

-i
The object is an integer; value is specified as a decimal integer.

-n
The object is a null value; value is specified as 0.

-o
The object is an octet string; value is specified as a hexadecimal number.

-s
The object is a string; value is specified as a character string enclosed within double quotes.

-t
The object is in clock-ticks (hundredths of a second); value is specified as a decimal integer.


NOTE: The range of allowable values for a particular object depends on how the specified object_name is defined. The object definitions in the files /etc/netmgt/nwumpsd.defs, /etc/netmgt/snmpd.defs, and /etc/netmgt/unixwared.defs define the allowable values for SNMP objects as well as the type of the object (which tells you what flag to use when setting the object).

The actions that take place during a SET request are that a GET request is issued for the object. The object name returned from this request is used in the SET request.

Examples

The following request

setany suzzy suranet0 "ifAdminStatus.2" -i 3

would set the administrative status of interface 2 to 3 (down).

References

getmany(1Msnmp), getnext(1Msnmp), getone(1Msnmp), mosy(1Msnmp), post_mosy(1Msnmp), snmp(1Msnmp)

RFC 1156, RFC 1157, RFC 1213


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