Backend processes for publishing and unpublishing MIB files
This topic discusses the procedures to publish and unpublish MIB files. These procedures are back-end processes and have been documented only for your reference.
Publishing MIB files
The cell automates the publish MIBs process. The following steps describe how the MIB files are published.
- The new MIB files are moved from your local computer to the Net-SNMP directory.
- Before overwriting a MIB file that already exists in the Net-SNMP directory, a backup of that file is saved in the installationDirectory\pw\server\tmp\Adapters\snmpAdapter\mibs directory.
- The mib2map.pl utility, which is located in the installationDirectory\pw\server\bindirectory, is run. It generates the following four output files:
- mcsnmptrapdmib.baroc: This file contains the BAROC class definitions of the SNMP Traps found.
- mcsnmptrapdmibe.baroc: This file contains the BAROC enumerations of the MIB enumerated variables that are sent by traps.
- mcsnmptrapdmib.dat: This file contains information about object identifiers (OIDs), symbolic names, enumerations and indexes found in MIB traps.
- mcsnmptrapdmib.map: This file converts traps into BAROC.
- The four output files are saved in the installationDirectory\pw\server\bin directory.
- A backup of the previous mcsnmptrapd.dat file is saved in the installationDirectory\pw\server\tmp\Adapters\snmpAdapter\mib2mapOutput directory.
A backup of the previous mcsnmptrapd.map file is saved in the installationDirectory\pw\server\tmp\Adapters\snmpAdapter\map directory. The file is renamed to mcsnmptrapdLastModified.map.
- The mcsnmptrapdmib.dat and mcsnmptrapdmib.map files are renamed to mcsnmptrapd.dat and mcsnmptrapd.map respectively, and moved to the installationDirectory\pw\server\etc directory.
The customizations in the previous mcsnmptrapd.map file are merged with the new mcsnmptrapd.mapfile.
All the invalid MIB files in the Net-SNMP directory are identified and displayed in the status area. Before you manually delete an invalid file existing in the Net-SNMP directory, ensure that the invalid file does not support any valid MIB files.
Unpublishing MIB files
The cell automates the unpublish MIB files process. The following steps describe how the MIB files are unpublished.
- A backup of the mcsnmptrapd.map and mcsnmptrapd.dat files is saved in the installationDirectory\pw\server\backup\Adapters\snmpAdapter\removeMib directory. These two files are located in the installationDirectory\pw\server\etc directory.
- The mcsnmptrapd.map template file is copied to the installationDirectory\pw\server\etc directory.
- A backup of the mcsnmptrapdmib.baroc and mcsnmptrapdmibe.baroc files is saved in the installationDirectory\pw\server\backup\Adapters\snmpAdapter\removeMib directory. These two files are located in the installationDirectory\pw\server\bin directory.
- The following tasks are repeated for each MIB file that has to be unpublished.
- The modules within the MIB file that has to be unpublished are identified.
- The mib2map.pl utility, which is located in the installationDirectory\pw\server\bin directory, is run only for the MIB file that has to be unpublished. The four output files that are generated are mcsnmptrapdmib.baroc, mcsnmptrapdmibe.baroc, mcsnmptrapdmib.dat, and mcsnmptrapdmib.map. The four output files are saved in the installationDirectory\pw\server\bin directory.
- The classes created for the MIB file are extracted from the mcsnmptrapdmib.map file, which is located in the installationDirectory\pw\server\bin directory. The same classes are then removed from the mcsnmptrapd.map file, which is located in the installationDirectory\pw\server\etc directory.
- The content of the mcsnmptrapd.dat file, which is located in the installationDirectory\pw\server\bin directory, is referenced and then the same content is removed from the mcsnmptrapd.dat file, which is located in the installationDirectory\pw\server\etc directory.
- The backup of the mcsnmptrapdmib.baroc and mcsnmptrapdmibe.baroc files, which are located in the installationDirectory\pw\server\backup\Adapters\snmpAdapter\removeMib directory, is restored to the installationDirectory\pw\server\bin directory.
- The MIB files that are unpublished are also removed from the Net-SNMP directory.