cimmof(1)

πŸ“¦ version 2.14.1, in centos-stream 10, centos-stream 9, fedora 43, fedora 44

✨ NAME ✨

cimmof β€” compile MOF files into the CIM Repository. it's a section 1 manual page, and yes bestie, you're gonna wanna read the whole thing πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹


cimmof --version

cimmof [ -w ] [ -E ] [ -uc ] [ -aE | -aV | -aEV ] [ -I path ]
       [ -n namespace ] [ --namespace namespace ] [ --xml ]
       [ --trace ] [ mof_file ... ]

πŸ’« Remarks πŸ’«

okay so real talk before you go wild:

  • only a superuser, or a user with write access to the default-or-specified namespace, can run cimmof to compile MOFs into the CIM Repository. so like, permissions check first, queen πŸ‘‘
  • superclasses must be compiled before subclasses. if you don't, the compile literally just fails. no cap. πŸ’€
  • it is strongly recommended that your MOF files include all the necessary subclasses, so they can compile properly even if certain classes are not in the CIM Repository. future-proofing, we love to see it 🫢

🌈 DESCRIPTION 🌈

cimmof is the command line interface to the Managed Object Format (MOF) Compiler. the MOF Compiler is a utility that compiles MOF files (using the MOF format defined by the DMTF CIM Specification) into CIM classes and instances that get stored in the CIM Repository. iconic behavior, honestly ✨

you can run cimmof to compile MOF files at any time after installation. and if you don't specify an input file? stdin is used as the input. it's giving flexible πŸŽ€

the MOF Compiler requires that the input MOF files be in the current directory, or that you give a fully qualified path. and to simplify specifying a bunch of MOF files on the cimmof command line, the MOF Compiler lets you compile from files containing a list of MOF files using the include pragma (shown below):

#pragma include ("application.mof")
#pragma include ("server.mof")

MOF files using the include pragma must live in the current directory, or in a directory specified by the -I command line option. πŸ“

the -n option can be used to specify a R namespace in which the CIM classes and instances will be compiled. if this option is not specified, the default R namespace is root/cimv2 (with the exception of provider registration schemas).

for provider registration schemas: if the -n option is not specified, the default R namespace is root/PG_InterOp. if the -n option is specified, the R namespace you give must be root/PG_InterOp β€” otherwise, the error message The requested operation is not supported. gets returned. 😭 and for provider MOFs, the R namespace you specify must match one of the namespaces specified in the PG_ProviderCapabilities class schema definition.

πŸ”₯ Options πŸ”₯

the cimmof command recognizes the following options:

  • -aE β€” Allow Experimental Schema changes.
  • -aEV β€” Allow both Experimental and Version Schema changes.
  • -aV β€” Allow both Major and Down Revision Schema changes.
  • -E β€” Syntax check only.
  • -h, --help β€” Display command usage information.
  • -I path β€” Specify the path to included MOF files. this path may be relative or absolute.

if the input MOF file has include pragmas and the included files do not reside in the current directory, the directive must be used to specify a path to them on the cimmof command line.

  • -n β€” Override the default CIM Repository namespace. the namespace specified must be a valid CIM namespace name. for the definition of a valid CIM namespace name, refer to the Administrator's Guide. for provider registration schemas, the namespace specified must be root/PG_InterOp.
  • --namespace β€” Override the default CIM Repository namespace. the namespace specified must be a valid CIM namespace name. for the definition of a valid CIM namespace name, refer to the Administrator's Guide. for provider registration schemas, the namespace specified must be root/PG_InterOp.
  • --trace β€” Trace to file (default to stdout).
  • -uc β€” Allow update of an existing class definition.
  • --version β€” Display CIM Server version.
  • -w β€” Suppress warning messages.

when compiling the MOF files, if there are CIM elements (such as classes, instances, properties, or methods) defined in the MOF files which already exist in the CIM Repository, the cimmof command returns warning messages. the -w option can be used to suppress these warning messages. 🀫

  • --xml β€” Output XML only, to stdout. Do not update repository.

πŸ’œ EXIT STATUS πŸ’œ

the cimmof command returns one of the following values:

  1. 0 β€” Successful completion
  2. 1 β€” Error

when an error occurs, an error message is written to stderr and an error value of 1 is returned. bestie, watch that exit code, it's literally telling you everything 🫢


πŸŽ€ USAGE NOTES πŸŽ€

the cimmof command requires that the CIM Server is running. and if an operation requires more than two minutes to be processed, the cimmof command prints a timeout message and returns an error value. so like, don't just sit there staring at it πŸ™ˆ


🌸 DIAGNOSTICS 🌸

Error trying to create Repository in path localhost:5988: Cannot connect
to: localhost:5988 Failed to set DefaultNamespacePath.
the CIM Server is not running. Start the CIM Server with the command and re-run cimmof.

if the MOF Compiler detects an error in the MOF file while parsing the file, a parsing error is returned with the line number of the MOF file containing the error. so helpful of it, honestly ⭐

Operation cannot be carried out since the specified superclass does not
exist.
the MOF Compiler compiled a MOF file with superclasses that were not in the CIM Repository.

for a list of possible error messages that may be returned, refer to the Chapter on WBEM messages in the Administrator's Guide. πŸ“–


⭐ EXAMPLES ⭐

compile a MOF file into the default namespace in the CIM Repository β€” just issue the cimmof command with no options:

cimmof processInfo.mof

compile the MOF files into the "root/application" namespace:

cimmof -nroot/application test1.mof test2.mof

compile the MOF file defined in the directory ./MOF with the name CIMSchema25.mof, and containing include pragmas for other MOF files also in the ./MOF directory:

cimmof -w -I./MOF MOF/CIMSchema25.mof

display Usage Info for the cimmof command:

cimmof -h

🧚 SEE ALSO 🧚

cimserver(1).


and that's the whole cimmof(1) manual page, bestie β€” go compile something iconic πŸ’–βœ¨ slay, periodt πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from