HP Systems Insight Manager User Manual
Page 116
Use of the -d switch is not necessary when you have copied all MIBs, including dependency MIBs, to the
directory and execute mcompile from the
which directory contains the MIB files to be compiled into Systems Insight Manager. The directory path must
be specified as relative to the full path or relative to the
As output, mcompile produces a CFG file and save it to the
name as the source MIB except it has the .cfg suffix. In the typical usage mentioned above, the resulting
output file would be test.cfg. Running mcompile several times against the same source MIB produces
multiple revisions of the CFG with the latest version retaining the .cfg extension. CFG files are stripped-down
versions of the original source MIBs where all comments have been removed, all imports from other MIBs
have been resolved and substituted as needed, and the compiler has converted v2 syntax to v1 where
appropriate.
When compiling MIBs with dependencies, the dependent MIB must be located in the same directory as the
target MIB and must follow a certain naming convention, typically MIBMODULE.MIB. An example follows
using excerpts from the CPQFCA MIB:
CPQFCA-MIB DEFINITIONS ::= BEGIN
IMPORTS
compaq
FROM CPQHOST-MIB
enterprises
FROM RFC1155-SMI
DisplayString
FROM RFC1213-MIB
OBJECT-TYPE
FROM RFC-1212
TRAP-TYPE
FROM RFC-1215
cpqSsChassisName
FROM CPQSTSYS-MIB
mcompile
searched for compaq by opening the file CPQHOST.MIB and mcompile looks for
cpqSsChassisName in CPQSTSYS.MIB. The other imports are resolved automatically when mcompile runs
from the
automatic import during compilation. mcompile automatically resolves and imports internally from RFC1155.
Another example of imports during compilation comes from the BLADETYPE2-TRAP.MIB used by the HP
ProLiant BL p-Class GbE2 Interconnect Switch:
BLADETYPE2-TRAP-MIB DEFINITIONS ::= BEGIN
IMPORTS
TRAP-TYPE
FROM RFC-1215
sysName
FROM RFC1213-MIB
hpSwitchBladeType2-Mgmt
FROM HP-SWITCH-PL-MIB
agSlotNumber
FROM BLADETYPE2-SWITCH-MIB
ipCurCfgGwIndex
FROM BLADETYPE2-NETWORK-MIB
In this example,
TRAP-TYPE and sysName are readily resolved as in the example above.
hpSwitchBladeType2-Mgmt is resolved by mcompile checking HP-SWITCH-PL.MIB. agSlotNumber is
116
Compiling and customizing MIBs