HPlogo HP-UX Reference Volume 2 of 5 > s

snmpd(1M)

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

NAME

snmpd, snmpdm — Simple Network Management Protocol (SNMP) Daemon

SYNOPSIS

/usr/sbin/snmpd [-a] [-authfail] [-C contact] [-Contact contact] [-h] [-help] [-L location] [-Location location] [-l logfile] [-logfile logfile] [-m logmask] [-mask logmask] [-n] [-P portnum] [-Port portnum] [-sys description] [-sysDescr description]

/usr/sbin/snmpd [-e extendFile]

/usr/sbin/snmpdm [-a] [-authfail] [-C contact] [-Contact contact] [-h] [-help] [-L location] [-Location location] [-l logfile] [-logfile logfile] [-m logmask] [-mask logmask] [-n] [-P portnum] [-Port portnum] [-sys description] [-sysDescr description]

DESCRIPTION

The Master SNMP Agent (/usr/sbin/snmpdm) and the collection of subAgents (/usr/sbin/mib2agt, /usr/sbin/hp_unixagt, ...) that would attach to the Master Agent collectively form a single SNMP Agent. The SNMP Agent accepts SNMP Get, GetNext and Set requests from an SNMP Manager which cause it to read or write the Management Information Base (MIB). The MIB objects are instrumented by the subAgents.

The Master Agent can bind to three kinds of subAgents, namely,

  • Loosely coupled subAgents or separate process subAgents which open IPC communication channels to communicate with the Master Agent,

  • Shared library subAgents which are dynamically linkable libraries,

  • Remotely coupled subagents which could run on a different processor or operating system and communicate with the Master Agent using TCP.

Options

The Master agent /usr/sbin/snmpdm and the script /usr/sbin/snmpd recognize the following command line options:

-authfail

-a

Suppress sending authenticationFailure traps.

-Contact contact

-C contact

Specify the contact person responsible for the network management agent. This option overrides the contact person specified in the Master Agent configuration file /etc/SnmpAgent.d/snmpd.conf. It does not alter the value specified in the file. By default, the agent's contact is a blank string. To configure the agent's contact, add the contact after the word contact: in the configuration file /etc/SnmpAgent.d/snmpd.conf or use the -C option.

-e extendFile

This option is provided for backward compatibility with the pre-emanate snmpd.ea extensible SNMP agent. It is applicable only to the script /usr/sbin/snmpd, and only if the EMANATE extensible agent is installed. It is installed if the file /usr/sbin/extsubagt exists. This option causes the extsubagt to use the command line specified extendFile instead of the default file /etc/SnmpAgent.d/snmpd.extend to add user defined MIB objects to the SNMP agent.

-help

-h

Display command line options and log mask values.

-Location location

-L location

Specify the location of the agent. This option overrides the location specified in /etc/SnmpAgent.d/snmpd.conf. It does not alter the value in /etc/SnmpAgent.d/snmpd.conf. By default, the agent's location is a blank string. To configure the agent's location, add the location to /etc/SnmpAgent.d/snmpd.conf or use the -L option.

-logfile logfile

-l logfile

Use the logfile for logging rather than the default logfile, /var/adm/snmpd.log. A value of - will direct logging to stdout.

-mask logmask

-m logmask

Sets the initial logging mask to logmask. The logmask option may not be used in the agent start up scripts. This option should be used only while debugging the agent. See the SNMP Agent Logging section for valid values of logmask and for other details.

-n

Normally snmpdm puts itself into the background as if the command was terminated with an ampersand(&). This option inhibits that behavior and makes the agent run in the foreground.

-Port portnum

-P portnum

Specify the UDP port number that the agent will listen on for SNMP requests. The default is port 161. The value can also be specified in /etc/services. Only the super-user can start snmpdm and only one snmpdm can execute on a particular UDP port.

-sysDescr description

-sys description

Allows the user to specify the value for the system.sysDescr MIB object. The format is a text string enclosed in quotes. This option overrides the sysDescr specified in /etc/SnmpAgent.d/snmpd.conf. For example,

snmpdm -sys "nsmd1, test system"

SNMPv1 Security

An SNMP Manager application can request to read a MIB value available at an agent by issuing an SNMP GetRequest, or a manager application may request to alter a MIB value by issuing an SNMP SetRequest. Each SNMP request is accompanied by a community name, which is essentially a password that enables SNMP access to MIB values on an agent.

Note, the agent does not respond to any SNMP requests, including GetRequests, if no community name is configured in /etc/SnmpAgent.d/snmpd.conf. To configure the agent to respond to GetRequests accompanied by a specific community name, add the community name as a get-community-name to the configuration file. By default the get-community-name is set to public in the file. For details on this configuration file see the snmpd.conf(4) manual page.

By default, the agent does not allow managers to alter MIB values (it returns errors for SNMP SetRequests). To configure the agent to respond to SNMP SetRequests (AND GetRequests), add a set-community-name to the file /etc/SnmpAgent.d/snmpd.conf.

SNMPv2c

Simple Network Management Protocol Community based Version 2 (SNMPv2) is supported in this version of the SNMP Agent.

Traps

The agent also sends information to a manager without an explicit request from the manager. Such an operation is called a trap. By default, SNMP traps are not sent to any destination. To configure the agent to send traps to one or more specific destinations, add the trap destinations to /etc/SnmpAgent.d/snmpd.conf.

Then Master Agent (snmpdm) and the MIB-2 subAgent (mib2agt) collaborate to send the following SNMP traps:

coldStart

Sends a coldStart trap when the SNMP Agent is invoked.

linkDown

Sends a linkDown trap when an interface goes down.

linkUp

