admsnmptrap(1M) DG/UX R4.11MU05 admsnmptrap(1M)
NAME
admsnmptrap - manage the SNMP traps database
SYNOPSIS
admsnmptrap -o add [ -qn ] -p port|default -c community host
admsnmptrap -o delete [ -qn ] [ -c community ] host
admsnmptrap -o modify [ -qn ] [ -P new-port|default ] [ -C new-
community ] [ -H new-host ] [ -c community ] host
admsnmptrap -o list [ -q|v ] [ -c community ] [ all|host ... ]
admsnmptrap -o search [ -c community ] host
DESCRIPTION
Use admsnmptrap to manage the snmpd traps database. The traps
database is located in the /etc/snmpd.conf file. The snmpd command
will send traps to the hosts specified in the traps database. Each
entry consists of a the trap keyword, a community name, host name,
and optionally a port number. Specify the community and host pair so
that they uniquely identify an entry in the file.
add Add a new trap record to the database.
delete Remove the entry for host from the database.
modify Change the existing entry for host in the database. If
multiple entries for host exist, you must use the -c option
to qualify which entry to modify.
list List the entry for host from the database. If not host is
specified or the keyword all is used, all entries in the
database are displayed.
search Search for the entry host in the database. If the entry is
found, it is written to stdout, otherwise the operation
exits with an error code.
Options
-c community
You use the community option to specify the community when
you add a trap, or to qualify a specific entry for the
delete or modify operations.
-P new-port
Use the new-port option to specify a new port number for
host.
-p port Use the port option to specify the a port number for host.
You can specify the keyword default which sets the port
number to 162.
-C new-community
Use the new-community option to specify the new community
name for host.
-H new-host
Use the new-host option to specify the new host name for
host.
-q For the list operation this produces an unformatted
listing. (i.e., no headers). For the add,delete, and
modify operations it suppresses confirmation messages.
-v Use the "Verbose" option to produce a formatted listing
with headers and aligned columns. This is the default.
-n Use this option to modify the object database without
reconfiguring the agent.
FILES
/etc/snmpd.conf the SNMP agent configuration file.
DIAGNOSTICS
Warnings
- If the agent cannot be reconfigured.
- If you request the delete or modify operation and the community-
host pair does not exist.
Errors
- If you request the add operation and the community-host pair
already exists.
- If you request the modify operation and the community-host pair
is not unique.
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.
SEE ALSO
snmpd(1M), sysadm(1M), snmpd.conf(4M).
NOTES
Access to the add, delete, and modify operations is granted based
upon write access to the /etc/snmpd.conf file. Access to the list
and search operation is granted based upon read access to the
/etc/snmpd.conf file.
Licensed material--property of copyright holder(s)