JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Solaris System Management Agent Developer's Guide
search filter icon
search icon

Document Information


1.  Introduction to the System Management Agent

2.  Creating Modules

About Modules

Overview of Creating Modules

Defining a MIB

MIB File Names

Setting MIB Environment Variables

Generating Code Templates

Modifying Code Templates

Configuring the Module

Delivering the Module

Namespace Issues

Avoiding Namespace Collisions

Module Names

Library Names

3.  Data Modeling

4.  Storing Module Data

5.  Implementing Alarms

6.  Deploying Modules

7.  Multiple Instance Modules

8.  Long-Running Data Collection

9.  Entity MIB

10.  Migration of Solstice Enterprise Agents to the System Management Agent

A.  SMA Resources

B.  MIBs Implemented in SMA



Defining a MIB

MIB definition is one of the more time-consuming steps of creating a module. MIB syntax can be quite complicated, and is outside the scope of this document. Refer to Related Reading for suggestions of other sources of information about MIB syntax.

Tip - The mib2c tool, used for converting MIBs to C code, includes error checking for MIB syntax. You can use mib2c to check your MIB syntax as you create your MIB, even before you are ready to convert the MIB.

You should consider using one of the standard MIBs that are included with the SMA as a model for creating your MIB. The /etc/sma/snmp/mibs directory contains all the standard MIBs supported by the SMA.

The following MIBs can be used as examples to emulate because the MIBs have been found to work well with mib2c:

Tip - Pay particular attention to the name that is assigned for the MODULE-IDENTITY. This name should be equal to the MIB file name with the hyphens removed, and in mixed case. For example, SUN-SEA-EXTENSIONS-MIB.txt uses sunSeaExtensionsMIB for the MODULE-IDENTITY. A MIB file that does not use this format might not work with mib2c.

The file NET-SNMP-EXAMPLES-MIB.txt is also included in the /etc/sma/snmp/mibs directory, and might be helpful in explaining how to define a variety of MIB variable types.

MIB File Names

You must ensure unique names for your MIB files. All custom MIBs to be used with SMA are in the same namespace as the standard MIBs, even if you keep the custom MIBs in a separate directory. Most of the MIBs derived from RFCs have RFC numbers in their names to clearly identify the MIBs, and ensure unique names. Other MIBs follow naming conventions, which decrease the chances of duplicate names.

MIBs are usually named with the following conventions:

A sample name that uses these conventions is ACME-ROUTER-MIB.txt.