15.00 - schmon -s - 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 -s

Purpose  

The schmon -s option displays Priority Scheduler data for the specified sessions from the current node or all nodes in the Teradata Database system.

Syntax  

 

Syntax Element

Description

-s

Displays Priority Scheduler data for the current sessions. If no additional options are specified, schmon -s displays session information for the current node.

all

Shows information for all sessions. This is the default.

id

A positive integer that identifies a session for which Priority Scheduler data will be displayed.

-S

Shows session information from all nodes in Teradata Database.

-T

Displays tasks (threads) for the specified sessions 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.
  • 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 -s to run again automatically after a specified delay using the current 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.

    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.

    Note: The delay option cannot be used alone with schmon -s. It must be preceded by one or more of the id, all, -S, -T, or -P options.

    Usage Notes  

    schmon -s displays the following columns:

     

    Column

    Description

    AG

    Allocation Group ID.

    Host ID

    Host system of an active session.

    Session

    Session number of an active session.

    Request

    Request number of an active session.

    #tsk

    Number of tasks working on behalf of the session.

    CPU(msec)

    Number of milliseconds of CPU time accumulated by the session or request during the previous age period.

    DSK(blk)

    Number of disk blocks transferred by the session or request during the previous age period.

    RP

    Resource Partition to which the line’s allocation group belongs.

    PG

    Performance Group to which the session is assigned.

    [PP]

    Performance Period currently controlling the session. Each Performance Group defines one or more Performance Periods. A PG’s PPs determine the resource allocation to tasks run by sessions controlled by the PG. For more information on PGs and PPs, see “Performance Groups” on page 707

    Example  

    In this example and the following examples, session 0 indicates a session performing system utility functions that might have tasks running in several allocation groups.

    To display Priority Scheduler data for the specified sessions from the current node or all nodes in the Teradata Database system, type:

    schmon -s 

    The following appears:

    Stats: Mon Mar  8 15:49:57 2008
                                                Session Usage         Query Usage
      AG HostID    Session    Request #tsk  CPU(msec)   DSK(blk)  CPU(msec)   DSK(blk)  RP PG [PP]
     === ====== ========== ========== ==== ========== ========== ========== ========== === ===============
       1      0          0          0    9         70      10250         70      10250   0 L[0]
       2      0          0          0    2       2640          0       2640          0   0 M[0]
       4      0          0          0    1          1          0          1          0   0 R[0]

    Example  

    The -T option displays per-AG task (thread) information for the specified sessions. This example shows a portion of the output from a Linux system.

    schmon -s all -T
      Stats: Fri Feb  5 13:50:32 2010
     
                                                Session Usage         Query Usage
      AG HostID    Session    Request #tsk  CPU(msec)   DSK(blk)  CPU(msec)   DSK(blk)  RP PG [PP]
     === ====== ========== ========== ==== ========== ========== ========== ========== === ===============
       5   1025       1000          4    9     245516     165488     245488     165488   1 PG5[0]
       5   1025       1001          3    9     164620     103089     164600     103089   1 PG5[0]
     
         Tsk Addr              Tskid Prio Session Request     Tskuse Setterm # Delay Delay Time
         ==================== ====== ==== ======= ======= ========== ======= ======= ==========
         0xffffc20013310c20     8004  126    1000       4         28      78       0          0
         0xffffc20011f6e420     8485  126    1000       4      30172      78       0          0
         0xffffc20011fee620     8467  126    1000       4      29576      78       0          0
         0xffffc20018484e20     8457  126    1000       4      30240      78       0          0
         0xffffc20011f6f220     8492  129    1001       3      19460     100       0          0
         0xffffc20013332720     8522  129    1001       3      23316     100       0          0
         0xffffc20018486320     8473  129    1001       3      19872     100       0          0
         0xffffc200135c6020     8520  129    1001       3      24208     100       0          0
     
                                                Session Usage         Query Usage
      AG HostID    Session    Request #tsk  CPU(msec)   DSK(blk)  CPU(msec)   DSK(blk)  RP PG [PP]
     === ====== ========== ========== ==== ========== ========== ========== ========== === ===============
     200      0          0          0  554      32912       3795       3532        211   0 System[0]
     200      0       6146         11    0          0          0          0          0   0 System[0]
     200      0       6147          9    0          0          0          0          0   0 System[0]
     200      0       6280       1002    0          0          0          0          0   0 System[0]
     200      0       6284       1003    0          0          0          0          0   0 System[0]
     200      0       6285       1003    0          0          0          0          0   0 System[0]
     
         Tsk Addr              Tskid Prio Session Request     Tskuse Setterm # Delay Delay Time
         ==================== ====== ==== ======= ======= ========== ======= ======= ==========
         0xffffc20011be0020     7015  116       0       0          0       0       0          0
         0xffffc20011be0720     7136  116       0       0          0       0       0          0
         0xffffc20011be0e20     7137  116       0       0          0       0       0          0
         0xffffc20011be1520     7138  116       0       0          0       0       0          0
         0xffffc20011be1c20     7139  116       0       0        124       0       0          0
         0xffffc20011e74720     7144    1       0       0          0       0       0          0
         0xffffc20011f2a020     7142    1       0       0          0       0       0          0

    Example  

    This example displays differences in session data over three automatic runs of schmon spaced five seconds apart.

    > schmon -s -d 5 3

    Stats Collection #1: Mon Aug 04 17:53:14 2008
                                                Session Usage         Query Usage
      AG HostID    Session    Request #tsk  CPU(msec)   DSK(blk)  CPU(msec)   DSK(blk)  RP PG [PP]
     === ====== ========== ========== ==== ========== ========== ========== ========== === ===============
     200      0          0          0    0       1710         12       1710         12   0 System[0]
     
      Stats Collection #2: Mon Aug 04 17:53:19 2008
                                                Session Usage         Query Usage
      AG HostID    Session    Request #tsk  CPU(msec)   DSK(blk)  CPU(msec)   DSK(blk)  RP PG [PP]
     === ====== ========== ========== ==== ========== ========== ========== ========== === ===============
     200      0          0          0    0       1545          0       1545          0   0 System[0]
     
      Stats Collection #3: Mon Aug 04 17:53:24 2008

            No difference in data this period

    Example  

    This example shows a portion of the output that displays differences in session data over three automatic runs of schmon spaced five seconds apart, and includes information on tasks for the current node.

    schmon -s -T -d 5 3
     
      Stats Collection #1: Fri Feb  5 14:13:22 2010
     
                                                Session Usage         Query Usage
      AG HostID    Session    Request #tsk  CPU(msec)   DSK(blk)  CPU(msec)   DSK(blk)  RP PG [PP]
     === ====== ========== ========== ==== ========== ========== ========== ========== === ===============
       5   1025       1000          5   -2       2796       1724       2796       1724   1 PG5[0]
       5   1025       1001          4    0       7396       5288       7396       5288   1 PG5[0]
     
         Tsk Addr              Tskid Prio Session Request     Tskuse Setterm # Delay Delay Time
         ==================== ====== ==== ======= ======= ========== ======= ======= ==========
         0xffffc20013a4b320    10425    0    1000       5        640       0       5       3724
         0xffffc20013a49720    10428    2    1001       4       1064      11       5       3724
     
     
     
      Stats Collection #2: Fri Feb  5 14:13:27 2010
     
                                                Session Usage         Query Usage
      AG HostID    Session    Request #tsk  CPU(msec)   DSK(blk)  CPU(msec)   DSK(blk)  RP PG [PP]
     === ====== ========== ========== ==== ========== ========== ========== ========== === ===============
       5   1025       1000          5    0        176        116        176        116   1 PG5[0]
       5   1025       1001          4    0        220        148        220        148   1 PG5[0]
     
         Tsk Addr              Tskid Prio Session Request     Tskuse Setterm # Delay Delay Time
         ==================== ====== ==== ======= ======= ========== ======= ======= ==========
         0xffffc20013a4b320    10425   -1    1000       5         44      -5       5       4956
         0xffffc20013a49720    10428    1    1001       4         28      11       5       4956
     
     
     
      Stats Collection #3: Fri Feb  5 14:13:32 2010
     
                                                Session Usage         Query Usage
      AG HostID    Session    Request #tsk  CPU(msec)   DSK(blk)  CPU(msec)   DSK(blk)  RP PG [PP]
     === ====== ========== ========== ==== ========== ========== ========== ========== === ===============
       5   1025       1000          5   -1       2648       1738       2648       1738   1 PG5[0]
       5   1025       1001          4    0       3920       2758       3920       2758   1 PG5[0]
     
         Tsk Addr              Tskid Prio Session Request     Tskuse Setterm # Delay Delay Time
         ==================== ====== ==== ======= ======= ========== ======= ======= ==========
       - 0xffffc20013a4b320    10425 -128    1000       5     -35856     -95     -44     -33800
         0xffffc20013a49720    10428    0    1001       4        380       0       5       4376