ChorusOS 5.0 System Administrator's Guide

Command-line Configuration Tool

The following sections explain how to use the command-line configuration tool, configurator, for some common tasks.

Displaying the Configuration

The configurator utility provides an option to display the ChorusOS operating system configuration in a web browser in HTML. Within your build directory, type the following command:


$ configurator -display /tmp/ChorusOS.html 

You can then use your browser to navigate through the ChorusOS.html file generated by this command.

Figure 2-2 Microkernel Configuration Displayed in HTML

Graphic

Selecting a Configuration Profile

Two predefined profiles are provided, as described in "Configuration Files". To select the basic profile, type:


% configurator -p conf/basic

To re-select the extended (default) profile, type:


% configurator -p conf/extended

Adding, Removing, or Listing a Feature

You can use the configurator utility to add, remove, or list a feature.

Adding a Feature

To add a feature, type:


% configurator -set feature_name=true

The status of the feature_name is set to true.

For example, to add the EVENT feature to the default configuration:


% configurator -set EVENT=true

The configurator utility does not handle feature dependencies automatically. If you define an incomplete set of features, an error message is displayed.

Removing a Feature

To remove a feature, type:


% configurator -set feature_name=false

The status of the feature_name is set to false.

For example, to remove the EVENT feature:


% configurator -set EVENT=false 

You can reset the value of a feature to the default as follows:


% configurator -reset EVENT 


Note -

The reset command resets the value to the extended profile default.


Listing a Feature

You can check the value of a feature as follows:


% configurator -list features feature_name 

The output lists the feature and its status. If you omit feature_name, all features are displayed:


% configurator -list features

SEM:bool='true'
EVENT:bool='true'
RTMUTEX:bool='false'
TIMER:bool='true'
VTIMER:bool='false'
DATE:bool='true'

You can list a feature in greater detail with the -info option:


% configurator -info features feature_name 

The output lists the feature, its status, possible values and its description. For example:


% configurator -info features NFS_SERVER

NFS_SERVER:bool='false'
Possible values: true|false
Description: NFS server access from target machine

Changing Tunable Parameter Values

Tunable parameters are defined by symbolic names within the ChorusOS operating system components. Symbolic names include dots (.), to maintain compatibility with previous releases of the ChorusOS operating system. An example of a symbolic name is kern.exec.maxCpuNumber, which is a tunable.

The definition of a tunable parameter includes the definition of a default value for this parameter. Integer values of tunable parameters are expressed either as integers or as hexadecimal numbers.

To change the value of a tunable parameter, use:


% configurator -set tunable_name=value

For example, to reconfigure the microkernel to enable the creation of 300 threads:


% configurator -set kern.exec.maxThreadNumber=300

You can check the value of a tunable parameter as follows:


% configurator -list tunable tunable_name

You can list the values of all the microkernel executable tunables as follows:


% configurator -list tunable kern.exec.*

The output lists the microkernel executable tunables and their values:


kern.exec.maxCpuNumber:int='1'
kern.exec.maxActorNumber:int='64'
kern.exec.maxThreadNumber:int='300'
kern.exec.bgStackSiz:int='0x1000'
kern.exec.dflSysStackSize:int='0x3000'
kern.exec.dflUsrStackSize:int='0x4000'
kern.exec.dblFltStackSize:int='0x800'
kern.exec.intrStackSize:int='0x3000'

You can list a tunable parameter in greater detail with the -info option:


% configurator -info tunable tunable_name 

The tunable, its value and its description are displayed:


% configurator -info tunable kern.lap.*

kern.lap.maxLapBindNumber:int='256'
Description: Maximum number of bind LAPs 

kern.lap.maxLapSafeNumber:int='128'
Description: Maximum number of safe LAPs

Modifying the System Environment

The system environment is defined by a set of dynamic parameters. The system environment is a set of name-value pairs, where name and value are character strings. Values for system environment variables can be obtained by the system and applications at runtime using the sysGetEnv(2K) system call.

To display all the system environment variables, type:


% configurator -list env

To set a new environment variable, or change its value:


% configurator -setenv envar=value

Here is an example:


% configurator -setenv MESSAGE='HelloWorld'  

To unset a variable, so that it is removed from the environment, type:


% configurator -resetenv envar

Rebuilding the System Image

After you have finished modifying the configuration, rebuild the system image by typing:


% make chorus