hp.com home products and services support and drivers solutions how to buy
cd-rom home
End of Jump to page title
HP OpenVMS systems
documentation

Jump to content


HP TCP/IP Services for OpenVMS

HP TCP/IP Services for OpenVMS
SNMP Programming and Reference


Previous Contents Index

1.4 Writing an eSNMP Subagent

Table 1-2 lists the files that are available to help you develop MIBs and subagents. Except where noted, the files are located in the directory pointed to by TCPIP$SNMP_EXAMPLES.

Table 1-2 Files for Building a Subagent
File Description
ESNMP.H Header file used to create a subagent. Located in TCPIP$ESNMP.
GAWK.EXE Interpreter for MIB converter.
MIB-CONVERTER.AWK A UNIX based awk shell script that takes a MIB definition in ASN.1 notation and converts it to an .MY file.
RFC1213.MY MIB II definitions.
RFC1231.MY IEEE 802.5 Token Ring MIB definitions.
RFC1285.MY FDDI MIB definitions.
RFC1442.MY SNMP Version 2 Structure of Management Information (SMI) definitions.
SNMP-SMI.MY SNMP Version 2 SMI definitions from RFC 1902 (replaces RFC 1442).
SNMP-TC.MY SNMP Version 2 SMI definitions from RFC 1903 (replaces RFC 1443).
V2-TC.MY SNMP Version 2 SMI definitions from RFC 1903 (superset of those in SNMP-TC.MY).
TCPIP$BUILD_CHESS.COM Command file that builds the sample chess subagent.
TCPIP$CHESS_SUBAGENT.OPT Options file for use in building the sample chess subagent.
*.C and *.H Source code for chess example. Contains detailed documentation that explains how the code functions.
TCPIP$CHESS_SUBAGENT.EXE Functioning chess example image.
TCPIP$ESNMP.OLB Object library file containing routines used to create a subagent. Located in the directory pointed to by TCPIP$SNMP.
TCPIP$ESNMP_SHR.EXE Shareable image containing routines used to create a subagent. Located in the directory pointed to by SYS$SHARE.
UCX$ESNMP_SHR.EXE Copy of TCPIP$ESNMP_SHR.EXE, provided for compatibility with existing customer subagents linked under TCP/IP Services V4. x. Located in the directory pointed to by SYS$SHARE.
TCPIP$MIBCOMP.EXE
TCPIP$MOSY.EXE
TCPIP$SNMPI.EXE
Images associated with the MIB compiler. Located in SYS$SYSTEM.

For information about building a subagent on an OpenVMS system, see Chapter 3.

1.5 The eSNMP API

The TCP/IP Services implementation of the eSNMP architecture includes an API that provides programmers with many eSNMP routines they would otherwise have to develop themselves.

The eSNMP API includes interface routines, method routines, and support routines.

Interface routines handle the basic subagent operations, such as:

The support routines allow the subagent to manipulate the data in the response to the request, and include the following:

Chapter 5 describes the API routines in more detail.

To create a subagent, the programmer must provide modules to implement the method routines, as described in Chapter 3.

1.5.1 The SNMP Utilities

To provide quick access to information in the MIBs, and to test SNMP operation, TCP/IP Services provides the following utilities:

For information about using the SNMP utilities, see Chapter 4.

1.6 The MIB Compiler

The MIB compiler processes the statements in an ASN.1 file and generates modules that are used by the developer to create subagent routines. For every ASN.1 input file that is processed using the MIB compiler, two output files, a subtree_TBL.H file and a subtree_TBL.C file, are generated, where subtree is the name from the original MIB definition file (for example, chess). The output files are described in more detail in Chapter 3.

The subtree_TBL.H file is a header file that contains the following:

The subtree_TBL.C file is an object file that contains the following:

1.7 SNMP Versions

The extensible SNMP software supports SNMP Version 2, based on RFCs 1901 through 1908, including:

1.7.1 Using Existing (SNMP Version 1) MIB Modules

Existing SNMP Version 1 MIB subagent executable files should be compatible with the current SNMP Version 2 master agent without the need to recompile and relink, with the following exceptions:

Images linked against object library (.OLB) files may not need to be relinked, although you can relink them against the shareable images in this version of the product to decrease the image size. Relinking against the shareable image allows you to take advantage of updated versions of the eSNMP API without the need to relink. Some images linked against the current version of TCP/IP Services may run under Versions 4.1 and 4.2, but this backward compatibility is not supported and may not work in future versions of TCP/IP Services.

If an existing subagent does not execute properly, relink it against this version of TCP/IP Services to produce a working image. Some subagents (such as the OpenVMS Server MIB) require a minimum version of OpenVMS as well as a minimum version of TCP/IP Services.

1.8 For More Information

This manual provides the OpenVMS information required for implementing eSNMP subagents and ensuring their proper operation in that environment.

For information about prototypes and definitions for the routines in the eSNMP API, see the TCPIP$SNMP:ESNMP.H file.

Table 1-2 lists files that contain additional comments and documentation.


Chapter 2
MIBs Provided with TCP/IP Services

This chapter describes how MIBs are implemented on OpenVMS. The MIBs provided with TCP/IP Services are:

2.1 Overview of the Host Resources MIB

