|Skip Navigation Links|
|Exit Print View|
|man pages section 1M: System Administration Commands Oracle Solaris 10 8/11 Information Library|
- configure the Solaris Management Console
/usr/sadm/bin/smcconf [-h] [-v] toolbox [action] [target] [parameters] [options]
/usr/sadm/bin/smcconf [-h] [-v] repository [action] [target] [parameters] [options]
The smcconf command configures the Solaris Management Console. See smc(1M). This command enables you to add to, remove from, and list the contents of the toolboxes and bean repository.
Using smcconf to edit toolboxes is not as feature-rich as using the graphical editor in Solaris Management Console. The command line interface is intended for use in packaging scripts that do not require user interaction. To edit all the properties of a toolbox or to modify the hierarchy of folders in a toolbox, you must use the specialized graphical editor, that is, smc edit. See smc(1M).
smcregister is intended to replace the smcconf command as the preferred interface for managing the Solaris Management Console repository as well as toolboxes from within scripts, due to significant performance enhancements over smcconf. See smcregister(1M), smccompile(1M), and the Solaris Management Console SDK Guide at /usr/sadm/lib/smc/docs/sdkguide/index.html for details.
The following options are supported:
Prints out a usage summary for the command.
Verbose option. Displays the debugging output at any time.
Legal values are:
Adds a target to the toolbox. Specify the path to the toolbox using the -B toolboxpath option and, optionally, provide locale information with the -L locale option.
Removes a target from the toolbox. Specify the path to the toolbox using the -B toolboxpath option and, as an alternative, provide locale information with the -L locale option.
Creates a new toolbox with no tools in it. The only target recognized is toolbox.
Lists the contents of the toolbox. No target is recognized. If you specify a parameter, it is taken as the path to a toolbox and the contents of that toolbox are listed. If you do not specify a parameter, the contents of the default toolbox are listed.
Legal values are:
If the action is specified as add, this target adds a native Solaris Management Console tool from the toolbox. The required parameter is the full Java classname of the tool you are adding. If you specify a folder name with the -F option, the tool is placed inside that folder (the folder will not be created if it does not already exist). Otherwise, the tool is appended to the end of the toolbox and not placed inside any folder.
If the action is specified as remove, this target removes a native Solaris Management Console tool from the toolbox. The required parameter is the full Java classname of the tool you want to remove. If you specify a folder name with the -F option, any tool with the given name in that folder will be removed. If no folder name is specified, all tools with the given name in the toolbox are removed.
For the tool to appear in the console, the tool must also be registered in the repository. See the repository configuration section below for more information. If a tool is referenced in a toolbox but is not registered, it will not appear in the console when the toolbox is loaded.
Removing a tool from a toolbox does not remove the tool from the server repository.
If the action is specified as add or remove, this target adds to or removes from the toolbox a link to another toolbox. The required parameter is the URL to the other toolbox.
The properties of addition and removal are the same as for the tool target.
If the action is specified as create, this target creates a skeleton toolbox with no tools. The required parameters are: the toolbox name, description, and small and large icon paths. These must be followed by the -B toolboxpath and -D scope options.
If the action is specified as add or remove, this target adds or removes legacy applications (command-line, X-windows, and web-based) to or from the toolbox. The -N, -T, -E, and -B options are required. The -A option is optional. Placement in the toolbox with the -F option follows the same rules as for the tool and tbxURL targets. See NOTES for more information about legacy applications.
If the action is specified as add, this target adds a folder to the toolbox. The required parameters are: the folder name, description, and small and large icon paths.
If the action is specified as remove, this target removes a folder from the toolbox. If the folder to be removed is itself inside a folder, the containing folder must be specified with the -F option.
Specifies values that might be required, depending on the combination of action and target.
Supported options for various action and target combinations for the toolbox configuration are:
Specifies the parameters to pass to the legacy application. This option is available only for the legacy target.
Specifies the path of the toolbox that is being modified. If this option is not given, the modifications will be performed on the default toolbox, "This Computer".
Specifies the scope (domain) in which the tool should be run. The legal values for scope are file, nis, nisplus, dns, and ldap. This can also be specified for a folder or a toolbox.
In the former case, all tools in that folder and its subfolders are run in that scope; in the latter, all tools in the toolbox are run in that scope.
Specifies the absolute executable path of the legacy application. This option is available only for the legacy target.
Specifies the full path of the container folder. If this option is not given, the default folder is the `root' folder of the toolbox.
Specifies the host and port from which a tool should be loaded. If host_name is not given, the default host is used. The default host is localhost, if the toolbox is loaded from the local file system, or the host from which the toolbox is loaded if loaded from a remote Solaris Management Console server. If :port is not given, the default port will be used. If this option is not given at all, both the default host and the default port are used.
Specifies the locale of the toolbox that is being modified. The default is the C locale.
Specifies the name of the legacy application being registered. This is the name that appears in the console. This option is available only for the legacy target.
Specifies the key/value pairs that define parameters to a tool. Multiple key/value pairs can be specified at a time.
Specifies the legacy application type. Legal values are CLI, XAPP, or HTML. This option is available only for the legacy target.
The Solaris Management Console repository stores information about the registered tools and services, as well as libraries (for instance, resource jars) and properties attached to tools or services.
Legal values are:
Adds information to the repository. If the -f option is given to add, the information overwrites any information of the same name already in the repository. If the -f option is not given, an error might be returned if the information is already in the repository.
Removes information from the repository.
Lists the contents of the repository:
All registered tools
All registered services
All libraries attached to all tools
All libraries attached to all services
All libraries attached to all tools and services
Legal values are:
If the action is specified as add, this target will add a tool or service bean (which kind is determined by the contents of the bean) to the repository. The required parameter is the path to the jar file that contains the bean to be added.
If the action is specified as remove, this target will remove a tool or service bean from the repository. The required parameter is the full Java classname of the desired bean.
If the action is specified as add, this target adds a “library” jar file to a tool or service bean. The two required parameters are the full Java classname of the desired bean and the path to the jar file to be attached. The bean name can also be one of the “pseudo-beans,” ALL, ALLTOOL, or ALLSERVICE, in which case the library is attached, respectively, to all beans, all tools, or all services in the repository.
If the action is specified as remove, this target detaches a “library” jar file from a tool or service bean. The two required parameters are the full Java classname of the desired bean and the name of the jar file that is attached. As with the add action, the three “pseudo-beans” ALL, ALLTOOL, or ALLSERVICE can be used.
If the action is specified as add, this target defines a property on a tool or service. One or more key/value pairs must be specified in the form,
Following this property list is a “pseudo-bean name,” pseudoBeanName, as defined for the library target, on which the properties are defined. Optionally, a library name can follow the “pseudo-bean” name, in which case the properties are defined on the library that is attached to the named bean.
If the action is specified as remove, this target undefines a property on a tool or service. The key/value pairs, “pseudo-bean” name, and optional library are specified for the add action.
Example 1 Adding Legacy Applications to a Toolbox
The following command adds to the default toolbox the command line interface (CLI) application, /usr/bin/ls, with arguments -al -R, giving it the name, Directory Listing:
/usr/sadm/bin/smcconf toolbox add legacy -N "Directory Listing" \ -T CLI -E /usr/bin/ls -A "-al -R"
Example 2 Adding a Folder to a Toolbox
The following command adds to the standard Management Tools toolbox a folder with the name, New Folder, the description, This is a new folder, and the small and large icons, folder_s.gif and folder_l.gif:
/usr/sadm/bin/smcconf toolbox add folder "New Folder" \ "This is a new folder" folder_s.gif folder _l.gif \ -B /var/sadm/smc/toolboxes/smc/smc.tbx
Example 3 Adding a Native Solaris Management Console Tool to a Toolbox
The following command adds a native Solaris Management Console tool to the default toolbox. The Java classname of the tool is HelloWorld.client.HelloTool (the name, description, and icons visible in the console are provided by the tool itself). When loaded, it is run in the NIS domain, syrinx, which is hosted by the machine, temple, and is retrieved from port 2112 on the machine from which the toolbox was loaded:
/usr/sadm/bin/smcconf toolbox add tool HelloWorld.client.HelloTool \ -D nis:/temple/syrinx -H :2112
Example 4 Adding an Solaris Management Console Tool to the Repository
The following command adds the Java bean found in HelloWorld.jar to the repository. The jar file contains information that the bean is a tool:
/usr/sadm/bin/smcconf repository add bean HelloWorld.jar
Example 5 Removing an Solaris Management Console Service from the repository
The following command removes a Java bean from the repository. Although the name of the bean implies that it is a service, that is merely a convention; the repository knows whether a particular registered bean is a tool or a service:
/usr/sadm/bin/smcconf repository remove bean \ HelloWorld.server.HelloService
Example 6 Attaching a Library to a Tool
The following command adds the library jar file, HelloWorld_fr.jar (probably a French localized version of the HelloTool's resources) to the bean, HelloWorld.client.HelloTool:
/usr/sadm/bin/smcconf repository add library \ HelloWorld.client.HelloTool HelloWorld_fr.jar
Example 7 Attaching a Library to all Tools
The following command adds the library jar file, widgets.jar, to all tools in the repository. The library probably contains a widget set that might be useful to any registered tools:
/usr/sadm/bin/smcconf repository add library ALLTOOL widgets.jar
See environ(5) for descriptions of the following environment variables that affect the execution of the smcconf command:
If you do not specify this environment variable, your PATH is searched for a suitable java. Otherwise, the /usr/j2se location is used.
If you do not set this environment variable, set it to null, or set it to an X(7) display to which you are not authorized to connect, the Solaris Management Console starts in terminal mode instead of graphical mode.
The following exit values are returned:
An error occurred.
See attributes(5) for descriptions of the following attributes:
All standard shell quoting rules apply.
Legacy applications (X-windows, command-line, and web-based applications) are handled differently from “native” Solaris Management Console tools. Legacy tools are handled by an instantiation of a native Solaris Management Console tool, LegacyAppLauncher, which, through the toolbox, is given the necessary information to run the legacy application: path, options, and so forth. Thus, you do not register a legacy application into the repository as you would a native Solaris Management Console tool. Instead, legacy applications appear only in toolboxes.