[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Commands Reference, Volume 5
snmptrap Command
Purpose
Generate a notification (trap) to report an event to the SNMP manager with
the specified message.
Syntax
snmptrap [ -a Host ] [ -c Community ] [-d ] -m Message
Description
Generate a notification (trap) to report an event to the SNMP manager with
the specified message.
Flags
-a Host |
Specifies to connect to the SNMP agent on the specified
host. If the -a flag is not specified, the default host
is the local host. Host can be an IP address or a
host name. |
-c Community |
Specifies community name to use. This community must
have been set in /etc/snmpdv3.conf for SNMP version
3 or in /etc/snmpd.conf for SNMP version 1 and have
the read access privilege at least to the SNMP agent running on the specified
host or local host. If the -c flag is not specified,
the default community name is "public". |
-d |
Enables the debug facility |
-m Message |
Defines the message that the snmptrap command will send. Message specifies the information
the trap will hold. This information is in the text format.The -m flag must be the last flag specified. |
Exit Status
- 0
- Trap information was sent out correctly.
- 1
- This indicates something was wrong during the process.
Examples
- In order to send a trap with the message 'hello world' to the SNMP agent
running on the local host, enter the following:
snmptrap -m hello world
Note
the community 'public' must have read access to the
SNMP agent running on the local host. For details, please refer to SNMP configuration
documentation.
- In order to send a trap with the community name 'community1' and the message
'hello world' to the SNMP agent running on a remote host 'blah', enter the
following:
snmptrap -c community1 -h blah -m hello world
Note
The community 'community1' must have read access to the SNMP agent running
on the host 'blah'. For details, please refer to the SNMP configuration documentation.
Files
/etc/snmpdv3.conf |
Contains the configuration file for the SNMP version
3 agent. |
/etc/snmpd.conf |
Contains the configuration file for the SNMP version
1 agent. |
Related Information
The snmpdv3 daemon, snmpdv1 daemon.
The Network Management article in AIX 5L Version 5.2 System Management Guide: Communications and Networks
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]