Solaris WBEM Services Administrator's Guide

The mofcomp Command

The mofcomp command compiles the specified MOF file into CIM classes and instances that are stored in the CIM Object Manager Repository as Java classes and passed to the CIM Object Manager.

You must run the mofcomp command as root or as a user with write access to the namespace in which you are compiling.

/usr/sadm/bin/mofcomp [-help] [-v] [-sc] [-si] [-sq] [-version] [-c cimom_hostname ] [-u username] [-p password] file
-help

List the arguments to the mofcomp command.

-c cimom_hostname

Specify a system running the CIM Object Manager.

-p password

Specify a password for connecting to the CIM Object Manager. Use this option for compilations that require privileged access to the CIM Object Manager. If you specify both -p and -u, you must type the password on the command line, which can pose a security risk. A more secure way to specify a password is to specify -u but not -p, so that the compiler will prompt for the password.

-sc

Run the compiler with the set class option, which updates a class if it exists and contains no instances, and returns an error if the class does not exist. If you do not specify this option, the compiler adds a CIM class to the connected namespace, and returns an error if the class already exists.

-si

Run the compiler with the set instance option, which updates an instance if it exists, and returns an error if the instance does not exist. If you do not specify this option, the compiler adds a CIM instance to the connected namespace, and returns an error if the instance already exists.

-sq

Run the compiler with the set qualifier types option, which updates a qualifier type if it exists, and returns an error if the qualifier type does not exist. If you do not specify this option, the compiler adds a CIM qualifier type to the connected namespace, and returns an error if the qualifier type already exists.

-u username

Specify user name for connecting to the CIM Object Manager. Use this option for compilations that require privileged access to the CIM Object Manager. If you specify both -p and -u, you must type the password on the command line, which can pose a security risk. A more secure way to specify a password is to specify -u but not -p, so that the compiler will prompt for the password.

-v

Run the compiler in verbose mode, which displays compiler messages.

-version

Display the version of the MOF compiler.

The mofcomp command will exit with 0 upon success and a positive integer upon failure.