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
------------------
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
- To shut down the RMC subsystem, enter:
When you shut down RMC:/opt/rsct/bin/rmcctrl -k
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.
- Wait until the following command lists the status of ctrmc as
"inoperative":
lssrc -s ctrmc
- Shut down the CIM resource manager and confirm it has been stopped:
stopsrc -s IBM.CIMRM lssrc -s IBM.CIMRM
- To restart the RMC subsystem, enter:
/opt/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
- To register the Linux_ComputerSystem CIM
class if the class definition file is located in the $CIMDEFS directory,
enter:
You must also register the CMPI provider for this class.mkcimreg $CIMDEFS/Linux_ComputerSystem.mof
- 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
- To compile Version 2.12 of the CIM schema, enter:
$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.mkcimreg -I $SCHEMA_DIR -b CIM_Schema2.12.mof
Location
/opt/rsct/bin/mkcimreg