HP Systems Insight Manager User Manual

Page 147

Advertising
background image

directory by default so any MIB that you intend to register should be copied to the <BASE>\mibs
directory. While mcompile does provide some capability to specify a different directory to search
for MIBs, as a best practice HP strongly recommends you place all MIBs in the <BASE>\mibs
directory. Usage for mcompile is as follows:

mcompile [-d <dirspec>] <mibfile></

Use of the -d switch is not necessary when you have copied all MIBs, including dependency MIBs,
to the <BASE>\mibs directory and execute mcompile from the <BASE>\mibs directory. The -d
switch specifies which directory contains the MIB files to be compiled into HP SIM. The directory
path must be specified as relative to the full path or relative to the <BASE> directory.

As output, mcompile produces a CFG file and save it to the <BASE>\mibs directory. This file has
the same 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 <BASE>\mibs directory. HP provides versions of the RFC 1212, 1213,

and 1215 MIBs for 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

MIB management tools

147

Advertising