snmpdv3 Daemon

Purpose

Starts the Simple Network Management Protocol (SNMP) version 3 agent as a background process.

Syntax

snmpd [ -d level ] [ -i interval ] [ -p port ] [ -S ] [ -c community ]

Description

The snmpd command starts the Simple Network Management Protocol (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 all the SNMPv1, SNMPv2c, and SNMPv3 protocols documented by RFCs 1157, RFD 1905, and RFC 2572. It also behaves as a SMUX server as defined by RFC 1227 and as a Distributed Protocol Interface (DPI) version 2.0 agent as defined by RFC 1592. 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 stores log messages in a file specified by the LogFile variable if the -f flag is used or stores log messages in a log file specified in the configuration file. The maximum value for number of log files is 4. When the size of the log file exceeds the predefined maximum log file size, the snmpd command moves 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.

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 snmpdv3 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 snmpdv3 daemon is a subsystem controlled by the System Resource Controller (SRC). The snmpdv3 daemon is a member of the tcpip system group. The snmpdv3 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 snmpdv3 command to generate a coldStart trap.
stopsrc Stops a subsystem, group of subsystems, or a subserver.
lssrc Gets the status of a subsystem, group of subsystems, or a subserver.

Flags

Item Description
-d level Specifies the level of tracing to be started. The valid values for level are 0-255. If the -d parameter is not specified, then the default level of 0 is used, meaning no tracing will be done. If the -d parameter is specified without a level, then a level of 31 is used, meaning all SNMP requests/responses/traps and DPI activity will be traced.
There are 8 levels of tracing provided. Each level selected has a corresponding number. The sum of the numbers associated with each level of tracing selected is the value which should be specified as level. The numbers for the trace levels are:
0
No tracing. This is the default.
1
Trace SNMP responses, requests, and traps.
2
Trace DPI level 1 and DPI level 2.
3
Same as level 1 plus level 2 plus internal trace.
4
Same as trace level 3 plus extended trace.
-i interval Specifies the interval (in minutes) at which dynamic configuration changes to the SNMP agent should be written out to the /etc/snmpdv3.conf configuration file. Valid values are 0-10. The default value is 5. This parameter is only relevant when the /etc/snmpdv3.conf file is used for SNMPv3 configuration.
-p port Listens for SNMP packets on this port. The default is port 161.
-S Prevents non-root users from changing the MIB values.
-c community Accepts the requests with the community name that the community parameter specifies.

Examples

  1. To start the snmpd daemon, enter a command similar to the following:
    startsrc -s snmpd

    This command starts the snmpd daemon at debug level 0.

  2. 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.

  3. To get 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).

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:
snmp
161/udp
snmp-trap
162/udp
smux
199/tcp
/etc/snmpdv3.conf Specifies the configuration parameters for the snmpdv3 agent.
/etc/snmpd.boots Specifies the engineID and the engineBoots for the snmpdv3 agent.
/etc/mib.defs Defines the Management Information Base (MIB) variable the SNMP agent should recognize and handle.