WBEMfor Solaris on Sun Developer's Guide

Compiling a MOF File

Using the MOF Compiler, you can compile all MOF files with or without a .mof extension. You can start the compiler in any directory where you want to compile a file. All MOF files that make up the CIM and Solaris Schemas are located in the path: /opt/SUNWconn/wbem/schema.

How to Compile a MOF File
  1. Change directories to the location of the MOF Compiler.

    % cd /opt/SUNWconn/wbem/bin/ 
    
  2. To run the MOF Compiler without parameters, type the following command:

    % mofcomp <filename>
    

    At the prompt, type the path and name of the MOF file that you want to compile.

    For example, type: /opt/SUNWconn/wbem/schema/Solaris_Schema1.0.mof

    The MOF file is compiled.

Example of MOF Output

The following example shows MOF output after compiling the file:


Example 3-2 Sample MOF Output

Initializing CIMValue
Parsing input file
Parsing input file
Parsed input file
MofcBackend:
NamespaceTable:
{}End of NamespaceTable
QualifierTypesTable:
{}End of QualifierTypesTable
Syntax Errors: 0
Semantic Errors: 0
Warnings: 0
End of MofcBackend