Re: How to include your own MIBs

Juergen Schoenwaelder (schoenw@data)
Thu, 25 Aug 94 14:18:51 +0200

Hi!

Juergen> BTW, our SNMPv1/v2 implementation which will replace the
Juergen> current SNMP module sometimes in the future (dont ask me what
Juergen> this means) reads a MIB ASN.1 file at runtime. If you can
Juergen> wait, it will become as simple as typing 'cat my.mib >>
Juergen> scotty.mib'.

Reto> PLEASE have a second thought about this, before you do it.
Reto> Myself, I use an enormous mib-file including many rfcs,
Reto> experimental mibs and private mibs. I have doubts that a
Reto> runtime translation of my mibs would be feasible with
Reto> reasonable performance.

I think it is the job of the MIB module to provide fast and easy
access to MIB information. And I think it is desirable that the MIB
module accepts an ASN.1 MIB file without any preprocessing. If it
turns out to be too slow to parse the MIB file during startup, it is
the MIB module that needs to care about more efficient data
structures. A dbm file is one option, but the dbm file should be
maintained by the MIB module itself, not by a human plus a set of
other programs. (The MIB module can check the touch date of the ASN.1
MIB file and recreate its own data structures on the fly if needed.)

Some concrete numbers: Our parser reads the definition of about 500
objects in 1 second on a SUN IPC and needs about 40 Bytes memory for
each object. This seems acceptable to me for say up to 1000 objects
(2 seconds load time and 40k memory). I consider the memory usage no
problem, even 400k for 10.000 objects would be acceptable for me. The
loading time can be reduced by writing and reading an internal format
of the in memory data structures. Switching to dbm is perhaps more
attractive, but again, its something that should be handled inside of
the MIB module.

Any comments on this? How many objects do you have in your MIB files?
Are there any other criteria that should be considered in this
context?

Reto> I always found that the approach with smic and smic2dbm was
Reto> pretty easy.

Thanks for your hints on creating SMIC files. It looks like I will
start another trial. BTW, is it possible to concatenate smic output
files and to feed the result into smic2dbm? If yes, we could collect
smic output files for all those people that don't have SMIC and/or
would like to use `precompiled' versions.

Juergen