Use the -load parameter and write a simple script. See the man page on it
for details or do xnmloadmib -?
I have attached an example a customer sent me a couple years ago using
xnmloadmib2 but that is easily changed.
But you can run out of virtual memory real fast this way, so you may see
error message about malloc's failing. And since the resulting MIB database
is loaded by trapd, you will also increase his real memory usage. Your
customer really has a need for all the MIBs representing obsolete hardware
in /usr/OV/snmp_mibs? Most shops only load what is appropriate to their
hardware.
James Shanks
Team Leader, Level 3 Support
Tivoli NetView for UNIX and NT
#!/bin/ksh
#
# @(#)VERSION: 1.0, 24/02/98
# @(#)AUTHOR: SYLVAIN TIXIER
# @(#)OBJECT: MIB Compilation
# @(#)
# ------------------------------------------------
#
# Load MIB is made on all the MIBs of the directory
# /usr/OV/snmp_mibs (the MIBs already compiled
# are not modified).
# 1 Parameter : files to compile (as expression form)
# exemple : cisco*
#
## TITLE : MIB SNMP Compilation
## BEGIN LOAD_MIB
# Parameter
MIBFILES="/usr/OV/snmp_mibs/"$1
# Cleaning temporary MIB files
rm -f /usr/OV/tmp/mib*
# Compiling MIBs
echo "Starting loading SNMP MIBS ...\n"
find $MIBFILES -type f -print |
{
while read name
do
echo "Compiling "$name
xnmloadmib2 -load $name 2>/tmp/loadstarsmib.log
grep -v "MIB File is already loaded" /tmp/loadstarsmib.log | grep -v
"Use the -replace"
done
}
# Inform Netview that MIBs have been compiled (SNMP trap)
#xnmloadmib2 -event
##END LOAD_MIB
Karsten.Schweiger@gecits-eu.com on 10/19/2000 02:52:10 PM
Please respond to IBM NetView Discussion <nv-l@tkg.com>
To: IBM NetView Discussion <nv-l@tkg.com>
cc: (bcc: James Shanks/Tivoli Systems)
Subject: [NV-L] Loading MIBs via xnmloadmib
Hi all.
In a customers environment (AIX 4.3.3, Netview 5.1.3) we want to load all
MIBs
in one process. Has anybody an idea, a script or something else?
Thanks in advance.
Mit freundlichen Gruessen - Yours sincerely
Karsten Schweiger
GE CompuNet Hamburg
Netzwerk und System Management
Ost- West Strasse 49, 20457 Hamburg, Germany
Phone: +49 (0) 431-3609-121, +49-0177-6302825, Fax: +49 (0) 431-3609-190,
E-Mail : Karsten.Schweiger@GECITS-EU.COM
This email is confidential. If you are not the intended recipient,
you must not disclose or use the information contained in it.
If you have received this mail in error, please tell us
immediately by return email and delete the document.
_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l
|