2.10.10 Configuring more than one extended MIB definition file
When you want to add extended MIB definition files to SNMP Agent, you must create new extended MIB definition files.
The following figure gives an overview of the procedure for creating an extended MIB definition file per program and setting the created extended MIB definition files in SNMP Agent.
- Organization of this subsection
(1) How to add the extended MIB definition file
This subsection describes how to add the created extended MIB definition file to SNMP Agent.
-
Storing the extended MIB definition file
Either copy the extended MIB definition file to the /opt/CM2/ESA/ext directory and change the file extension to .def or create a symbolic link.
The maximum length of the file name is 12 characters including the extension (1-to-8-characters.extension).
Set the attributes of the file in such a manner that the extsubagt process (owner: bin, group: bin) can read them.
To set the start options for the extended MIB objects that are to be added, create an option definition file under the /opt/CM2/ESA/ext directory. For details about how to create an option definition file, see 2.10.10(3) How to set the startup options definition file for an extended MIB object.
-
Reading the extended MIB objects
In order to provide the extended MIB objects, you must start the extsubagt process that is specified in the extended MIB definition file.
You can start the extsubagt process specified in the extended MIB definition file either by stopping SNMP Agent or without stopping SNMP Agent. Each method is explained below.
<Adding the extended MIB definition file by stopping SNMP Agent>
To add the extended MIB definition file by stopping SNMP Agent:
-
Execute the /opt/CM2/ESA/bin/snmpstop command as a superuser.
SNMP Agent stops.
-
Execute the /opt/CM2/ESA/bin/snmpstart command as a superuser.
SNMP Agent starts, and then the extsubagt process specified in the extended MIB definition file starts.
<Adding the extended MIB definition file without stopping SNMP Agent>
-
Execute the /opt/CM2/ESA/bin/snmpstart -e command as a superuser.
The extsubagt process specified in the extended MIB definition file starts.
-
(2) Checking whether extsubagt has started for each extended MIB definition file
Use the snmpcheck command to check whether extsubagt, specified in the defined extended MIB definition file, has started.
The following figure shows how to check whether all the extsubagt programs have normally started when the /etc/SnmpAgent.d/snmpd.extend file has been set, in addition to the extended MIB definition files (ProgA.def, ProgB.def, and ProgC.def) under the /opt/CM2/ESA/ext directory.
(3) How to set the startup options definition file for an extended MIB object
The following procedure shows how to specify startup options for an extended MIB object. These options are enabled at the start of the OS or SNMP Agent.
Procedure
-
Create a startup options definition file with the extension opt in the /opt/CM2/ESA/ext folder.
Make sure that the attributes of the file allow the extsubagt process (owner: bin, group: bin) to read the file.
The following are the names of the extended MIB definition file and startup options definition file that are to be created:
-
Name of the extended MIB definition file: /opt/CM2/ESA/ext/ProgA.def
-
Name of the startup options definition file: /opt/CM2/ESA/ext/ProgA.opt
-
-
Set the options you want to enable when executing the extended MIB object.
The figure below shows how to set options when specifying the following settings:
-
Command response interval specified in FILE_COMMAND: 20 seconds
-
Pipe response monitoring interval specified in PIPE_IN_NAME and PIPE_OUT_NAME: 25 seconds
-
Whether to use the ID in the data match judgment for the data sent or received through a pipe: Yes
Figure 2‒7: Example of setting the options to be enabled during execution of an extended MIB object
-
Perform the following procedure to change the options for an active extended MIB object without stopping SNMP Agent:
Procedure
-
Execute the snmpcheck command.
-
Check the process ID of the extended MIB object for which you want to change the options.
-
Execute kill -9 process-ID-obtained-in-step-2 as a superuser.
The extended MIB object stops.
-
Edit the startup options definition file.
-
Execute /opt/CM2/ESA/bin/snmpstart -e as a superuser.
SNMP Agent starts.
(4) Notes
-
The files that are placed under the /opt/CM2/ESA/ext directory, but that do not have .def as an extension, are not read as extended MIB definition files.
-
The contents of an extended MIB definition file are checked when SNMP Agent starts. If the file has an error, SNMP Agent does not start. Therefore, you must perform syntax checking before startup using the following process:
- In HP-UX (IPF):
-
/opt/CM2/ESA/bin/extsubagt -e extended-MIB-definition-file -p -apall
- In Solaris, AIX and Linux:
-
/usr/sbin/extsubagt -e extended-MIB-definition-file -p -apall
-
You can define a maximum of 100 extended MIB definition files.