admsnmpuea(1M) DG/UX R4.11 admsnmpuea(1M)
NAME
admsnmpuea - manage the SNMP User Extensible Agent user defined MIB
objects
SYNOPSIS
admsnmpuea -o add [ -q ] [ -i object-id ] -u user-id|user-name [ -r
read-cmd ] [ -w write-cmd ] -x
INTEGER|STRING|LIST|TIMETICKS|IPADDRESS [ -c 0..43200 ]
object-name
admsnmpuea -o delete [ -q ] object-name
admsnmpuea -o modify [ -q ] [ -n new-object-name ] [ -i object-id ] [
-u user-id|user-name ] [ -r read-cmd ] [ -w write-cmd ] [
-x INTEGER|STRING|LIST|TIMETICKS|IPADDRESS ] [ -c 0..43200
] [ -s VALID|INVALID ] object-name
admsnmpuea -o list [ -q ] [ -d 1..8 ] [ -s VALID|INVALID ] [ object-
name ]
admsnmpuea -o export [-q] -f MIB-file-name
DESCRIPTION
Use admsnmpuea to manage the SNMP User Extensible Agent user defined
MIB objects defined in the /etc/snmpduea.conf file. All user
defined MIB objects must be defined in the /etc/snmpduea.conf file
before they can be managed via SNMP. Objects are associated with
commands that are executed when a request is received by snmpd for
that object. The output of the command is returned in the SNMP reply
to a GetRequest or GetNextRequest.
add Add a new user defined MIB object to the
/etc/snmpduea.conf file.
delete Delete user defined MIB objects from the
/etc/snmpduea.conf file.
modify Modify a user defined MIB object in the /etc/snmpduea.conf
file.
list List user defined MIB object data defined in the
/etc/snmpduea.conf file.
export Export user defined MIB objects defined in the
/etc/snmpduea.conf file.
Exporting causes valid user defined MIB objects defined in
the /etc/snmpduea.conf file to be written into the
/etc/srconf/datinfo/snmpuea.dat file (in snmpinfo.dat
format). The postmosy command is executed to merge all
*.dat files defined in the /etc/srconf/datinfo directory to
create a new /etc/snmpinfo.dat file. An SNMP UEA MIB file
(in ASN.1 format) is then created with all valid user
defined SNMP MIB objects. NOTE - UEA objects defined in
the /etc/snmpduea.conf file with their object-status field
defined as INVALID are removed from the /etc/snmpduea.conf
file and will not be defined in the
/etc/srconf/datinfo/snmpuea.dat file, /etc/snmpinfo.dat
file, or output UEA MIB file.
The export operation should be executed after changes are
made to user defined UEA objects in the /etc/snmpduea.conf
file (added, deleted, modified) to register the changes
with the UEA.
Options
-n new-object-name
Use the new-object-name option to specify a new name for a
user defined MIB object. This field can only be specified
for the modify operation.
-i object-id
Use the object-id option to specify the object ID (in dot
notation) of object-name. This ID is the location in the
MIB tree where the data generated by the read-cmd resides.
The default value for this field is:
1.3.6.1.4.1.106.2.1.2.2.7.2.<host-IP-addr>.
<next-available-instance>
When specifying an object ID for an UEA objects, a user may
use a different MIB subtree location, perhaps within their
own organization's enterprise specific MIB subtree. Object
IDs defined for UEA MIB objects must follow the naming
guidlines defined in RFC 1155 (Structure and Identification
of Management Information for TCP/IP-based Internets).
When specifying an OID other than the default, the user
should have a mechanism for defining OIDs for UEA objects
on a per-host basis. This will ensure each host's UEA
objects are uniquely defined with the management station.
The mechanism used in the dataGeneral subtree (default
OIDs), is the manipulation of a host's IP address. For
example if a user on host A (IP address 123.456.7.89)
defined an UEA object (dgUEAGetUsers) the default OID for
the object would be:
1.3.6.1.4.1.106.2.1.2.2.7.2.123.456.7.89.1
where:
1.3.6.1.4.1.106.2.1.2.2.7.2 =
dguxUEAData
1.3.6.1.4.1.106.2.1.2.2.7.2.123 =
dguxUEADataNetAddrPt1
1.3.6.1.4.1.106.2.1.2.2.7.2.123.456 =
dguxUEADataNetAddrPt2
1.3.6.1.4.1.106.2.1.2.2.7.2.123.456.7 =
dguxUEADataNetAddrPt3
1.3.6.1.4.1.106.2.1.2.2.7.2.123.456.7.89 =
dguxUEADataDefLoc
1.3.6.1.4.1.106.2.1.2.2.7.2.123.456.7.89.1 =
dgUEAGetUsers
Using the host's IP address prevents two different hosts
from registering different UEA objects defined with the
same OID with a management station.
NOTE - if all hosts will be using the same UEA MIB objects,
a host-specific mechanism for defining OIDs is not
necessary.
This field is required only for modifying the current
object-id of a user defined MIB object.
-u user-id|user-name
Use the user-id or user-name option to specify the name or
id that is used to execute the read-cmd and write-cmd.
This field is required for adding objects or modifying the
current user-id or user-name of a user defined MIB object.
-r read-cmd
Use the read-cmd option to specify the command executed
when the object-name receives an SNMP GetRequest or
GetNextRequest.
The read-cmd may be shell scripts, DG/UX command, or
executable program. Commands may be passed the following
arguments:
$o The OBJECT IDENTIFIER used in the request (in dot
notation)
$r The request (GET_REQUEST | GET_NEXT_REQUEST |
SET_REQUEST)
$i The instance used in the request
$s The syntax of the value (INTEGER, STRING, etc)
$v The value of the data being set in a SetRequest.
All commands that are executed in response to an SNMP
GetRequest or GetNextRequest of an UEA MIB object must exit
with a return code of zero (0) if the output generated by
the command is to be returned in the SNMP reply.
If a command is executed in response to an SNMP GetRequest
or GetNextRequest and the command does not complete within
10 seconds, the main agent will time-out the UEA subagent
and no response is returned.
This field is required only for adding objects that handle
SNMP GetRequest or GetNextRequest or for modifying the
current read-cmd of a user defined MIB object.
-w write-cmd
Use the write-cmd option to specify the command executed
when the object-name receives an SNMP SetRequest.
Rules specified above for the read-cmd also apply to the
write-cmd.
This field is required only for adding objects that handle
SNMP SetRequests or for modifying the current write-cmd of
a user defined MIB object. If the object-syntax field of
an object is set to LIST, the object does not support SNMP
SetRequests.
-x object-syntax
Use the object-syntax option to specify the data type that
is returned in the SNMP reply when the object-name receives
an SNMP GetRequest or GetNextRequest, or the data type of
the value specified in an SNMP SetRequest. If an UEA
object has been defined with a read-cmd and write-cmd, the
object-syntax must apply to both the value being returned
and the value being set.
Valid object-syntax values include:
INTEGER command gets/sets a numeric value (use if the
expected output of the read command or the value
passed to the write command is the ascii
representation of a number).
STRING command gets/sets an ascii string value (use if
the expected output of the read command or the
value passed to the write command is a single
line of ascii data).
LIST command gets a list of ascii string data lines
(use if the expected output of the read command
is multiple lines of ascii data). This syntax
type cannot be used for SNMP SetRequests (READ
access only).
TIMETICKS command gets/sets data in time format (use if the
expected output of the read command or the value
passed to the write command is in the following
format:)
<hrs> : <mins> : <secs> . <millisecs>
IPADDRESS command gets/sets data in dot notation (use if
the expected output of the read command or the
value passed to the write command is in dot
notation format (ie. 128.222.8.15))
There will be limited support for tables. Tabular data
generated by a user defined MIB object executing a command
in response to an SNMP GetRequest or GetNextRequest is
treated as rows of data called a LIST. Data rows can be
retrieved via SNMP, but specific columns within those rows
cannot be retrieved.
This field is required for adding objects or modifying the
current object-syntax of a user defined MIB object. If the
object-syntax field of an object is set to LIST, the object
does not support SNMP SetRequests.
-c cache-timeout
Use the cache-timeout option to specify the maximum number
of seconds since the last time object-name received a
request before its read-cmd can be executed again. Valid
cache-timeout values range between 0 and 43200 seconds. A
cache-timeout value of 0 causes the read-cmd to be executed
every time the object-name receives an SNMP GetRequest or
GetNextRequest. The default value for cache-timeout is 0.
This field is required only for modifying the current
cache-timeout of a user defined MIB object.
-s object-status
Use the object-status option to specify the status of the
user defined MIB object. If the object is to be managed
via SNMP, set this field to VALID, else set this field to
INVALID. The default value for this field is VALID. This
field is required only for modifying the current object-
status of a user defined MIB object. Objects marked as
INVALID will be removed from the /etc/snmpduea.conf file
during the next export operation.
-f MIB-file-name
Use the MIB-file-name option to specify the name of the MIB
file, in ASN.1 format, that is created with the user
defined MIB objects exported from the /etc/snmpduea.conf
file. This field is required only for the export action.
-d data-field-number
Use the data-field-number option to specify the number of
the field that is to be displayed. Valid data-field-number
values range between 1 and 8. If this option is not
specified, all fields are displayed. This field can only
be specified with the list operation.
FILES
/etc/snmpduea.conf the SNMP User Extensible Agent
configuration file
DIAGNOSTICS
Warnings
- The export operation is requested and the /etc/snmpduea.conf
file does not contain the STARTUEA and ENDUEA tags.
- The add or modify operation is requested to define an object's
write-cmd field and its object-syntax field is defined as LIST.
Errors
- The add operation is requested and the object-name and/or object-
id specified are not valid or already exist.
- The modify operation is requested and the new-object-name and/or
object-id specified are not valid or already exist.
- The add or modify operation is requested and the read-cmd, write-
cmd, object-syntax, cache-timeout, and/or object-status are not
valid.
- The delete, modify, or list operation is requested and the
object-name specified does not already exist.
Exit Codes
0 The operation was successful.
1 The operation was unsuccessful.
2 The operation failed due to access restrictions.
3 There was an error in the command line.
NOTES
Access to the add, delete, modify, and export operations is granted
based on write access to the /etc/snmpduea.conf file. Access to the
list operation is granted based upon read access to the
/etc/snmpduea.conf file.
SEE ALSO
snmpd(1M), snmpduea.conf(4M), sysadm(1M), info.dat(4M),
postmosy(1M).
Licensed material--property of copyright holder(s)