The Host Resources MIB defines a uniform set of objects useful for the management of host computers. The Host Resources MIB, described by RFC 1514, defines objects that are common across many computer system architectures. The TCP/IP Services implementation of SNMP includes many of these defined objects. In addition, some objects in MIB II provide host management functionality.

2.1.1 Defining Host Resources MIB Implemented Objects

This section defines each of the implemented eSNMP objects. Table 2-1 provides a general RFC description and a specific OpenVMS description for each implemented object.

Table 2-1 Host Resources MIB Objects
Object Name RFC Description OpenVMS Description
hrSystemUptime The amount of time since this host was last initialized. Time since system boot (in hundredths of a second).
hrSystemDate The host's notion of the local date and time of day. Date and time character string with Coordinated Universal Time (UTC) information if available.
hrSystemIntialLoadDevice Index of the hrDeviceEntry for configured initial operating system load. Index of SYS$SYSDEVICE in the device table.
hrSystemIntialLoadParameters Parameters supplied to the load device when requesting initial operating system configuration. A string of boot parameters from the console (Alpha only).
hrSystemNumUsers Number of user sessions for which the host is storing state information. Number of processes that are neither owned by another process nor running detached.
hrSystemProcesses Number of process contexts currently loaded or running on the system. Number of processes listed using the SHOW SYSTEM command.
hrSystemMaxProcesses Maximum number of process contexts the system can support, or 0 if not applicable. SYSGEN parameter MAXPROCESSCNT.
hrMemorySize The amount of physical main memory contained in the host. The amount of physical main memory contained in the host.
hrStorageIndex A unique value for each logical storage area contained in the host. Index of entry in hrStorageTable.
hrStorageType The type of storage represented by this entry. A numeric representation of the device class and type displayed by the SHOW DEVICE/FULL command.
hrStorageDescr A description of the type and instance of the storage described by this entry. Character string device type displayed by the SHOW DEVICE/FULL command.
hrStorageAllocationUnits The size of the data objects allocated from this pool (in bytes). Always 512 (the size of an OpenVMS disk block).
hrStorageSize The size of storage in this entry in hrStorageAllocationUnits. The total number of blocks on a device displayed by the SHOW DEVICE/FULL command.
hrStorageUsed The allocated amount of storage in this entry in hrStorageAllocationUnits. The total number of used blocks on a device displayed by the SHOW DEVICE/FULL command.
hrDeviceIndex A unique value for each host or device constant between agent reinitialization. Index of entry in hrDeviceTable.
hrDeviceType An indication of the type of device. Some of these devices have corresponding entries in other tables. In object identifier format, a numeric representation of the device class and type displayed by the SHOW DEVICE/FULL command.
hrDeviceDesc A text description of the device, including manufacturer and version number (service, optional). Character string of the device type displayed by the SHOW DEVICE/FULL command.
hrDeviceStatus The current operational state of the device. A numeric indication of the status of the device.
hrDeviceErrors The number of errors detected on the device. The recommended initial value is zero. The number of errors indicated by the SHOW DEVICE command. This value is initialized to zero when the device is recognized by the system instead of when the master agent is initialized.
hrProcessorFrwID The product ID of the firmware associated with the processor. An object identifier that corresponds to the console or PALcode version (Alpha only).
hrNetworkIfIndex The value of the ifIndex that corresponds to this network device. The value of the index in the interface table in the standard MIB that corresponds to this network device.
hrDiskStorageAccess Indicates whether the storage device is read/write or read only. This value is set to 2 if the device is read only; otherwise, it is set to 1. (The SHOW DEVICE/FULL command displays "software write-locked.")
hrDiskStorageMedia Indicates the storage device media type. Indicates device type.
hrDiskStorageRemovable Indicates whether the disk can be removed from the drive. Indicates whether the disk can be removed from the drive.
hrDiskStorageCapacity The total size of this long-term storage device. Half of the value for total blocks displayed by the SHOW DEVICE/FULL command.
hrSWRunIndex A unique value for each software product running on the host. Process ID.
hrSWRunPath A description of the location where this software was loaded. Fully qualified name of executable image.
hrSWRunStatus The status of the software that is running. The values and the associated status of each are:
  • 1 indicates that the current process is running (CUR)
  • 2 indicates that the process is computable (COM)
  • 3 indicates that you cannot run the process.
hrSWRunPerfCPU The number (in hundredths of a second) of the total system's CPU resources consumed by this process. Process elapsed CPU time (in hundredths of a second).
hrSWRunPerfMem The total amount of real system memory allocated to this process. Process current working set (in kilobytes).

2.1.2 Restrictions to Host Resources MIB

SNMP requests are not implemented for the following Host Resources MIB objects:


hrPartitionTable 
hrPrinterTable 
hrSWInstalled 
hrSWInstalledTable 

SNMP set requests are not implemented for the following Host Resources MIB objects:


hrFSLastFullBackupDate 
hrFSLastPartialBackupDate 
hrStorageSize 
hrSWRunStatus 
hrSystemDate 
hrSystemInitialLoadDevice 
hrSystemInitialLoadParameters 

Note

For objects that are not implemented, the Host Resources MIB returns a NoSuchObject error status.

TCP/IP Services supports the objects in the Host Resources MIB as follows:


Previous Next Contents Index