Overview ~ smcconf |
The SMC object registry is a repository of object information used by the SMC console to configure toolboxes, tools, and services. All tools and services must be registered in the SMC object registry. Tools must be associated with a toolbox before they can appear in an SMC console.
The registry of SMC contains two types of entries: SMC beans and toolboxes. Executable components, like client side GUI/CLI tools, external client providers, server side services, are considered beans and are deployed in the format or jar files. All the beans can have additional library jars attached to them. Toolboxes are XML-based files that describe collections of tool beans and the presentation layout of them. We will only cover the registration part of those created toolboxes and several command line editing commands that shell scripts can use. SMC comes with a GUI toolbox editor that can help administrators to create the toolboxes.
![]() |
smcconf is a command-line tool for administering the SMC registry. It provides the capability to manipulate a toolbox and perform various registry-related tasks. The smcconf command is explained more later in this section. |
The SMC registry contains information about:
If you want the tool be displayed inside an SMC console, you need to:
These steps are described more later in this section.
![]() |
SMC-based tools may or may not refer to backend SMC services. If the tool is dependent on any backend SMC service(s), the service(s) also need(s) to be registered using smcconf . Unless the dependent service(s) are registered, SMC will not be able to invoke or display the corresponding tool.
|
The name of the tool or service bean can be found in the manifest of the jar file specified on the command line. The bean name can be used later to unregister the tool or service, or as a handle to which libraries/properties may be attached or detached.
smcconf
Some of the common object registry tasks you can perform with the smcconf
tool include:
Each of these tasks is discussed below.
Registering the tool or service jar file does not remove the jar file from its original location. It simply makes the tool or service usable from within the SMC by adding the information related to the new tool or service to the SMC registry. The command used to register a tool or service bean is:
smcconf repository add bean <path>/<jarfile>.jar
If the tool or service bean has already been registered, smcconf
will not allow you to overwrite the existing tool/service bean unless you use the -f
option as show below.
smcconf repository add -f bean <path>/<jarfile>.jar
where <jarfile>.jar
is an existing tool or service bean.
For example, to register /usr/lib/MyTool.jar
:
smcconf repository add -f bean /usr/lib/myTool.jar
Any service jar that requires a native library can simply include the native library in the jar file, but also add an entry for the native library to the manifest file, as discussed in Packaging.
Unregistering a tool or service will make it unavailable from within the SMC. It removes the registered tool or service information from the SMC registry. The command used to unregister a tool or service is:
smcconf repository remove bean <beanname>
where <beanname>
is a registered tool or service.
For example, to unregister the bean com.mycompany.myproduct.MyTool
:
smcconf repository remove bean com.mycompany.myproduct.MyTool
You can attach or detach resource jars to or from any of the following:
Any SMC bean can have pluggable libraries attached to it. These library jars can be resource bundles in different locales, as well as function code that needs to be seperately upgradable. Library jars that are attached to specific beans will be visible to that bean only at runtime. However, there are 3 special bean keywords recognized by smcconf that allow you to control the scope of library usage on a wider scale: ALL
allows the library to be used by all tools and services, ALLTOOL
allows the library to be used only by other tools, and ALLSERVICE
allows the library to be used only by other services.
![]() |
Use the -f (force) option to override any resource jar attachment. The -f option can be used while attaching a library jar only. |
Attaching Tool/Service beans
The command used to attach a resource jar to a tool or service is:
smcconf repository add library <beanname> <path>/<jarfile>.jar |
where <beanname>
is a registered tool or service and <jarfile>.jar
is the library resource jar
For example, to attach a localization library jar /usr/lib/MyTool_fr.jar
to the already registered bean com.mycompany.myproduct.MyTool
:
smcconf repository add library com.mycompany.myproduct.MyTool /usr/lib/MtTool_fr.jar |
Detaching Tool/Service beans
The command used to detach a resource jar from a tool or service is:
smcconf repository remove library <beanname> <jarfile>.jar |
where <beanname>
is a registered tool and <jarfile>.jar
is the resource jar
For example, to detach the localization library MyTool_fr.jar
from the tool com.mycompany.myproduct.MyTool
:
smcconf repository remove library com.mycompany.myproduct.MyTool MyTool.jar |
All tools
To add a resource jar attachment to be shared by all registered tools only, use the following command:
smcconf repository add library ALLTOOL <jarfile>.jar |
To remove any jar attachment which is shared by all registered tools only, use the following command:
smcconf repository remove library ALLTOOL <jarfile>.jar |
All services
To add a resource jar attachment to be shared by all registered services only, use the following command:
smcconf repository add library ALLSERVICE <jarfile>.jar |
To remove any jar attachment which is shared by all registered services only, use the following command:
smcconf repository remove library ALLSERVICE <jarfile>.jar |
All tools and services
To add a resource jar attachment to be shared by all registered tools and services, use the following command:
smcconf repository add library ALL <jarfile>.jar |
To remove any jar attachment which is shared by all registered tools and services, use the following command:
smcconf repository remove library ALL <jarfile>.jar |
You can define and undefine properties (key/value pairs) for any of the following:
![]() |
As with library jars, the keywords ALL , ALLTOOL , and ALLSERVICE allow you to control the scope of properties beyond specific beans. |
Tool/Service Beans
Tools and services can have properties associated to their registry entries. To add properties to a registered tool/service, use the commmand below. More than one property could be added at a time to the specified tool/service as shown below by specifying multiple -P <key=value>
arguments.
smcconf repository add property -P HOMEDIR=/tmp -P MYHOME=/home/kd <beanname> |
The above command will add two properties (HOMEDIR=/tmp
and MYHOME=/home/kd
to the <beanname>
bean).
To remove properties already defined on the specified registered tool/service, use the following command:
smcconf repository remove property -P HOMEDIR -P MYHOME <beanname> |
or
smcconf repository remove property -P HOMEDIR=/tmp -P MYHOME=/home/kd <beanname>lt:beanname<beanname>gt; |
Any one of the above commands can be used for removing the specified properties.
All tools
To add properties to be shared by all registered tools, use the following command:
smcconf repository add property -P HOMEDIR=/tmp ALLTOOL |
To remove properties shared by all registered tools, use the following command:
smcconf repository remove property -P HOMEDIR=/tmp ALLTOOL |
All services
To add properties to be shared by all registered services, use the following commmand
smcconf repository add property -P HOMEDIR=/tmp ALLSERVICE |
To remove properties shared by all registered services, use the following commmand:
smcconf repository remove property -P HOMEDIR=/tmp ALLSERVICE |
or
smcconf repository remove property -P HOMEDIR ALLSERVICE |
All tools and services
To add properties to be shared by all registered tools and services, use the following command:
smcconf repository add property -P HOMEDIR=/tmp ALL |
To remove properties shared by all registered tools and services, use the following command:
smcconf repository remove property -P HOMEDIR=/tmp ALL |
or
smcconf repository remove property -P HOMEDIR ALL |
Specific resource jar in a specific tool/service bean
It is also possible to add/remove properties to a specified resource jar attachment to a specified tool/service bean; for example, CronTool.client.VCronTool
tool has two resource jar attachments: CronTool_C.jar
and CronHelpSet.jar
.
To add properties to the CronHelpSet.jar
resource jar attachment only, use the following command:
smcconf repository add property -P HOMEDIR=/tmp \ |
Folders
To create a folder in a toolbox:
smcconf toolbox add [-f] folder "Devices" [-F "Hardware] "Device Mgt. Tools" \ |
The above command will create the "Devices" folder, as a subfolder inside the "Hardware" folder, in the toolbox file /home/user/myToolbox.tbx.
The specified icons and description of "Device Mgt. Tools" will be be used to represent the folder in the SMC console.
To remove a folder from a toolbox:
smcconf toolbox remove folder "Devices" -B /home/user/myToolbox.tbx |
Tools
To add a tool to a toolbox:
smcconf toolbox add [-f] tool <bean_class_name> [-D <domain>] [-H <host>:<port>] \ [-F <parent_folder>lt:parent_folder<parent_folder>gt;] [-B <toolbox_file>] [-P <key>:<value>] |
To remove a tool from a toolbox:
smcconf toolbox remove tool ... |
Links to other toolboxes
To add a link to another toolbox:
smcconf toolbox add [-f] tbxURL <toolbox_url>lt:toolbox_url<toolbox_url>gt; [-F <parent_folder>] [-B <toolbox_file>] |
Copy external toolboxes to SMC server:
smcconf toolbox add toolbox <toolbox_url> -B <toolbox_file> |
To list the contents of registered tools/services/attachments/properties, use the following command:
smcconf repository list
This command lists the following information:
Any CLI (Command Line Interface) or XAPP (X Applications) tool can also be registered with the SMC registry. This will allow the SMC to invoke the corresponding CLI/XAPP tool from within the console; for example:
smcconf toolbox add legacy -N "Ls Tool" -T CLI -E /usr/bin/ls -P " -alR "
smcconf toolbox add legacy -N "Clock" -T XAPP -E /usr/openwin/bin/xclock
For more information, please refer to the smcconf
man page.