[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 5

snmpdv1 Daemon

Purpose

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

Syntax

snmpd [ -c ConfigFile ] [ -d Level ] [ -f LogFile ] [ -S ]

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:

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:

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:

See "Understanding SNMP Daemon Support for SET Request Processing" in AIX 5L Version 5.2 Communications Programming Concepts for more information on the supported set variables.

The following commands should be issued before the SNMP daemon is started:

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:

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

-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:
0
All notices, exceptions, and fatal messages
1
Level 0 plus debug messages
2
Level 1 plus a hexadecimal dump of incoming and outgoing packets
3
Level 2 plus an English version of the request and response packets

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

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

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

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

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

  6. To view the contents of the DHCP Server database files /etc/dhcpsd.ar and /etc/dhcpsd.cr, enter:

    lssrc -l -s dhcpsd

Files

/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

Notes:
  1. The snmp port must be 161 as required by RFC 1157.
  2. The snmp-trap port must be 162 as required by RFC 1157.
  3. The smux port must be 199.
  4. The /etc/services file is shipped with these entries already in place.
  5. If the /etc/services file is being served from a server, these entries must be present in the server's /etc/services file.
/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.

Related Information

The gated daemon, snmpd daemon, snmpv3_ssw command.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]