15.00 - schmon -p - Teradata Database

Teradata Database Utilities

Product
Teradata Database
Release Number
15.00
Content Type
Configuration
Publication ID
B035-1102-015K
Language
English (United States)
Last Update
2018-09-25

schmon -p

Purpose  

The schmon -p option sets or displays Performance Group parameters.

Syntax  

 

 

Syntax Element

Description

-p

Sets or displays Performance Group parameters. If no additional options are specified, schmon -p displays the parameters for all Performance Groups currently in use (those with defined parameters).

PG#

An integer from 0 through 249 that identifies the Performance Group for which parameters will be set or displayed.

  • To set parameters for a Performance Group, follow PG# with the PGName, R, T, and PP specifications.
  • To view information about a specific Performance Group, follow PG# with the -s or -S options, or with no options.
  • To clear all parameters for a specific Performance Group, follow PG# with the -x option.
  • PGNAME

    Specifies the name of the Performance Group with the Resource Partition. Names with spaces must be enclosed in apostrophes.

    R

    Specifies the Resource Partition to which this Performance Group is to be assigned.

    T

    Specifies a single character that indicates the milestone type used in the Performance Period definitions for that Performance Group, where:

  • Q indicates that milestone units are seconds (1 - 86400) of query resource usage. Each query submitted by a session begins a new resource usage accumulation at the first Performance Period defined for the Performance Group.
  • R or S indicates that milestone units are seconds (1 - 86400) of session resource usage. These two characters are equivalent.
  • T indicates that milestone units are time-of-day, in military time (0-2359).
  • Time-of- day units can be optionally preceded by a day-of-week indicator. Day-of-week format is:
    '/d1-d2/ or /d1,d2,...dn/'. Valid values for day are 0(Sun)-6(Sat). For example, '/3-5/' indicates that the associated Performance Period would be active Wednesday through Friday.

    PP

    A Performance Period pair consisting of a milestone limit value and Allocation Group number for each of up to eight Performance Periods.

    Allocation groups can be referenced by multiple Performance Groups, which must belong to the same Resource Partition.

    When the milestone type is Q, R, or S, the lower bound for the first Performance Period is assumed to be zero. Also, the milestone of the last Performance Period must be zero. After a session or query enters the last Performance Period, that period remains in control for the remainder of the session or query.

    When the milestone type is Q, R, or S, the milestone limit is a real number greater than 0 and less than 86400. You can enter this number with an optional decimal point and fractional value. The given number is rounded to the nearest 1/100 second value. The following examples are valid milestone limit CPU usage times:

  • .01
  • 2.5
  • 3.1415
  • 200
  • -s

    Displays Priority Scheduler data for all sessions controlled by the Performance Group on the current node.

    -S

    Displays Priority Scheduler data for all sessions controlled by the Performance Group on all nodes of the Teradata Database system.

    -T

    Displays tasks (threads) for the specified Performance Group on the current node (the node from which schmon was invoked). Even when used in conjunction with the -S option, -T will display only task data for the current node.

    Note: The -T option should not be used for prolonged periods of time, because it can interfere with the normal operation of Priority Scheduler.

    The -T output includes the following columns:

  • Procqueue Tsk Addr: Kernel Task Context Block address
  • Tskid: Thread ID
  • Prio: OS priority
  • Session: Task session number
  • Request: Task request number
  • Tskuse: Task CPU resource usage
  • Tskterm: Session resource usage to weight ratio
  • # Delay: Task delay count due to CPU limits
  • Delay Time: Task total delay time due to CPU limits
  • -d

    Displays the differences in data between sequential runs of schmon. Use the delay [reps] option to control timing of automatic schmon runs.

    The following symbols precede numbers that appear in the output from the -d option.

  • For decimal numbers:
  • - (a minus sign) indicates the value has decreased by the indicated amount since the previous schmon run.
  • An unsigned decimal number indicates the value has increased by the indicated amount since the previous schmon run.
  • For task data (displayed if the -T option is used with the -d option):
  • n->     indicates a task has been moved from the control of AG n to the control of the displayed AG since the previous schmon run.
  • +     indicates a task is new, started since the previous schmon run.
  • -     indicates a task that ended since the previous schmon run.
  • *     indicates a task that has changed sessions or requests since the previous schmon run.
  • For examples of the -d option output, see “schmon -m” on page 745, and “schmon -s” on page 767.

    Note: The output of the -d option shows only those items for which data has changed since the previous schmon run.

    delay [reps]

    Causes schmon -p to run again automatically after a specified delay using the current session options. delay is a positive integer that specifies the number of seconds between schmon executions.

    Use the optional reps argument, a positive integer, to specify the number of times schmon should run. If reps is not specified, schmon runs indefinitely with delay seconds between executions. In this case, schmon can be stopped by pressing Ctrl-C or otherwise killing the schmon process.

    Note: The difference between time stamps of successive information displays may not precisely match the specified delay value due to the time required for the collection activity itself.

    -x

    Clears the parameters that define the specified Performance Group, effectively deleting it from the system (though an empty group will still appear in the output of ‘schmon -p all’).

    The Teradata Database must be in the logons enabled state to delete a Performance Group. The Performance Group must not be referenced by any system user.

    Under certain circumstances, the deletion process of a Performance Group within schmon may be rejected and the cleanup process may not be executed successfully. In this situation, any subsequent attempts to delete the Performance Group will fail and the following error message is reported:

    schmon -p 4 -x
    schmon: Performance Group is in remove state

    If this occurs, do the following:

    1 Recreate the Performance Group by executing the proper schmon ‑p command.

    Recreating the Performance Group clears the remove status.

    2 Delete the Performance Group created in step one by executing the proper schmon - p command using the format below.

    schmon -p PG# -x

    For example, to delete Performance Group 4, type:

    schmon -p 4 -x

    Usage Notes  

    If a Performance Group has only a single Performance Period, the milestone limit must be zero.

    If a Performance Group has multiple Performance Periods, the milestone limit of the final Performance Period must be zero.

    The following apply to MPP configurations:

  • For the -S option:
  • The count of nodes for a single repetition or for multiple repetitions is displayed.
  • Time information is displayed.
  • If a node is offline, it is not be included in the output, and the node count reflects this; however, information about this node being excluded is not displayed.
  • The following apply to SMP configurations:

  • Node count is not shown.
  • A status message that includes time of day regardless of the number of repetitions is displayed.
  • No transient status messages are displayed.
  • Example  

    To display session data for sessions assigned to Performance Group 1, type:

    schmon -p 1 -s

    The following appears:

                                                Session Usage         Query Usage
      AG HostID    Session    Request #tsk  CPU(msec)   DSK(blk)  CPU(msec)   DSK(blk)  RP PG [PP]
     === ====== ========== ========== ==== ========== ========== ========== ========== === ===============
       2      0          0          0   26     500310      16607     500310      16607   0 M[0]

    Example  

    Suppose you want to provide different levels of service on weekdays, Saturday, and Sunday.

    On weekdays, one Performance Period is in effect between 0800 and 1800, another beginning at 1800 and continuing until 0800 the next morning.

    On Saturday the Performance Period from 1800 on Friday continues until 1400 and then switches to another Performance Period that continues through Sunday and on until 0800 Monday morning. The Performance Period specification is as follows, where day of the week is denoted by enclosing / characters, as shown below:

  • /1/ 0800 5 Monday, use AG 5 until 0800
  • /2-5/ 0900 7 Tuesday through Friday, use AG 7 until 0900
  • /1-5/ 1800 2 Monday through Friday, use AG 2 until 1800. After 1800, use the next higher period.
  • /6/ 1400 7 Saturday, use AG 7 until 1400. After 1400, use the next Performance Period, which is the one specified for 0800 Monday that uses AG 5.
  • To provide the above levels of service, type:

    schmon -p 2 M 0 T /1/ 0800 5 /2-5/ 0900 7 /1-5/ 1400 2  /6/ 1800 7

    The following appears:

                            Performance Groups (0 - 249)
    Id  Group Name    RP Type  Milestones & Allocation Groups[0-7]
     2  M             0  T /1/  0800   5 /2-5/  0900   7 /1-5/ 1400   2 /6/ 1800