Creating a time-based configuration set

You can create a set of specialty configurations and assign each configuration within the set to days and times when you want a specific configuration to be in effect.

These sets, called time-based configuration sets, are completely separate from but compatible with your normal configuration. You can use the wlmcntrl -u command to switch between a configuration set and your normal configuration as needed.

When using a configuration set, you associate existing named configurations, typically with a specific time range. Because only one configuration can be used at any given time, each specified time range must be unique; time ranges cannot overlap or be duplicated.

The wlmd daemon alerts WLM when a specified configuration goes out of time range and another configuration needs to be used. Only the root user can manage these time ranges, which are specified within the configuration set's directory in an ASCII file called .times.

Use the following procedure to create a time-based configuration set:

  1. With root authority, create a configuration set directory then change to that directory.
    For example:
    mkdir /etc/wlm/MyConfigSet
    cd /etc/wlm/MyConfigSet
  2. Use your favorite editor to create the configuration set's .times file and specify the configuration and time ranges in the following format:
    ConfigurationName:
                time = "N-N,HH:MM-HH:MM"
    or
    ConfigurationName:
                time = -
    (no time value specified)
    Where N is a numeral representing a day of the week in the range of 0 (Sunday) through 6 (Saturday), HH represents the hour in the range of 00 (midnight) to 23 (11 p.m.), and MM represents the minutes in the range of 00 to 59. You can specify the day only or not at all. An hour value of 24 is valid for the ending hour of the day, provided that the minute value is 00. If you type a dash (-) instead of a time range for a particular configuration, that configuration will be used when the other configurations' time ranges are not in effect. Only one configuration can be specified without a time range.

    For example:

    conf1:
        time = 
    conf2: 
        time = "1-5,8:00-17:00"
    conf2
        time = "6-0,14:00-17:00"
    conf3
        time = "22:00-6:00"
  3. Use the wlmcntrl -u command to update WLM with the new configuration set.
    For example:
    wlmcntrl -u /etc/wlm/MyConfigSet

At this point, WLM's current configuration is your new time-based configuration set.

You can also use the confsetcntrl and lswlmconf commands to create and manipulate configuration sets. For example:

To create the confset1 configuration set with a default configuration of conf1, use the following command:
confsetcntrl -C confset1 conf1
To add conf2 to confset1 and make it the active configuration from 8:00 AM to 5:00 PM daily, use the following command:
confsetcntrl -d confset1 -a conf2 "0-6,08:00-17:00"
To make this configuration set the active configuration, use the following command:
wlmcntrl -d confset1