Configure time duration settings

To configure the time duration settings, follow these steps:

  1. Click Service Level Management > Administration > Time Duration Settings.

  2. Click Search to open a list of the time duration control tables.

  3. Click a specific table you want to modify.

    When you open the Time Duration Settings form for a specific table, the time duration property fields are automatically populated.

  4. Specify the settings on the form, as described in the following table.

    Attribute Description Default value
    Table Name Specifies the name of the table from which the data is extracted for time duration processing. N/A
    Enable

    If this option is selected, the data in this specific object table is enabled for time duration processing.

    Note This option only works when Enable processing for time duration reporting data in Report Settings is selected. Otherwise, all tables are disabled for time duration data processing.

    Enable
    Calculation From Specifies the exact start date and time for the data to be processed. N/A
    Last Calculation Time Shows the last time when the background scheduler runs to process the data. This field is read-only. N/A
    Enable Fields

    Shows the available labels and their corresponding field names in the table. Select the check box to assign labels for time duration calculation. The available labels include State, Phase, and Assignment Group.

    Note The field names for the State and Assignment Group labels dynamically change according to the system configuration, while the field name for the Phase label is static.

    N/A
    Metrics Field Specifies the field applied for calculation. N/A
    KPI Sets the metrics number for the selected field. Service Manager supports up to five rule for one field. N/A
    Schedule Type Specifies the schedule type applied for calculation. The available types include specific value and the assignment group. N/A
    Schedule Value Specifies the exact schedule value applied for calculation. N/A
    Time Zone Type

    Specifies the time zone type applied for calculation.

    Note Only if you select specific value as the time zone type, you need to specify a time zone value.

    N/A
    Time Zone Value

    Specifies the time zone value applied for calculation.

    Note This field only takes effect when you select specific value as the time zone type and you need to specify a value here. The other time zone types already specify a time zone value by their own settings. In this case, any value you specify here is not taking effect.

    N/A
  5. Click Save.

Customize the time duration data processing schedules and threads

Currently , there is an out-of-box schedule set for processing the time duration data. However, you can customize the schedule to add more threads to process the data for a table. Different schedules divide the time duration data by the time stamp that you specify. In this case, each schedule processes the data during the specified period and each schedule process is assigned with a thread to implement the data processing.

For each table containing the time duration data to be processed, it has a main schedule which you need to specify a start time for the data to be calculated. This schedule handles the data starting from the time stamp you specified to the current time. To set the time stamp for the main schedule, follow these steps:

  1. Click Service Level Management > Administration > Time Duration Settings.
  2. Click Search to open a list of the time duration control tables.
  3. Click a specific table you want to modify.
  4. Specifies the exact start date for the data to be processed in the Calculation From field.
  5. Click Save.
  1. Click Service Level Management > Administration > Time Duration Settings.
  2. Click Search to open a list of the time duration control tables.
  3. Click a specific table you want to modify.
  4. Specifies the exact start date for the data to be processed in the Calculation From field.
  5. Click Save.

To add more new schedules for and specify the time stamp for a table, follow these steps:

  1. Type schedule in the Service Manager command-line box and click Enter.
  2. Click Search to open a list of the schedules.
  3. Click the Process Time Duration Reporting Data schedule record.
  4. Change the Name, Class, and Scheduled Class values. For example, you can modify the Name value to Process Time Duration Reporting Data1, and modify the Class and Scheduled Class values to timedurationdata1.
  5. Modify the content in the Javascript tab to the following script:

    lib.timeDurationEtl.doWorkOnFile(<log_level>, '<table name>', <start date>, <end date>);

    For example: lib.timeDurationEtl.doWorkOnFile(2, 'probsummary', 10/01/14, 12/31/14);

    Note Service Manager defines four log_level values as: 1 DEBUG, 2 INFO, 3 WARN, and 4 ERROR.

  6. Click Add to add this record.
  7. Repeat steps 4 to 6 to add more schedules as it requires and use a different number for each new record. For example, add the Name value of Process Time Duration Reporting Data2with the Class and Scheduled Class values as timedurationdata2.

The Class value of the new schedules will be needed for adding the background processes later.

To assign a background process for the new schedules, follow these steps:

  1. Type info in the Service Manager command-line box and click Enter.
  2. Click Search to open a list of the background process records.
  3. Click the timedurationdata.processor record to open the Background Processor Initialization Registry schedule form for this record.
  4. Add a new record under the main record. Add the Class value you have specified to the Name and Class fields and copy the other required values from the previous record.
  5. Click Save to save the record and the system adds a new blank record for you to add the next one, if there is any.

  6. Repeat steps 4 and 5 to assign all the new schedules you have added with a thread to process the data.

  7. Click Save.

After you have added the schedules and the threads, start a new Service Manager process by running the following command line, or by adding the command line to the sm.cfg file:

sm scheduler.start <name of the background process> –log:../logs/timeduration.log

In this example: sm scheduler.start timedurationdata.processor –log:../logs/timeduration.log

Related topics

Service Level Management
Service Contracts overview
Working with service contracts
Service contracts
Service contract tasks
Itemizing costs