snmpdv1 Daemon
Purpose
Starts the Simple Network Management Protocol (SNMP) version 1 agent as a background process.
Syntax
Description
The snmpd command starts the SNMP daemon. This command may only be issued by a user with root privileges or by a member of the system group.
The SNMP daemon is a server that supports the standard Simple Network Management Protocol (SNMP) documented by RFC 1157 and the Management Information Base (MIB) as defined in RFC 1155 and RFC 1213. The SNMP daemon provides the following three functions:
- Receiving and authenticating SNMP requests from network monitors.
- Processing requests and returning results to the originating monitor.
- Sending trap notification to all hosts listed in the configuration file.
The SNMP daemon server keeps log messages in a file specified by the LogFile variable if the -f flag is used or in a log file specified in the configuration file. When the size of the log file exceeds the predefined maximum log file size, the snmpd command will rotate the log file by moving the old log file to another file as follows:
- LogFile.3 is deleted.
- LogFile.2 is moved to LogFile.3.
- LogFile.1 is moved to LogFile.2.
- LogFile.0 is moved to LogFile.1.
- LogFile is moved to LogFile.0.
- Logging continues in LogFile.
If logging is not directed from the snmpd command line with the -f flag, logging can be directed from the configuration file.
Supported set variables are:
- sysContact
- sysName
- sysLocation
- ifAdminStatus
- atPhysAddress
- atNetAddress
- ipForwarding
- ipDefaultTTL
- ipRouteDest
- ipRouteNextHop
- ipRouteType
- ipNetToMediaPhysAddress
- ipNetToMediaNetAddress
- ipNetToMediaType
- snmpEnableAuthenTraps
- smuxPstatus
- smuxTstatus
See "Understanding SNMP Daemon Support for SET Request Processing" in AIX® Version 6.1 Communications Programming Concepts for more information on the supported set variables.
The following commands should be issued before the SNMP daemon is started:
- ifconfig lo0 loopback
- startsrc -s inetd
These commands are normally executed during system startup when the /etc/rc.net and /etc/rc.tcpip shell scripts are called. (The snmpd command can be placed in the /etc/rc.tcpip shell script.)
The snmpd daemon should be controlled using the System Resource Controller (SRC). Entering snmpd at the command line is not recommended.
Manipulating the snmpd Daemon with the System Resource Controller
The snmpd daemon is a subsystem controlled by the System Resource Controller (SRC). The snmpd daemon is a member of the tcpip system group. The snmpd daemon is enabled by default and can be manipulated by SRC commands.
Use the following SRC commands to manipulate the snmpd daemon:
Item | Description |
---|---|
startsrc | Starts a subsystem, group of subsystems, or a subserver. Issuing the startsrc command causes the snmpd command to generate a coldStart trap. |
stopsrc | Stops a subsystem, group of subsystems, or a subserver. |
refresh | Causes a subsystem or group of subsystems to reread the appropriate configuration file. Issuing a refresh command causes the snmpd daemon to generate a warmStart trap. |
traceson | Enables tracing of a subsystem, group of subsystems, or a subserver. If the user issuing the traceson command is not the root user, the debugging level will not exceed level 2. |
tracesoff | Disables tracing of a subsystem, group of subsystems, or a subserver. |
lssrc | Gets the status of a subsystem, group of subsystems, or a subserver. If the user issuing the long status form of the lssrc command is not the root user, no community name information is displayed. |
Flags
Item | Description |
---|---|
-c ConfigFile | Specifies full path and file name of the configuration file for the snmpd daemon. This file is read when the snmpd daemon starts up and when a refresh or kill -1 signal is issued. If the -c flag is not specified, the default configuration file is /etc/snmpd.conf. See the snmpd.conf file for information on this file format. |
-d Level | Specifies the level of
tracing the snmpd command produces.
The Level value can be one of:
If the -d flag is not specified, the debugging level is set to 0. |
-f LogFile | Specifies the full path and file name into which snmpd tracing information is logged. If the -f flag is not specified, no information will be logged. See the snmpd.conf file for more information on setting logging parameters. |
-S | Enable the security option if it's specified. It will prevent the local non-root user from changing the value of MIB variable(s) on the local host. |
Examples
- To start the snmpd daemon,
enter a command similar to the following:
startsrc -s snmpd -a "-f /tmp/snmpd.log"
This command starts the snmpd daemon and logs information to the /tmp/snmpd.log file at debug level 0.
- To stop the snmpd daemon
normally, enter:
stopsrc -s snmpd
This command stops the daemon. The -s flag specifies the subsystem that follows to be stopped.
- To
get short status from
the snmpd daemon, enter:
lssrc -s snmpd
This command returns the name of the daemon, the process ID of the daemon, and the state of the daemon (active or inactive).
- To get a long status from
the snmpd daemon, enter:
lssrc -ls snmpd
If you are the root user, this long form of the status report lists the configured community names and associated access privileges and views for snmp requests. The long form also lists the community names associated with the hosts for trap notification, logging configuration parameters, snmpd specific configuration parameters and smux configuration parameters.
- To
enable tracing for the snmpd daemon,
enter the following:
traceson -s snmpd
This command enables snmpd debugging if the snmpd daemon is configured for logging.
- To view the contents of the
DHCP Server database files /etc/dhcpsd.ar and /etc/dhcpsd.cr,
enter:
lssrc -l -s dhcpsd
Files
Item | Description |
---|---|
/etc/services | Contains port assignments for required services. The following
entries must be present in the /etc/services file if the entries
are not already present:
Requirements:
|
/etc/snmpd.conf | Specifies the configuration parameters for the snmpd agent. |
/etc/mib.defs | Defines the Management Information Base (MIB) variables the SNMP agent should recognize and handle. |