TOCPREVNEXTINDEX

Lund Performance Solutions


The SHOT Tool
SHOT provides information on what processes are active on the machine. It provides a snapSHOT of process activity, and allows the priority of processes to be adjusted. SHOT can also be used to alter the state of a process.

Operation

SHOT's primary purpose is to show you processes that are interesting. At startup, "interesting" is defined as "processes that have used CPU since the last time you hit Return". This is called the DELTA command, and is executed by default when you hit Return. Thus, if you run SHOT and then just hit Return, Return, ..., each time SHOT will show you the processes that have used some CPU since the prior Return. See SHOT’s ADM command and Process-Display section for details.

Viewing System Activity

The display of just CPU-using processes is called a "delta" display. (The "delta", or difference between the current CPU usage and the prior CPU usage is non-0.)
The ALL command displays all processes, regardless of their CPU usage.
You can restrict the display of active processes shown by the delta command in several ways:
  • only show processes using more than a specified percentage of the CPU (use: %n i.e.,: %5 will only show processes that have used at least 5% of a CPU in the recent interval)
  • exclude specified PINs (via the EXCLUDEPINS command)
  • exclude processes waiting on specified wait events (i.e., EXCLUDEWAITS BREAK)
  • The "TREE" command shows all processes, according to their tree structure (parent/child), and ignores exclusion rules.
    In the DELTA and ALL commands, the format of the output can be controlled via the ADM (Automatic Display Mode) command. For example, you can add a column to show the number of transient disk pages used by a process by saying: ADM + SECPAGES
    The command ADM ? will list all available ADM fields.
    The HIGHLIGHT command can be used to tell SHOT to highlight certain processes (i.e., HIGHLIGHT USER @.SYS)
    You can control a process using:
    ABORTCONNS, ABORTPROCIO, BREAK, KILL, PRIORITY, RESUME, SUSPEND
    You can get information about a single process using:
    ANCESTORS, CPU, DAD, FAMILY, JS, PIN, TP, TRACE, TREE
    In addition to showing processes, SHOT has several other kinds of displays it can do:
  • display jobs and/or sessions
  • display job/session tables (JOBINFO)
  • display jobqueue information (LISTJOBQ)
  • display a list of different programs currently running (and the number of processes using each program)
  • report system uptime (UPTIME)
  • display a summary of why processes are waiting (SUMWAIT)
  • display information about locked SIRs
  • display information about PIN and VSM tables (TABLES).
  • Altering System Activity

    In addition to viewing process information, you can alter some aspects of process activity. SHOT’s BREAK and RESUME commands are used to suspend and reactivate processes by PIN. The PRIORITY command is used to change the CPU queue in which a process is executing.

    NOTE Placing a process in the A or B queue could "take over" the system and cause a system halt. The A and B queues are typically only used by system processes.

    SHOT’s KILL command is used for terminating a single process. The KILL command is especially useful for processes which seem to be "hung".

    Capabilities

    Program capabilities include IA, BA, PM, DS and PH. User PM capability is required to use the STACK TRACE or DEBUG commands. User SM is required to use the ABORTCONNS, ABORTPROCIO, BREAK, RESUME or KILL commands. OP, SM or PM is required to use the PRIORITY command.

    Usage

    SHOT can be run either from the supplied UDC or from a fully-qualified RUN statement.
  • UDC
  • SHOT <command>
  • RUN
  • RUN SHOT.PUB.LPSTOOLS;INFO=“<command>”
    When you run SHOT with a command parameter, it executes that command and then automatically terminates.

    The SHOT Process Display

    The SHOT display is something you’ll want to know about in order to understand the information being presented. This section explains the display components. The first line is a Time & Date header, and it is followed with several user-selectable fields. The following section describes these fields in detail.
    The header for the default display format for SHOT is:


    Figure 16.1 SHOT - Header for the default display format
    Display column: ?
    ADM field: STATE
    The Process State is denoted by a question mark (?) in the SHOT header line. This shows the state of a process when the state is something other than alive.
    The Process State are described in the next table:
    Table 16.1 SHOT - Process States
    Character
    State
    Description
    ?
    unknown
    PCB for process has not been allocated
    d
    dying
    Process is beginning to terminate
    x
    dead
    Process terminated, PCB not deallocated
    <blank>
    alive
    Process is running
    i
    initiating
    Process being born
    u
    unborn
    Process just started being created
    Display column: Pin
    ADM field: PIN
    The PIN is the Process Identification Number for a process. This is a 16-bit number which is reused when a process terminates.
    See also: PID
    Display column: CPU
    ADM field: CPU
    The CPU column reports the total processor time (CPU) used by a process since it started. The values shown are usually in milliseconds, but will have a letter prefix if they have used more CPU than can be displayed without overflowing the column width (which defaults to 6 characters, or 999,999 milliseconds). The prefixes are: s for seconds, m for minutes, h for hours, D for days, and W for weeks.
    Display column: Process Name
    ADM field: NAME
    The Process Name column shows the name of the process running. The majority of processes are programs (files with filecode of PROG or NMPRG) that were :RUN (or started with the CREATE or CREATEPROCESS intrinsic). A few processes are started by privileged code pointing to a procedure in either NL.PUB.SYS or SL.PUB.SYS and saying: Start!. These processes are referred to as being procreated. These processes do not have normal names (i.e.: EDITOR.PUB.SYS) because there is no associated program file. SHOT tries to determines the name of the original procedure that was started and, if successful, displays the first 32 characters (or so) of the procedure name. If unsuccessful, the procedure address is shown in hexadecimal as a space and offset (i.e.: $a.4b2d90).

    NOTE SHOT is unable to determine the names of procedures started from SL.PUB.SYS. It indicates these as (CM Procedure).

    Display column: Pri
    ADM field: PRI
    The Pri column shows the current priority of a process. The priority is a value in the range 0..255, with 0 being the highest priority. The CI's :SHOWQ command reports the base and limit priority values for the C, D, and E scheduling queues.
    Display column: Q
    ADM field: QUEUE
    The Q column reports what scheduling queue a process is in.
    The possible queues are:
    Table 16.2 Queue Codes
    Code
    Description
    A
    Process is in the A subqueue
    B
    Process is in the B subqueue
    C
    Process is in the C subqueue
    D
    Process is in the D subqueue
    E
    Process is in the E subqueue

    NOTE As of MPE XL 2.1, it is possible to put a process into four apparently new queues called BM, CM, DM, and EM. In fact, MPE does not have four new queues. Instead, when a process is placed into one of these queues (with the ALTPROC command), it is simply placed at the base of the BS, CS, DS, or ES queue and is marked as a system process so that its priority will not degrade over time.

    Display column: Delta
    ADM field: DELTA
    The Delta column shows the amount of CPU used by a process since the last time a process display was shown. The values in this field are typically in milliseconds, but will have a suffix of s for seconds, m for minutes, h for hours, D for days, and W for weeks.

    NOTE The CPU delta value for JSMAIN processes (those that are JSMAIN.PUB.SYS) will sometimes be negative. Whenever a job or session starts (and runs), it is assigned a JSMAIN process, which will use a small amount of CPU time in getting the job or session started. When the job or session terminates, the JSMAIN process uses a little more CPU time, but then sometimes stays around in idle mode, waiting to be assigned to a new job or session. When JOB.PUB.SYS (the parent of all jobs) or SESSION.PUB.SYS (the parent of all sessions) chooses that JSMAIN for a new job or session, JOB or SESSION resets the JSMAIN's total CPU time counter back to about 1/2 second of CPU. If SHOT noted the CPU total for a JSMAIN before and after this reset, the process will look like it used a negative amount of CPU time!

    Display column: %
    ADM field: PERCENT
    The % column shows the approximate percentage of available CPU that a process has used since the last time a process display was shown. Due to the way SHOT determines CPU usage, it is possible that the sum of all percentages shown might exceed 100%, particularly if the previous process display was done very recently.
    Display column: Ic
    ADM field: EXECMODE
    The Ic column shows the Initial and Current modes for a program. The first character of this column is: C, N, O, or P. The second character of this column is: n or c.
    Table 16.3 Execution Mode Codes
    Code
    Description
    Cn
    Process is a Compatibility Mode program, currently in Native Mode
    Cc
    Process is a Compatibility Mode program, currently in Compatibility Mode
    Nn
    Process is a Native Mode program, currently in Native Mode
    Nc
    Process is a Native Mode program, currently in Compatibility Mode
    Oc
    Process is a Compatibility Mode program (OCT’ed), currently in Compatibility Mode
    On
    Process is a Compatibility Mode program (OCT’ed), currently in Native Mode
    Pn
    Process is a POSIX Native Mode program, currently in Native Mode
    Pc
    Process is a POSIX Native Mode program, currently in Compatibility Mode

    NOTE Processes that are procreated native mode procedures will have an n instead of N in the Initial column

    Display column: Wait State
    ADM field: WAIT
    The Wait State column reports why a process is waiting. On a single CPU machine, every process (except SHOT itself) should either be waiting for something to happen (i.e.: a page to be read from disc) or should be READY to run. On a multiple CPU machine, several processes (in addition to SHOT) might be EXECUTING at the same time.
    The following is in order of ADm field names (except the fields from the default display format, explained above).
    Display column: BlkR
    ADM field: BLOCKEDR
    The BlkR column shows the numeric code indicating why a process is blocked (if it is), called the blocked reason. The same information is usually available in pseudo-english in the WAIT column.
    Display column: Caps
    ADM field: CAPABILITY
    The Caps column shows the capability mask for a process. This is a 32-bit value, with bits meaning:
    Table 16.4 Capability Bits
    Cap
    Bit#
    Meaning (if bit on)
    SM
    0
    System Manager
    AM
    1
    Account Manager
    AL
    2
    Account Librarian
    GL
    3
    Group Librarian
    DI
    4
    Diagnostician
    OP
    5
    Operator
    CV
    6
    Create Volumes
    UV
    7
    Use Volumes
    LG
    8
    User Logging
    SP
    9
    System process handling
    PS
    10
    Programatic Sessions
    NA
    11
    Network Administrator
    NM
    12
    Node Manager
    CS
    13
    Communication Subsystem
    ND
    14
    Use Non-Sharable devices
    SF
    15
    Save Files
    ..
    16..22
    (reserved)
    BA
    23
    BAtch access
    Display column: StXDS
    ADM field: CMSTACK
    The StXDS column reports various values for the Compatibility Mode (CM) environment of a process. If width permits, the following is shown:

    DBXDS
    is the Data Segment number of the Compatibility Mode DB (usually the same as the CM Stack, unless in split-stack mode).
    StXDS
    is the Data Segment number of the CM Stack.
    S
    is the top-of-CM-stack register. This may not be accurate for processes currently executing on another CPU.
    Z
    is the limit-of-CM-stack register.

    Display column: S Z
    ADM field: CMSZ
    The S Z column reports the value for the CM S and Z registers of a process. It is a subset of the information provided by the ADM-CMSTACK field.

    S
    is the top-of-CM-stack register. This may not be accurate for processes currently executing on another CPU.
    Z
    is the limit-of-CM-stack register.

    Display column: Cflts
    ADM field: CFAULTS
    The Cflts column shows the total number of code page faults for each process. A code page fault was an attempt to access an instruction, but the virtual page was not in memory.
    Display column: CMTIME
    ADM field: CMTIME
    The CMTIME column reports the total processor time (CPU) used by a process while in CM (Compatibility Mode).
    See ADM-CPU for a description of the display format.

    NOTE The CMTIME value is tracked only while the Measurement Interface (MI) is enabled. SHOT does not enable the MI. SOS/3000 and Glance/XL are examples of performance tools that enable the Measurement Interface.

    Display column: C
    ADM field: CRITICAL
    The C column shows the depth of nesting in critical mode for each process. A non-critical process will have a blank in this column.

    NOTE Processes that are critical (have a non-0 value here) will ignore :ABORT, :ABORTJOB, and other KILL requests until they become non-critical.

    Display column: Dbg
    ADM field: DEBUG
    The Dbg column has a Yes for each process that has the ;DEBUG flag on. Normally, if a program is run with ;DEBUG, the bit is on. However, MPE/iX seems to set this bit for a few other processes for undetermined reasons.
    Display column: DelCFl
    ADM field: DELCFAULTS
    The DelCFl column shows the number of code page faults for each process since the last display. Del is short for Delta.
    Display column: DelDFl
    ADM field: DELDFAULTS
    The DelDFl column shows the number of data page faults for each process since the last display. Del is short for Delta.
    Display column: DelFl
    ADM field: DELDFAULTS
    The DelDFl column shows the number of data page faults for each process since the last display. Del is short for Delta.
    Display column: Dflts
    ADM field: DFAULTS