HP OpenVMS Systems Documentation
Compaq TCP/IP Services for OpenVMS
The eSNMP modules provided with TCP/IP Services include troubleshooting features that are useful in controlling the way your subagent works.
This chapter describes:
For additional information about troubleshooting SNMP problems, see the
Compaq TCP/IP Services for OpenVMS Tuning and Troubleshooting guide.
6.1 Modifying the Subagent Error Limit
In certain circumstances, some subagent programs might enter a loop where a select() call repeatedly returns a -1 error value. (Note that standard SNMP subagents and the Chess example provided in TCPIP$EXAMPLES should not exhibit this behavior.)
You can define the logical name TCPIP$SNMP_SELECT_ERROR_LIMIT to modify the number of times a -1 error value can be returned from a select() call.
The valid TCPIP$SNMP_SELECT_ERROR_LIMIT values range from 1 to less than 2 32 -1 (default 100). When defining the error limit, remember:
For example, to define TCPIP$SNMP_SELECT_ERROR_LIMIT to limit the number of times a -1 error value is returned to 1,000, enter the following command:
$ DEFINE/SYSTEM TCPIP$SNMP_SELECT_ERROR_LIMIT 1000
You can define the logical name TCPIP$ESNMP_DEFAULT_TIMEOUT to modify the default time allowed (3 seconds) before timeout occurs because of the lack of response by the subagent to the master agent. The ability to define the timeout is especially useful for slower systems and systems with heavy network traffic. The logical name is translated at startup time.
The TCPIP$ESNMP_DEFAULT_TIMEOUT value is from 0 to 60 seconds. (You should use 0 only for testing purposes, such as simulating problems on a heavily loaded host or network.) If the value you specify contains nonnumeric digits or is outside the allowed range, the default value of 3 seconds is used.
For example, to define TCPIP$ESNMP_DEFAULT_TIMEOUT to time out after 6 seconds of inactivity between the master agent and subagents, enter the following command:
$ DEFINE/SYSTEM TCPIP$ESNMP_DEFAULT_TIMEOUT 6
When a subagent registers with the master agent, it can specify a value
that overrides the value you set with logical name
TCPIP$ESNMP_DEFAULT_TIMEOUT. The standard MIB II and Host Resources MIB
subagents use the default value of 3 seconds. Refer to the description
of the esnmp_register routine for more information.
6.3 Log Files
All output redirected from SYS$OUTPUT for the SNMP agent process is logged to *.LOG files in the SYS$SYSDEVICE:[TCPIP$SNMP] directory. Output redirected from SYS$ERROR is logged to *.ERR files in the same directory.
Output redirected from SYS$OUTPUT for the agent process is logged to the following files:
Output redirected from SYS$ERROR is logged to the following files:
Data is flushed to the log files when the corresponding process terminates. Each invocation of the TCPIP$SNMP_RUN.COM procedure purges these files, retaining at least the last seven versions (the exact number depends on the value of the CLUSTER_NODES system parameter).
The log files are located in the SYS$SYSDEVICE:[TCPIP$SNMP] directory along with the TCPIP$SNMP_CONF.DAT file, which is a text representation of the SNMP configuration data generated by the master agent during startup.
The contents of the SNMP log files are written to SYS$SYSDEVICE:[TCPIP$SNMP] when the process stops or when you stop it (for example, by entering the STOP/ID=xxx command). After a process restarts, it creates a new version of the files. If a process executes without errors, *.ERR files might not be created.
Writing to SYS$OUTPUT and SYS$ERROR from custom subagents is controlled by qualifiers on the RUN command in the TCPIP$EXTENSION_MIB_RUN.COM procedure. See Chapter 3 for information about including extension subagent commands in the startup procedure.
Custom subagents that do not write to SYS$OUTPUT and SYS$ERROR might not produce a .LOG or .ERR file.
TCP/IP Services does not support writing log files to locations other than the SYS$SYSDEVICE:[TCPIP$SNMP] directory.
The log files contain startup and event information and additional messages, depending on the logging level specified for an agent. The SNMP logging facility uses three logging levels:
For the master agent and standard subagents, the logging level is WARNING. Log files for these processes include messages for WARNING and ERROR events. The chess example does not have a default log level. Therefore, no log messages appear. To specify a default log level for custom subagents, you can use the standard API call set_debug_level (see Chapter 5 for more information). Because the chess example subagent does not use a default, messages are captured only if you specify tracing. For information about getting trace logs, refer to the Compaq TCP/IP Services for OpenVMS Management guide.