mkcimreg Command

Purpose

Registers Common Information Model (CIM) classes and Common Manageability Programming Interface (CMPI) providers with RMC.

Syntax

To register a class:

mkcimreg [-I include_directory...] [-f] [-h] definition_file...

To register a provider:

mkcimreg [-I include_directory...] [-p provider_directory] [-h] registration_file...

To compile the CIM schema:

mkcimreg [-I include_directory...] -b schema_path [-h]

Description

The mkcimreg command registers Common Information Model (CIM) classes and Common Manageability Programming Interface (CMPI) providers with the resource monitoring and control (RMC) subsystem. You can specify one or more class definition files or provider registration files with this command. Use the -I flag to add directories to the search path. The output from mkcimreg includes the names of the files that the CIM resource manager needs for working with CIM classes.

Registering classes

If you upgrade a class using the -f flag (that is, if the class definition has changed somehow), you must re-register all classes that are subclasses of the upgraded class so that the changes introduced into the new class propagate to its subclasses. This must be done in "descending" order, because changes propagate from parent to child. The hierarchy is:
------------------
Hardware_Component
------------------
        ↑
        |
------------------
Hardware_Adapter
------------------
        ↑
        |
------------------
Hardware_Ethernet
------------------
If, for example, Hardware_Component is upgraded using mkcimreg -f, Hardware_Adapter and then Hardware_Ethernet must both be registered afterward, in that order.

After you register any classes:

You must restart RMC.

Restarting RMC

As the final step in the CIM class registration process, the RMC subsystem must be restarted. The sequence of commands to run follows:
  1. To shut down the RMC subsystem, enter:
    /usr/sbin/rsct/bin/rmcctrl -k
    When you shut down RMC:

    Any RMC-dependent resource monitoring that is in place at the time of shutdown is deactivated. Environments that rely on RMC or any of its resource managers for high availability or other critical system functions may become temporarily disabled.

  2. Wait until the following command lists the status of ctrmc as "inoperative":
    			
    lssrc -s ctrmc
  3. Shut down the CIM resource manager and confirm it has been stopped:
    stopsrc -s IBM.CIMRM
    lssrc -s IBM.CIMRM
  4. To restart the RMC subsystem, enter:
    /usr/sbin/rsct/bin/rmcctrl -A

Registering providers

The -p flag indicates that the registration file on the command line contains provider registration information. The provider library's directory is expected as this flag's parameter. Provider library names follow the CMPI/Pegasus convention of appending lib to the beginning of the ProviderName property. For example, the provider with the property ProviderName=Linux_Processor is searched for in the ProviderDirectory under the name libLinux_Processor.so. Auxiliary libraries required by providers that are not explicitly declared in the registration file must be either in the directory supplied on the command line, or in a standard system directory such as /usr/lib or /lib.

Compiling a schema

Version 2.9 of the CIM schema is shipped with the CIM resource manager. Use the -b flag if you want to upgrade to a higher version. The schema file (CIM_Schemaversion.mof) must be passed as the parameter to this flag. This file contains the entire CIM schema, usually in the form of a series of #include statements that bring in other schema MOF files.

After a CIM schema is compiled with the -b flag, mkcimreg will not need further access to the schema managed object format (MOF) files. User classes that are registered by mkcimreg against previous versions of the CIM schema need to be re-registered, so changes from the new version of the schema are reflected in any derived classes.

Flags

-I include_directory...
Specifies one or more additional directories to be searched.
-f
Overwrites any existing class registration data with the definitions that are provided in the class definition files.
-p provider_directory
Specifies a path to the provider library.
-b schema_path
Compiles the CIM schema file.
-h
Writes the command's usage statement to standard output.

Parameters

definition_file
Specifies one or more class definition files.
registration_file
Specifies one or more provider registration files.

Security

This command requires root authority.

Exit Status

0
The command has run successfully.
1
An internal command error occurred.
2
An error occurred with the command-line interface (CLI) script.
3
An incorrect flag was specified on the command line.
4
An incorrect parameter was specified on the command line.
5
A class registration error occurred.

Restrictions

You cannot register a class that derives from a class that has not yet been registered.

Implementation Specifics

This command is part of the rsct.exp.cimrm fileset, in the rsct.exp package on the AIX® Expansion Pack.

Standard Output

When the -h flag is specified, this command's usage statement is written to standard output.

Standard Error

When the -T flag is specified, this command's trace messages are written to standard error.

Examples

  1. To register the Linux_ComputerSystem CIM class if the class definition file is located in the $CIMDEFS directory, enter:
    mkcimreg $CIMDEFS/Linux_ComputerSystem.mof
    You must also register the CMPI provider for this class.
  2. To register a CMPI provider when the registration file is located in the $CIMDEFS directory and the provider library is in the $CMPIHOME directory, enter:
    mkcimreg -p $CMPIHOME $CIMDEFS/Linux_ComputerSystemRegistration.mof
  3. To compile Version 2.12 of the CIM schema, enter:
    mkcimreg -I $SCHEMA_DIR -b CIM_Schema2.12.mof 
    $SCHEMA_DIR, which indicates a search path for schema MOF files, is not required, but could help mkcimreg find the required MOF files if they are not in the current working directory from which the command is run.

Location

/usr/sbin/rsct/bin/mkcimreg