Sends a linkUp trap when an interface comes up.

authenticationFailure

Sends an authenticationFailure trap when an SNMP request is sent to the agent with a community name that does not match any community names the agent is configured to work with.

SNMP Agent Logging

The SNMP Agent provides the capability to log various types of errors and events. There are three types of logging: Errors, Warnings and Traces.

Log Masks

Log masks enable the user to specify the particular classes of messages that should be logged to /var/adm/snmpd.log or logfile. There are three different ways in which you can specify the logmask that you want. They are: (1) decimal number, (2) hex number, or (3) text string. The three may not be used in combination.

To select multiple output types do the following. For decimal or hex format simply add the individual logmask values together and enter that number. When entering strings, place multiple strings on the same line, space separated, without quotes.

================================================================== LOG MASK VALUES FUNCTION Decimal Hex String ================================================================== Log factory trace messages 8388608 0x00800000 FACTORY_TRACE Log factory warning messages 268435456 0x10000000 FACTORY_WARN Log factory error messages 536870912 0x20000000 FACTORY_ERROR

For example, to turn on error log messages:

decimal format: snmpdm -m 536870912 hex format: snmpdm -m 0x20000000 string format: snmpdm -m FACTORY_ERROR

Using -m or -mask logmask command line options might cause the master agent to run in the foreground and the agent would not daemonize. This could potentially cause system hang during boot times if any of these options were added to the start up scripts, since the boot up environment might wait indefinitely for the agent to daemonize. So it is adviced not to add these command line options to the start up scripts but use these options only during an agent debug session.

Supported MIB Objects

The Management Information Base (MIB) is a conceptual database of values MIB (objects) on the agent. The Master SNMP Agent implements a small number of MIB objects but most MIB objects are implemented by subAgents that attach to the Master Agent. See /opt/OV/snmp_mibs/ on systems with OpenView products installed for definitions of particular MIB objects.

This version of the SNMP Agent includes three subAgents, /usr/sbin/mib2agt, and /usr/sbin/hp_unixagt which implement the MIB-2 and hp-unix MIBs respectively, and the third /usr/sbin/trapdestagt which is used in configuring destinations for the agent's traps. The MIBs for the subagents mib2agt and hp_unixagt are described in /opt/OV/snmp_mibs/rfc1213-MIB-II and /opt/OV/snmp_mibs/hp-unix on systems with OpenView products installed.

The MIB-2 subAgent supports most of the objects in RFC1213. The EGP group is not supported. The hp-unix subAgent supports most of the objects in the hp-unix MIB.

DEPRECATED MIBS

The ieee8023Mac MIB group corresponding to the following OID is no longer supported:

private(4).enterprises(1).hp(11).nm(2).interface(4).ieee8023Mac(1)

This MIB group is replaced with the "Ether-Like" MIB group (RFC1398) which corresponds to OID:

mgmt(2).mib-2(1).transmission(10).dot3(7)

SNMP Agent Startup

The SNMP Agent startup mechanism is built upon the System V.4 file system paradigm. The startup script, /etc/netmanrc, which was used in previous releases of the SNMP Agent is no longer used.

Automatic Startup

As installed, the SNMP Master Agent and all subAgents should startup automatically each time the system re-boots or any time the system transitions from run level 1 to run level 2. When the system enters run level 2 the operating system will execute /sbin/init.d/SnmpMaster which will startup the Master Agent. Similarly, the operating system invoked /sbin/init.d/SnmpMib2, /sbin/init.d/SnmpHpunix and /sbin/init.d/SnmpTrpDst will startup the MIB2, HP Unix and Trap Dest subAgents respectively immediately after the Master Agent is started.

Prior to executing these startup scripts the system will examine all scripts in /etc/rc.config.d for environment variables which could potentially influence the startup of the Master Agent and each subAgent. See the particular startup script or configuration file for details on supported environment variables. The user should never modify scripts in /sbin/init.d. Instead the startup behavior should be controlled by adjusting values in the appropriate configuration script in /etc/rc.config.d.

Manual Startup

There are two ways to start the SNMP Agent manually. The first way is to execute snmpdm and then start each subAgent. Separate process subAgents are started by invoking the particular subAgent executables.

The second and simplest way to start the SNMP Agent manually is to execute the snmpd startup script which will invoke the Master Agent and all subAgents who have been installed and designed to operate in this paradigm. The snmpd script is layered upon the V.4 startup paradigm and so makes use of the component startup scripts in /sbin/init.d and configuration scripts in /etc/rc.config.d. When snmpd is invoked it starts /usr/sbin/snmpdm, passes all its command line arguments to it and then executes each script (S*) found in /sbin/SnmpAgtStart.d.

EXTERNAL INFLUENCES

Environment Variables

LANG determines the language in which messages appear. If LANG is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG. If any internationalization variable contains an invalid setting, snmpdm behaves as if all internationalization variables are set to "C." See environ(5). Many SNMP Agent log messages are only available in English.

International Code Set Support

Supports single-byte character code sets.

AUTHOR

snmpd was developed by HP, Massachusetts Institute of Technology and SNMP Research.

FILES

/usr/sbin/snmpd /usr/sbin/snmpdm /usr/sbin/mib2agt /usr/sbin/hp_unixagt /usr/sbin/trapdestagt /etc/SnmpAgent.d/snmpd.conf /var/adm/snmpd.log /opt/OV/snmp_mibs/ /sbin/SnmpAgtStart.d/

SEE ALSO

snmpd.conf(4).

RFC 1155, RFC 1157, RFC 1212, RFC 1213, RFC 1231, RFC 1398.

© Hewlett-Packard Development Company, L.P.