[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 3


mosy Command

Purpose

Converts the ASN.1 definitions of Structure and Identification of Management Information (SMI) and Management Information Base (MIB) modules into objects definition files for the snmpinfo command.

Syntax

mosy -o OutputFile [ -s ] InputFile ...

Description

The mosy command reads in the ASN.1 definitions of SMI and MIB modules and produces objects definition files in specific formats. The resulting objects definition files are used by the snmpinfo command.

The InputFile parameter files are required to be in the smi.my or mibII.my format. Sample files are the /usr/samples/snmpd/smi.my and /usr/samples/snmpd/mibII.my files. See the smi.my and the mibII.my files for information on the required format of the file specified by the InputFile parameter.

The mosy -o command is used to create the objects definition file specified by the OutputFile parameter for the snmpinfo command. This file is normally the /etc/mib.defs file.

The objects definition file can be created with one pass of the mosy compiler if the smi.my and mibII.my files are both specified as InputFile parameters. The smi.my file must precede the mibII.my file on the command line.

The mosy -o command can also be used to create subfiles. If subfiles are created separately from the SMI and MIB modules, you must concatenate the various subfiles before the snmpinfo command can successfully use the resultant mib.defs file. The SMI subfile must be at the top of the final objects definition file.

You can add objects definitions for experimental MIB modules or private-enterprise-specific MIB modules to the /etc/mib.defs file, but you must first obtain the private MIB module from the vendor that supports those MIB variables.

To update the /etc/mib.defs file to incorporate a vendor's private or experimental MIB objects definitions, create a subfile and then concatenate that subfile to the existing MIB II /etc/mib.defs file. See example 3.

Flags


-o OutputFile Defines the path and file name of the MIB objects definition file for the snmpinfo command. There is no default path and file name for this flag. If this flag is not specified, the objects definition file is not created.
-s Suppresses the conversion verification messages. If this flag is not specified, the conversion verification messages are printed to standard output.

Parameters


InputFile Defines the ASN.1 object definitions module for input to the mosy compiler. This file can be formatted according to either the smi.my or mibll.my file format.

Examples

  1. To create an objects definition file for use by the snmpinfo command with one pass of the mosy command, enter:

    mosy -o /etc/mib.defs /usr/samples/snmpd/smi.my
    /usr/samples/snmpd/mibII.my
    

    In this example, /usr/samples/snmpd/smi.my and /usr/samples/snmpd/mibII.my are both specified as input files and the resultant objects definition file is the /etc/mib.defs file.

  2. To create objects definition subfiles, enter:

    mosy -o /tmp/smi.obj /usr/samples/snmpd/smi.my
    mosy -o /tmp/mibII.obj /usr/samples/snmpd/mibII.my
    cat /tmp/smi.obj /tmp/mibII.obj > /etc/mib.defs
    

    In this example, the first command creates an SMI objects file, /tmp/smi.obj, from the /usr/samples/snmpd/smi.my file. The second command creates the MIB objects definition file, /tmp/mibII.obj, from the /usr/samples/snmpd/mibII.my file. The final command concatenates the subfiles, placing the SMI objects definition file first in the resultant /etc/mib.defs file.

  3. To add private enterprise specific MIB objects definitions to an existing /etc/mib.defs file for use by the snmpinfo command, enter:

    mosy -o /tmp/private.obj /tmp/private.my
    cat /etc/mib.defs /tmp/private.obj > /tmp/mib.defs
    mv /tmp/mib.defs /etc/mib.defs
    

    In this example, the first command creates the /tmp/private.obj objects definition file. The second command concatenates the /etc/mib.defs MIB objects definition file with the /tmp/private.obj private MIB file and places the concatenated contents into the /tmp/mib.defs temporary MIB objects definition file. The final command moves the temporary file to the /etc/mib.defs file for use by the snmpinfo command.

Files


/etc/mib.defs Defines the Management Information Base (MIB) variables the SNMP agent should recognize and handle. The format of the /etc/mib.defs file is required by the snmpinfo command.
/usr/samples/snmpd/smi.my Defines the ASN.1 definitions by which the SMI is defined as in RFC 1155.
/usr/samples/snmpd/mibII.my Defines the ASN.1 definitions for the MIB II variables as defined in RFC 1213.

Related Information

The snmpinfo command.

Understanding the Management Information Base (MIB), Understanding Terminology Related to Management Information Base (MIB) Variables in AIX 5L Version 5.1 Communications Programming Concepts.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]