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
    The Dflts column shows the total number of data page faults for each process. A data page fault was an attempt to access an data on a virtual page, but the page was not in memory.
    Display column: DirtyPgs
    ADM field: DIRTYPAGES
    The DirtyPgs column reports the number of memory pages currently in use by a process that are dirty (or, recently modified). (A page is 4,096 bytes.) It includes only the pages in the space used by the Process Private data for the process (i.e., all pages whose Space ID matches the process's StkID (c.f.)).
    Display column: Dispatcher
    ADM field: DISPATCHER
    The Dispatcher column shows a bunch of dispatcher flags for each process. Flags are on if a letter appears in the column, and are off if the column is blank.
    Flags (in column order, left-to-right):

    s
    Process dispatcher state: (leftmost column)
    E = Executing
    R = Ready
    S = Short wait
    L = Long wait
    =
    Locked onto specific CPU (MPE/iX 6.5 and later)
    M
    ON_MAX_CPU
    q
    QUEUE_MANAGER
    <
    DECAYABLE_PROCESS
    @
    AT_LIMIT
    A
    ADJUST_QUANTUM
    B
    BEING_PDISABLED
    D
    DEAD_PROCESS
    L
    LOCALITY_PENDING
    P
    ALREADY_PREEMPTED
    Q
    TO_BE_QUIETSCED
    S
    SWAP_IN_DESIRED
    T
    TRANS_COMPLETE
    b
    IO_BOOST_DELAYED
    d
    DEFERRED_PREEMPT
    i
    CHANGE_IO_MODE
    m
    ARTIFICIAL_MEMBER
    p
    BLOCK_PAGE_FAULT
    l
    TO_BE_LAUNCHED
    u
    USER_PROCESS
    a
    ALREADY_SCAN

    If you want fewer columns, remember that you can do things like:
    ADM + DISPATCHER:4
    which would display only the left most 4 columns of flags (s=Mq).
    Display column: DPlimit
    ADM field: DPLIMIT
    The DPlimit column shows the maximum value that DP can grow to for each process. This value is also used by some parameter address checking code.
    Display column: Dump
    ADM field: DUMPARMED
    The Dump column shows Yes if a :STACKDUMP is in effect for a process. This means that if the process aborts, a mini stack trace will be generated.
    Display column: Entry
    ADM field: ENTRY
    The Entry column shows the virtual address of the entry point of a program. For example, the address of PROGRAM/START/main.
    Display column: EUID Caps
    ADM field: EUIDCAPS
    The EUID Caps column shows the capability mask for a process based on the current effective user-ID (a POSIX concept). If a process has never set the effective user-ID, the value is 0.
    Display column: F
    ADM field: FORKED
    The F column shows an f for any process that was created by a POSIX fork() call.

    NOTE In MPE/iX 4.5, a process created by fork() appears to have no name. SHOT will usually show its name as a virtual address in space $a.

    Display column: $Fork SP
    ADM field: FORKSP
    The $Fork SP column shows the value of the Stack Pointer (SP) at the point that the process was forked.
    Display column: GlbDP lim
    ADM field: GDPLIMIT
    The GlbDP lim column shows the value of the Global DP Limit for each process. This value is the limit in the DP area that will be copied if the process does a fork().
    Display column: HeapBase
    ADM field: HEAPBASE
    The HeapBase column shows the virtual address of the base of the Native Mode heap for the process.

    NOTE This is a process-local address, so you will need the process' SR5 (STKSID) value to form a usable 64-bit virtual address.

    Display column: HeapLimit
    ADM field: HEAPLIMIT
    The HeapLimit column shows the virtual address of the end (limit) of the Native Mode heap for the process.

    NOTE This is a process-local address, so you will need the process' SR5 (STKSID) value to form a usable 64-bit virtual address.

    Display column: #HeapPgs
    ADM field: HEAPPAGES
    The HeapPages column shows the number of disk pages used by the Native Mode heap for the process. Each page is 4,096 bytes.
    Display column: HeapSize
    ADM field: HEAPSIZE
    The HeapSize column shows the size of the Native Mode heap for the process.
    Display column: INFO=
    ADM field: INFO
    The INFO= column shows the first part of the INFO string for a process.
    Display column: INFO ptr
    ADM field: INFOPTR
    The INFO ptr column shows address of the INFO string for a process.
    Display column: IntPri
    ADM field: INTPRI
    The IntPri column shows the current priority of a process. Unlike the Pri column (which shows value in the range 0..255, where 0 is the highest), this column shows the internal value used by the dispatcher. This value ranges from 0..32767, where 0 is the lowest priority and 32767 is the highest priority. Whenever MPE (or a performance tool) report a priority in the 0..255 style, the value was obtained by converting it from the internal format with the formula:
    old'pri := (32767d - internal'pri) / 128d;
    Old format priority values can be converted to new format via:
    internal'pri := (255d - old'pri) * 128d + 1d;
    Display column: Job#
    ADM field: JSNUM
    The Job# column reports the job/session number that a process belongs to. By default, this column is suppressed. It can be requested by saying: SET MOST or SET ALL.
    Display column: Killer
    ADM field: KILLER
    The Killer column reports the PIN that has sent a KILL request to the process (if any).
    Display column: LSTX
    ADM field: LSTX
    The LSTX column reports the Loader Segment Table indeX used by each process. This is of little practical value.
    Display column: MemPages
    ADM field: MEMPAGES
    The MemPages column reports the number of main memory pages currently in use by a process. A page is 4,096 bytes. It includes only the pages in the space used by the Process Private data for the process (i.e., all pages whose Space ID matches the process's StkID (c.f.)).
    Display column: Parent
    ADM field: PARENTPIN
    The Parent column shows the PIN (Process Identification Number) of the parent of a process.
    Display column: Parm=
    ADM field: PARM
    The Parm= column shows the value of the PARM parameter at the start of each process.
    Display column: ProgrmCounter
    ADM field: PC
    The ProgrmCounter field shows the current program counter for a process. This will typically be an address within the kernel (in NL.PUB.SYS). For processes that are waiting on some event or other, it is typically the address of the MPE internal routine enable_int+$2c.

    NOTE This field is fetched from the Task Control Block, and thus is slightly stale for processes that are currently executing (for a single CPU system, this would be just the SHOT process).

    Display column: Pending Events
    ADM field: PENDING
    The Pending Events column reports what events are waiting to happen to the process. For example, if a control-Y has been pressed, but the process is inside FOPEN, the control-Y will be left pending until FOPEN is exited. The value reported is the subqueues on the Process Interrupt Port that have messages queued to them. A control-Y is often on subqueue 2, and would be reported as Int: [2].
    Display column: %SB
    ADM field: PERCENTSB
    The %SB column shows the approximate percentage of available CPU that a process has used since bootup.
    Display column: Pft
    ADM field: PFT
    The Pft column shows the Page Fault Type for each process. This is the object class of the virtual page last faulted on.
    Display column: Pin/Reuse
    ADM field: PID
    The PID is the Process ID, an extended form of the PIN (Process Identification Number) for a process. A PID is a non-reusable number identifying a process.
    When SHOT is asked to show PIDs instead of PINs, it uses the form: #1/#2, where #1 is the PIN portion of the PID and #2 is the reuse portion of the PID. The command SET PIDS changes the Pin column into the Pid/Reu column.
    Display column: Plabel Table
    ADM field: PLABTAB
    The Plabel Table column shows the virtual address of the Plabel table for the process. This table contains information about dynamically loaded procedures. If the process has not loaded any procedures, the address is 0.

    NOTE This is a process-local address, so you will need the process' SR5 (STKSID) value to form a usable 64-bit virtual address.

    Display column: P
    ADM field: POSIX
    The P column has a P if the process is flagged as a POSIX process. One example, as of MPE/iX 5.0, is SH.HPBIN.SYS (the POSIX shell).

    NOTE The Ic column should have a P for POSIX programs.

    Display column: PosixPid
    ADM field: POSIXPID
    The PosixPid column shows the POSIX PID (Process Identification Number) of a process. This is closely related to the PID of a process, but is encoded differently. Currently, the lower 16 bits is the PIN, and the upper 16 bits is the reuse count.
    Display column: ProtID
    ADM field: PROTID
    The ProtID column shows the Protection ID associated with the process’ stack.
    Display column: Ptype
    ADM field: PTYPE
    The Ptype column shows the process-type for each process. Possible types are: system, main, son, ucop, detach, user, and task. The SET PTYPE command allows processes to be excluded according to process-type. Typical uses of each process type are described in the next table:
    Table 16.5 Process Types
    Ptype Name / Number
    Examples
    User
    0
    SHOT.PUB.LPSTOOLS (created by a Son/User)
    Son
    1
    SHOT.PUB.LPSTOOLS (top level :RUN)
    Main
    2
    CI.PUB.SYS (top level CIs)
    Task
    3
    (unused?)
    System
    4
    PROGEN.PUB.SYS, pm_cleanup
    Detach
    5
    DIAGMON.PUB.SYS
    UCOP
    6
    JSMAIN.PUB.SYS

    NOTE Son is short for User, Son of Main.

    Display column: PxProgname
    ADM field: PXPROGNAME
    The PxProgname column shows the virtual address of the POSIX-format name for a process (if available).
    Display column: SecPages
    ADM field: SECPAGES
    The SecPages column reports the number of secondary storage (disk) pages used by a process. A page is 4,096 bytes. It currently includes only the pages for the NM stack, CM stack, and NM heap. (This is the majority of the transient disk space used by a process).
    Display column: StartTime
    ADM field: STARTTIME
    The StartTime column shows the time that the process started.
    Display column: StkSID
    ADM field: STKSID
    The StkSID field reports the Space ID of the NM stack for a process.
    Display column: #susp
    ADM field: SUSPEND
    The #susp column shows the current value of the TCB field suspend_cnt for a process.
    Display column: S
    ADM field: SWDEPTH
    The S column shows the current nesting count of switch calls (both switch-to-NM and switch-to- CM). This is NOT a cumulative value, but reflects instead the number of switch markers you would see if a stacktrace for the process was performed at that instant. This column is useful in detecting NM programs that are still using CM code (either directly or by calling MPE intrinsics that are still implemented in CM). If the Ic column shows a process as Nn, then the S column should be a multiple of 2. If the Ic column shows a process as Nc, then the S column should be an odd number.
    Display column: S
    ADM field: SYSCODE
    The S column shows the depth of nesting in system code for each process.

    NOTE A process is not in system code merely because it calls a procedure in XL.PUB.SYS or NL.PUB.SYS.

    System code is a process-local counter that is incremented by calling an internal routine, enter_system_code, and decremented by calling leave_system_code. Every intrinsic theoretically calls these two routines at entry/exit time. Some types of interrupts are postponed while a process is marked as being in system code.
    Display column: ThdPID
    ADM field: THDPID
    The ThdPID column shows the Thread Protection ID associated with the thread.
    Display column: Ttyp
    ADM field: THDTYPE
    The Ttyp column shows the type of executable entity for each process. The values are:

    proc
    ordinary process
    main
    process that has initiated threads
    thd
    process that is a thread


    NOTE main does not seem to be seen as often as expected.

    Display column: #Thds
    ADM field: THREADS
    The #Thds column shows how many threads a process has (not counting the original thread). For most processes, this value is 0 and is suppressed from the display.
    Display column: Tin
    ADM field: TIN
    The Tin column shows the tin (Thread Identification Number) for each process. This is usually 1. Note that this is not the number of threads a process has!
    Display column: TotFl
    ADM field: TOTFAULTS
    The TotFl column shows the total number of code and data page faults for each process.
    Display column: Tot%
    ADM field: TOTPERCENT
    The Tot% column shows the approximate percentage of available CPU that a process has used since SHOT started.
    Display column: TrapISM
    ADM field: TRAPISM
    The TrapISM column shows the address of the most recent Interrupt Stack Marker used as the result of a code trap in the process. Note that this area of the stack may have been overwritten since the interrupt occurred.
    Display column: TrapPC
    ADM field: TRAPPC
    The TrapPC column shows the value of the Program Counter (PC) at the time of the most recent code trap for the process.
    Display column: TrapStat
    ADM field: TRAPSTAT
    The TrapStat column shows the value of the HPE_STATUS that explains the most recent code trap for the process.
    Display column: User.Account
    ADM field: USERACCT
    The User.Account column shows the logon user ID and account ID of a process.
    Display column: Wait#
    ADM field: WAITNUM
    The Wait# column shows the blocked_reason field of a process PIB. This is the fine-grained reason why the process is not currently executing (if the value is 100, then the process is not blocked). This is the raw numeric value that normally gets formatted as the WAIT column.
    Display column: W.Port
    ADM field: WAITPORT
    The W.Port column reports the port number a process is waiting on (or, if it is waiting on multiple ports, the address of the array of port numbers). The field should be 0 if a process is not waiting on a port.
    Display column: Wait Semaphore
    ADM field: WAITSEM
    The Wait Semaphore column reports the address of the semaphore a process is waiting on, if the process in a Control Block Wait (wait # 18).
    Display column: sPIN
    ADM field: WAITSEMPIN
    The sPIN column reports the PIN of the process owning the semaphore a process is waiting on, if the process in a Control Block Wait (wait # 18) (and if SHOT can determine the owning PIN).
    Display column: WakeD
    ADM field: WAKEDAD
    The WakeD column reports Yes if the process will awaken its parent process (Dad) when it terminates.
    Display column: WorkGroup
    ADM field: WORKGROUP
    The WorkGroup column shows the Dispatcher WorkGroup that the process is in. (WorkGroup Manager is an optional product.)
    Display column: XRThigh
    ADM field: XRTHIGH
    The XRThigh column shows the high water mark of the XRT table for the process.
    After a Delta, Jobs, Sessions, %, or All display, SHOT reports the overall CPU utilization and the number of page faults. Both numbers are approximate, and represent the usage since the last display. An example is:
    CPU status: busy 4%, idle 96% (147 CPU out of 3252)
    # Page faults: 2 Code, 2 Data
    Both numbers are approximate, because if a process terminates SHOT cannot see its final resource usage.
    When CPU times are reported, they're in one of the following formats:

    #####
    number of milliseconds of CPU time
    s #####
    number of seconds of CPU time
    m #####
    number of minutes of CPU time
    h #####
    number of hours of CPU time
    D #####
    number of Days of CPU time
    W #####
    number of Weeks of CPU time

    At the end of every major display, SHOT checks to see if the Measurement Interface (MI) is on. If it is, a warning message is displayed: (Warning: MI on)
    This warning is generated because simply turning on the MI (which is done by most performance measurement tools (other than SHOT)) can degrade system performance by up to 70%,even when the tool is not actively collecting or displaying data.
    This is an easy assertion to test:
  • Time how long a command takes.
  • Example:
    :fcopy from=catalog.pub.sys;to=$null (throw away the first timing)
    :setvar elapsed hpconnsecs
    :setvar cpu hpcpumsecs
    :fcopy from=catalog.pub.sys;to=$null
    :setvar cpu hpcpumsecs - cpu
    :setvar elapsed hpconnsecs - elapsed
    :echo fcopy took !cpu CPU millisecs, !elapsed Elapsed seconds
  • Enable the MI (run GLANCE, wait for a screen display, hit Break)
  • Time how long the command takes now:
  • :fcopy from=catalog.pub.sys;to=$null (throw away the first timing)
    :setvar elapsed hpconnsecs
    :setvar cpu hpcpumsecs
    :fcopy from=catalog.pub.sys;to=$null
    :setvar cpu hpcpumsecs - cpu
    :setvar elapsed hpconnsecs - elapsed
    :echo fcopy took !cpu CPU millisecs, !elapsed Elapsed seconds
  • Compare the timings from the second run of each command. The first runs are thrown away out of fairness: different amounts of the file and code may have been in memory prior to the start of the command.
  • Queues, Quantum & Performance

    In this section, we will discuss the special topics of Queues, Quantum and Performance.

    Queues

    MPE/iX is a priority-based operating system. every process in the system is assigned a priority between 1 and 255 (1 is the highest priority). Processes are scheduled into and executed in one of five queues (AS, BS, CS, DS, ES), where each queue covers a range of priorities.
    The AS and BS queues are fixed priority, linear queues. Typically these queues are used for system processes. The CS, DS, and ES are referred to as circular queues (or subqueues). Processes that execute in these queues begin with the highest priority process and decay towards the lowest priority process as CPU resources are consumed. When a process reaches the limit of a queue (i.e., the lowest priority), or when it completes a transaction such as a disk I/O, a terminal I/O, or is preempted, it will circulate back into the queue with a new priority status assignment along with the other processes.
    Default priority ranges for the CS, DS, and ES queues are:
    Table 16.6 Priority ranges for queues
    Queue
    Range
    CS
    152 - 200
    DS
    202 - 238
    ES
    240 - 253

    Quantum

    A quantum is the measure of time that determines how much CPU time a process can have at a given priority. For the CS queue, the quantum is calculated by the operating system (based on demand) and is referred to as the SAQ (System Average Quantum). The quantum for the DS and the ES queues is fixed, although the System Manager can alter this value with the TUNE command. For any of these queues the quantum is used to control the rate of process priority decay.
    Additionally, timeslicing is used to limit CPU-bound processes. The hardware of the HP3000 generates an interrupt that is used by the dispatcher to determine if a process has exceeded its current quantum.

    Performance Optimization

    Generally speaking, optimal performance can only be achieved when a process is executing in native mode. The next best performance can be obtained by using the Object Code Translator. This program is used to translate your compatibility mode programs into native mode programs. The least desirable performance scenario occurs when running compatibility mode programs in emulation mode. When a program runs partly in native mode and partly in compatibility mode, it is called a mixed-mode program. Mixed-mode programs tend to operate at higher performance levels than those in strictly compatibility mode, but penalties are incurred for switching between the modes.

    Command Summary

    The following list provides a simple description of SHOT commands that you can use to quickly locate the command that suits the task at hand. Detailed information on each command is provided in the next section.

    NOTE Portions of the command codes are printed in uppercase to denote the part of the command that SHOT requires in order to distinguish one command from another. However, the commands themselves are not case-sensitive.


    Table 16.7 SHOT Commands
    Command Code
    Description
    ABORTCONNS
    Aborts all network connections for the specified process
    ABORTPROCIO
    Aborts all outstanding I/Os for the specified process
    ADM
    Formats process output display
    All
    Shows all processes
    ANCestors
    Displays the ancestors of the specified process
    Break pin#
    Suspends a process
    CPU pin#
    Prints the CPU usage for the specified pin
    DAD
    Similar to ANCESTORS
    DEBUG
    Invokes the HP DEBUG program
    Delta
    Shows processes using CPU between displays
    DETERMINEPROCNAMES
    Tells SHOT to regenerate SHOTPIDS.DATA
    ERASEPROCNAMES
    Tells SHOT to erase SHOTPIDS.DATA
    EXCLUDEPins
    Tells SHOT to exclude from the process display the specified process
    EXCLUDEwaits
    Tells SHOT to exclude from the process display any process that is waiting for the specified event(s)
    Exit
    Terminate the program
    FAMily
    Displays the ancestors of the specified process
    HELP
    Invokes SHOT help
    HIGHLIGHT
    Defines the display lines SHOT highlights
    Job
    Shows processes in a job-oriented display
    JOBINFO
    Displays information about the next job or session
    JS pin#
    Shows information about the specified pin
    KILL pin#
    Terminates the process
    LISTJOBQ
    Lists the defined job queues
    PARENT
    Similar to ANCESTORS
    PAUSE #seconds
    Tells SHOT to pause for specified number of seconds
    PIN pin#
    Displays information about the specified pin
    PRIority pin#
    Changes priority of a process
    PROGrams
    Lists all program files currently in use
    Resume
    Activates suspended process
    [RE]SET
    Includes options for selecting report items
    Sessions
    Lists all jobs and sessions
    SHOW
    Lists the values for certain process/job/port states
    SIRs
    Reports on locked SIRS
    STARTIDLE
    Starts a child process to consume otherwise idle CPU time
    STOPIDLE
    Terminates the SHOT idle process(es)
    SUMREUSE
    Asks SHOT to sum the PID reuse counter for all processes and to report the result
    SUMWAIT
    Displays the summary of wait reasons for the last SHOT display
    Suspend
    Tells SHOT to go to sleep until its parent or child wakens it
    TABles
    Displays information on tables
    TP pin#
    Displays accumulated CPU time for a process tree
    TRace pin#
    Prints stack trace for the specified pin
    Tree [pin#]
    Shows a nested Tree-oriented display of processes
    USEq
    Tells SHOT to read commands from the specified file
    USErs
    Shorthand for SET PTYPE=USER SON MAIN
    ?
    Synonym for HELP
    % #
    Displays processes using this % of CPU per display
    /
    Terminate the program

    Command Definitions

    This section discusses each of the SHOT commands in detail. In several cases, we have provided syntax examples.

    ABORTCONNS

    The ABORTCONNS command has the following syntax:
    ABORTCONNS pin
    This command will attempt to abort all network connections for the specified process (usually a VTSERVER process).

    NOTE This should be used with great care, and requires SM capability.
     

    ABORTPROCIO

    The ABORTPROCIO command has the following syntax:
    ABORTPROCIO pin
    This command will attempt to abort all outstanding I/Os for the specified process.

    NOTE This should be used with great care, and requires SM capability.
     

    ADM

    The ADM command has one of the following syntaxes:
    ADM
    ADM ?
    ADM EDIT
    ADM [ DEFAULT | APPEND | + ] <fieldlist>
    Where:
    <fieldlist> is: field [ , field ...] [ ) ] [ & field , field ... ]
    The ADM (Automatic Display Mode) command tells SHOT what information should be displayed for the Delta, All, TREE, and % displays. It also specifies the order of the information. Each item of information is called a field.
    If no options follow the ADM command, the current field list is displayed:


    Figure 16.2 ADM Command - Example 1
    If ADM is followed by a simple list of fields, then the old list is cleared and the new list is used. The field name ALL means all known ADM fields, and produces extremely verbose and hard to read output. The field name ALLSINGLE means all known ADM fields, with one field/value per line. This is also extremely verbose.
    If ADM is followed by the word DEFAULT, then the list is set to the default set of ADM fields, plus whatever fields follow on the rest of the command line. The default list of fields is usually:
    ADM (STATE, PIN, CPU, NAME, PRI, QUEUE, DELTA, PERCENT, EXECMODE, WAIT)
    If ADM is followed by the word APPEND (or a plus sign), then the new list is appended near the end of the old list. If the old list had a WAIT field, then it is temporarily removed from the old list, the new fields are added, and then the WAIT field is placed at the end of the combined field list.
    If ADM is followed by the word EDIT, then the current ADM list is displayed for editing. To exit the editing without using the new list, press control-Y or erase the entire list (control-X followed by control-E). If an error is found in the list, the edited list will be displayed for re-editing.
    If a question mark (?) follows the ADM command, then all known fields will be listed, along with their length, and formatting characteristics.







    Figure 16.3 ADM Command - Example 2
    Help on individual ADM fields can be obtained by typing HELP ADM-<fieldname> (i.e., HELP ADM-CR)
    The title column shows the title string that will be displayed in the SHOT output (room permitting).
    A format note of (blank 0s) means that zero values will be displayed as a blank field. A note of Yes in the Dup ok? column means that a field list may contain multiple instances of the field.
    The DefLen column shows the default length of each field, but only when the default length does not match the current length. When adding a field to the ADM list, a different width (other than the default) can be specified by appending a colon (:) and the desired width.
    For example: CRITICAL:2

    NOTE Some of the SET commands do implicit ADM commands. For example, SET SWDEPTH adds the SWDEPTH field to the ADM field list.
     

    Normally, the response to a Delta or ALL command is built by stringing the requested ADM fields together, one after another, with a blank separating each field.
    Some of the ADM fields are for output formatting use, including:

    BLANK
    Displays a single blank
    BLANK4
    Displays four blanks
    BLANK8
    Displays eight blanks
    COMMA
    Displays a comma
    CR
    Displays a carriage return (i.e., splits the output into multiple lines at that point)
    DASH8
    Displays eight dashes ("--------")
    CLS
    Sends a home-up/clear-screen command (<esc>h <esc>J>). This would typically be used at the start of an ADM sequence. It is sent only with the ADM header, not once per process.
    NEWPAGE
    Sends a home-down, vertical tab, next-page command, which effectively places the cursor at the top of a fresh page of terminal memory, without losing data already in terminal memory (i.e., you can "page" back and see the prior displays).

    The rest of the ADM fields are documented in "The SHOT Process Display" section above.

    All

    This command has the following syntax:
    All [USER | ALL]
    The ALL command displays all processes in system. If ALL USER is specified, only user processes are displayed (until an ALL ALL is done). If ALL ALL is specified, all processes are displayed.

    ANCestors

    This command has the following syntax:
    ANCestors pin# [[no]LOCK]
    Displays the ancestors of the specified process, back to process 1 (1 is the final ancestor of every process).
    LOCK guarantees that no process will terminate or start during the traversal of the process tree. NOLOCK tells SHOT not to do any locking. LOCK is the default.

    Break pin#

    Suspends the specified process.

    NOTE Because breaking and resuming processes can cause system problems, only SM or PM users may issue this command.

    CPU pin#

    Reports the CPU usage for the specified process.

    DAD pin

    PARENT pin

    These commands have the following syntax:
    PARENT pin [ <All | [no]Verbose> ]
    DAD pin [ <All | [no]Verbose> ]
    The PARENT (or DAD) command is similar to the ANCESTORS command, in that it can be used to display the parent, grandparent, etc., of a process. Unlike ANCESTORS, it has the option of displaying the program name (by specifying VERBOSE) as well. Additionally, the default is to just show the parent process, not the rest of the ancestors (ALL requests all of them).

    NOTE Unlike the ANCESTORS command, DAD/PARENT never locks the process tree while traversing it.

    DEBUG

    Invokes DEBUG/iX, the free instruction-level debugger that comes with MPE/iX. To exit Debug and resume SHOT, enter: c

    NOTE The first time DEBUG is invoked for a process, it takes a noticeable amount of time to startup. SHOT is aware of this and warns you the first time you use the DEBUG command.

    Delta

    Display only processes that have used CPU since the last display.

    DETERMINEPROCNAMES

    DETERMINEPROCNAMES tells SHOT to erase the SHOTPIDS.DATA file and determine anew the names for procreated processes (i.e.: pin ?). An implicit DETERMINEPROCNAMES is done by the first SHOT that runs after a system startup.

    ERASEPROCNAMES

    ERASEPROCNAMES tells SHOT to erase the SHOTPIDS.DATA file. A subsequent run of SHOT (or a subsequent use of the DETERMINEPROCNAMES command) will rebuild the data in the file.

    NOTE This command is not generally useful to users.

    EXCLUDEPins

    This command has the following syntax:
    EXCLUDEPins <LIST | ? | NONE | ALL | # [/#] | -#> [...]
    EXCLUDEPINS tells SHOT to exclude from the process display (for ALL, DELTA, JOBS, and SESSIONS) the specified processes.

    EXCLUDEPINS
    Will list the current filter.
    EXCLUDEPINS ? (or EXCLUDEPINS LIST)
    Same as EXCLUDEPINS
    EXCLUDEPINS NONE
    Turns off the exclude-pin filter entirely.
    EXCLUDEPINS ALL
    Says "exclude every process".
    EXCLUDEPINS #
    Says "exclude specified PIN"
    EXCLUDEPINS #/#
    Says "exclude specified PIN range"
    EXCLUDEPINS -#
    Says "do not exclude specified PIN"

    See also: SET TRACE

    EXCLUDEwaits

    This command has the following syntax:
    EXCLUDEwaits <LIST | ? | NONE | ALL | # | -# | field | -field> [...]
    EXCLUDEWAITS tells SHOT to exclude from the process display (for ALL, DELTA, JOBS, and SESSIONS) any process that is waiting for the specified event(s).

    EXCLUDEWAITS
    will list the current filter.
    EXCLUDEWAITS ? (or EXCLUDEWAITS LIST)
    same as EXCLUDEWAITS
    EXCLUDEWAITS NONE
    turns off the exclude-wait filter entirely.
    EXCLUDEWAITS ALL
    says "exclude every process".
    EXCLUDEWAITS field (or #)
    says "exclude specified wait type".
    EXCLUDEWAITS -field (or -#)
    says "do not exclude specified wait type"

    To see a list of the possible reasons for exclusion, enter:
    EXCLUDEWAITS ?? (two question marks)
    which will list all reasons, flagging the currently excluded ones with an asterisk (*).
    See also: SET TRACE

    Exit or /

    Terminates the program.

    FAMily pin#

    This command has the following syntax:
    FAMily pin# [[no]LOCK]
    Displays the ancestors of the specified process, back to process 1 (1 is the final ancestor of every process).
    Displays the descendants of the specified process, as far down the process tree as they exist. The children are displayed one per line, indented two spaces. The grandchildren are displayed one per line, indented four spaces. And so on!
    LOCK guarantees that no process will terminate or start during the traversal of the process tree. NOLOCK tells SHOT not to do any locking. LOCK is the default.

    HELP

    This command has the following syntax:
    HELP [commandname]
    HELP commandname gets help information on all commands that match the specified portion of the command name. For example, HELP T would get information on the TP command, TRACE command, and TREE command.

    HIGHLIGHT

    This command has the following syntax:
    HIGHLIGHT [CLEAR] [OFF] [ON] [PROGRAM file.group.acct]
    [USER [job,]user.acct]
    The HIGHLIGHT command defines what lines of a SHOT display should be highlighted. A line will be highlighted if it satisfies either the PROGRAM pattern or the USER pattern.

    HIGHLIGHT OFF
    temporarily disables highlighting, but without forgetting the PROGRAM and USER patterns.
    HIGHTLIGHT ON
    restores the highlighting check.
    HIGHLIGHT CLEAR
    clears all patterns and turns off highlighting.

    The file, group, acct, job, and user patterns may have standard MPE wildcards.

    NOTE Procreated processes are not subject to highlighting, as they do not have program files associated with them.

    Example 1: to highlight users of QUERY.PUB.SYS, do:
    HIGHLIGHT PROGRAM QUERY.PUB.SYS
    Example 2: to highlight all users in the SALES account, do:
    HIGHLIGHT USERS @.SALES

    Job

    This command has the following syntax:
    Job [Only]
    Displays a list of all jobs and sessions. For each job/session, a process tree is displayed, showing every process belonging to the job/session. The Only keyword restricts the display to only jobs (and not sessions).

    JOBINFO

    This command has the following syntax:
    JOBINFO [NEXTJOB #] [NEXTSESSION #]
    The JOBINFO command with no options tells SHOT to display some job/session global information.

    NEXTJOB
    Allows SM users to reset the counter that MPE uses to assign the next job's number.
    NEXTSESSION
    Allows SM users to reset the counter that MPE uses to assign the next session's number.

    JS pin#

    The JS command reports the Job/Session associated with a specified pin.

    KILL pin#

    Tells SHOT to try to kill the specified process. SHOT will ask for confirmation before it proceeds. Requires SM capability.

    LISTJOBQ

    This command has the following syntax:
    LISTJOBQ [prefix]
    Lists the defined job queues. If [prefix] is omitted, all job queue are listed. Otherwise, only those job queues that match the prefix are listed. For example, LISTJOBQ PROD will list PROD, PRODBIG, and PRODSLOW (assuming they exist, of course).

    PAUSE #seconds

    Tells SHOT to pause (by calling the PAUSE intrinsic) for the specified number of seconds. You should be able to terminate the pause early by pressing control-Y.

    % #

    Tells SHOT to only display processes that have used at least the specified percentage of the CPU since the last display.
    Example: %5

    PIN pin#

    # pin#

    Display information about the specified process.
    Example 1: 45
    Example 2: PIN 45

    PRIority pin#

    This command has the following syntax:
    PRIority pin# <CS | DS | ES | BS | AS>
    Sets the specified pin to the desired priority.

    NOTE Only a user with SM or PM can set a process to BS or AS priority, due to the possibility that a process running at that priority could take over the system.

    Examples:
    PRI 0 CS sets SHOT priority to CS
    PRI 45 ES sets pin 45 to priority ES

    PROGrams

    Displays a list of programs that are currently running, sorted alphabetically. For each program, the number of processes running it is shown, along with the name of the program, the type of program (NM, CM, OCT), and (for OCT and CM) the capabilities of the program (i.e.: PM, ph). (A capability of PrivSeg means that at least one code segment in an CM or OCT program is privileged.)
    Example:


    Resume pin#

    Resumes a process suspended with the Break command.

    NOTE Because breaking and resuming processes can cause system problems, only SM or PM users may issue this command.

    Sessions

    This command has the following syntax:
    Sessions [Only]
    Displays a list of all jobs and sessions. For each job/session, a process tree is displayed, showing every process belonging to the job/session. The Only keyword restricts the display to only sessions (and not jobs).

    [RE]SET

    These commands have the following syntax:
    [RE]SET [<setoption> [ , <setoption> ... ] ]
    The SET and RESET commands may be followed by one or more <setoption>s. Each option is explained below. An option following a SET keyword is turned on, an option following a RESET keyword is turned off. If no option follows SET or RESET, then all current option settings are displayed.
    <setoption> ::=
    [RE]SET ALL
    Obsolete synonym for [RE]SET MOST.
    SET DELAY #seconds
    RESET DELAY
    The DELAY #seconds option tells SHOT to automatically display the system activity every # seconds. This is accomplished by doing a timed-read of # seconds as a prompt. If input is received before the timeout, it will be acted on. Otherwise, the timeout causes the display to be updated with either ALL processes, Delta processes, or just those which have used more than the threshold percentage of CPU (see the % command). When a timed-read times out, the display that results is governed by the last Delta, ALL, or % command seen. DELAY 0 disables the timed out reads.
    Default: 0
    Example: SET DELAY 10
    [RE]SET DELTA
    Adds (SET) or deletes (RESET) the DELTA field from the ADM display.
    [RE]SET EXECmode
    When EXECMODE is on, SHOT reports the initial and current mode of execution for each process in a two character column. The first character reports the initial mode of a process (C for Compatibility Mode, N for Native Mode), and the second character reports the current mode (c for Compatibility Mode, n for Native Mode). The initial mode for CM programs (filecode PROG) is C (even if they were Object Code Translated). The initial mode for NM programs (filecode NMPRG) is N.
    Default: ON
    [RE]SET FAULTs
    When FAULTS is on, SHOT reports the number of data faults and code faults a process has had since the last display (DELFAULTS). See also: CFAULTS, DFAULTS, DELFAULTS, and TOTFAULTS.
    [RE]SET HEXPINs
    When HEXPINS is on, SHOT will report pin numbers in hexadecimal instead of decimal. This is useful when using SHOT and DEBUG in parallel.
    Default: OFF
    [RE]SET JOBSTEP
    When JOBSTEP is on, a JOB display will show the current job "step", which is (essentially) the last CI-command read.

    NOTE Seeing the actual job step may require SM capability.

    Default: ON
    [RE]SET JSnum
    When JSNUM is on, the process display will include job and session numbers.
    Default: OFF
    SET LINES #
    SET COLUMNS #
    LINES and COLUMNS values tell SHOT how big your display is. The default is 24 by 80, which is initially modified by the values of the CI variables COLUMNS and LINES (if they exist).
    [RE]SET MOST
    Setting MOST is equivalent to doing: SET hexpins, jobstep, jsnum, showptype, swdepth, unknown.
    Resetting MOST is equivalent to doing:
    RESET hexpins, jobstep, jsnum, showptype, swdepth, unknown
    [RE]SET NUMPINs
    SET NUMPINS (the default) tells SHOT that a terse summary should report the number of processes.
    [RE]SET ONEchar
    For interactive runs, the ONECHAR option (on by default) tells SHOT to do single-character reads at the prompt. The NOONECHAR option makes the prompt do a bigger read, so an entire command line can be entered at once.
    [RE]SET PC
    The PC option is shorthand for ADM + (or -) PC
    [RE]SET PENDING
    When the PENDING option is on, SHOT displays a column showing events that are pending for a process. This includes interrupts, activations, and other messages that would be sent to a process' standard signal, message, and interrupt ports.
    [RE]SET PIDs
    When the PIDS option is on, SHOT displays Process IDs instead of pins. A Process ID (pid) is displayed as a pin, a slash (/), and a re-use counter for the pin. A pid is unique during the lifetime of one bootup of MPE/iX.
    [RE]SET POSIX
    The POSIX option is shorthand for ADM + (or -) POSIX POSIXPID
    [RE]SET PRIority
    The PRIORITY option is shorthand for ADM + (or -) PRI
    [RE]SET PTYPE
    This command has the following syntax:
    [RE]SET PTYPE [=] [ + | - ] <ALL | DETach | NONE | SYStem | TASK |
    UCOp | USErs>
    The PTYPE option tells SHOT what kind of processes should be shown in the process display. Every process has a process type, which is one of: detach, system, task, ucop, main, or user.
    Example: SET PTYPE = DETACH causes SHOT to show only detached processes.
    [RE]SET QUEUE
    The QUEUE option is shorthand for ADM + (or -) QUEUE
    RESET
    All options found after the keyword RESET are turned OFF. A RESET keyword may be used in the same line as a SET keyword.
    Example: SET ONE RESET PIDS
    SET
    All options found after the keyword SET are turned ON. A SET keyword may be used in the same line as a RESET keyword.
    Example: RESET PIDS SET ONE
    [RE]SET SHOWBIRTHs
    [RE]SET SHOWDEATHS
    Normally, when SHOT notices that a process has terminated, or that an new process has been born, it will not volunteer anything. SET SHOWBIRTHS tells SHOT to mention when it sees a new process. SET SHOWDEATHS tells SHOT to mention when it notices that a process has terminated.
    [RE]SET SHOWPRIORwait
    SET SHOWPRIORWAIT tells SHOT that in some cases it should report the last port number that a process waited on, even if we think it is currently not waiting.

    NOTE This is experimental.

    [RE]SET SHOWPTYPE
    When SHOWPTYPE is on, the process display will show the type of each process. This option is not the same as the PTYPE option which can be used to filter out processes based on their type.
    SET SUMMARY
    This command has the following syntax:
    SET SUMMARY = <NORMAL | TERSE | VERBOSE>
    The SUMMARY option controls the amount of information displayed at the end of a DELTA or ALL command.
    [RE]SET SWDEPTH
    When SWDEPTH is on, the process display will show the Switch Depth of every process. This counter reflects the total number of switch-to-CM and switch-to-NM markers that are currently in the process's stack. The SWDEPTH column is labelled S. A blank denotes a switch depth of 0.

    NOTE SWDEPTH does not show the cumulative number of switches done since the process started. Some system routines (i.e.: CM DBGET) switch modes in a manner that does not increment the SWDEPTH counters. This can result in SHOT showing a process as being Cn with an even value in the SWDEPTH column.

    Default: OFF
    [RE]SET THREADS
    The THREADS option is shorthand for ADM + (or -) THREADS THDTYPE TIN
    [RE]SET TIMES
    SET TIMES tells SHOT to report the CPU and elapsed time that some SHOT commands use. Note that the DELTA/ALL command output is generated outside the timing statistics area.
    [RE]SET TOTPERCENT
    When TOTPERCENT is on, the process display will show the total cpu usage percentage since each process was first seen by SHOT.
    [RE]SET TRACE
    Experimental option. When SET, SHOW will produce a stack trace for any process selected in a DELTA or ALL report.
    [RE]SET UNKNOWN
    When UNKNOWN is on, SHOT will report processes that are in the unknown state if they use CPU time. Normally, processes should not be in this state AND be using CPU time. MPE/iX has a small timing window where this appears to sometimes happen.
    Default: OFF
    [RE]SET VJOBINFO
    SET VJOBINFO tells SHOT to produce a verbose output for each job found in the JOB or SESSIONS command.

    NOTE This is experimental.

    [RE]SET WAITNUM
    SET WAITNUM tells SHOT that the values in the ADM WAIT field should include the wait state number, as well as the wait state name.
    [RE]SET WAITTRACE
    SET WAITTRACE tells SHOT that if a DELTA or ALL command finds a process that is in a control block wait (wait # 18), and SHOT can determine the PIN of the process that owns the control block, then SHOT should do a stack trace of that process.
    SET WIDTH #
    SET 80
    SET 132
    SET WIDTH # sets the logical terminal width to the specified number of columns. No other action is taken, as SHOT assumes you have manually changed your terminal's width externally.
    Note that SET WIDTH 132 is not identical to SET 132, because SET 132 does an implied SET MOST, and also emits the HP escape sequence to put your terminal into 132 column mode.
    SET 132 tells SHOT to try to put an HP700/9x terminal into 132 column mode. SET 132 also implies SET MOST.
    SET 80 tells SHOT to try to put an HP700/9x terminal into 80 column mode.

    SHOW

    This command has the following syntax:
    SHOW <WAIT | JOBS | PORTS | PSM | PSP>
    The SHOW command lists the values for certain process/job/port states. Generally, only SHOW WAIT is of much use.
    SHOW WAIT shows all the wait states (which may be specified in SET WAIT = xxxxx command).

    NOTE Wait states 0, 1, 2, and 3 are generally not seen in the SHOT WAIT column, because they are actually stored as more refined values (i.e., perhaps 18 instead of 2).


    SHOW JOBS
    Shows all the job states
    SHOW PORTS
    Shows the known port numbers
    SHOW PSM
    Shows some more reasons processes wait on a port
    SHOW PSP
    Shows some reasons processes wait on a port

    SIRs

    The SIRS command reports what SIRs (System Internal Resources) are locked (if any), by whom, and the list of waiting processes.

    STARTIDLE

    STOPIDLE

    STARTIDLE starts a child process to consume otherwise idle CPU time. The new process runs at extremely low priority, and does while true do; (i.e., infinite loop).
    Having a low priority process eat CPU time allows you to get a different view of CPU utilization. On a busy system, the birth/death of processes may distort SHOT's view of how busy the system is. After a STARTIDLE command, the amount of CPU used by the sum of the SHOT idle processes represents the amount of CPU that would normally have been available, unused. For example, on a single CPU system, if the SHOT idle process is using 75% of the CPU, then if it were not running, the CPU would be 75% idle (and 25% busy).
    STARTIDLE will start one SHOT idle process per CPU.
    STOPIDLE terminates the SHOT idle process(es).

    NOTE These commands are rarely used, because SHOT has other methods of determining CPU utilization. They are here in case you want to use them.
    All performance tools should report the CPU as 100% (or completely) busy after a STARTIDLE, and the speedometer on the front of the computer (or on the status line of ldev 20) should show FAFF (100% busy).

    SUMREUSE

    The SUMREUSE command asks SHOT to sum the PID reuse counter for all processes and to report the result. The sum should be the number of processes that have run on your system since bootup, counting the currently living processes.
    Example:
    SUMREUSE
    Counting...
    Sum: 7,057
    Checked 122 PINs

    SUMWAIT

    This command has the following syntax:
    SUMWAIT [CLEAR] [LIST] [ALL]
    Displays the summary of wait reasons for the last SHOT display. The summary is cumulative. Every time SHOT does an ALL, DELTA, or "%" display, the summary is updated.

    SUMWAIT LIST
    Displays the current totals (that are not 0).
    SUMWAIT ALL
    Displays all totals, even the ones with 0.
    SUMWAIT CLEAR
    Sets all of the totals to 0.

    Suspend

    The SUSPEND command tells SHOT to go to sleep until its parent or child wakens it. It is implemented by calling: activate (0, 3);

    TABles

    The TABLES command reports on various Virtual Space Management tables. In particular, it reports the high-water Space ID (SID) that has been used, and the high-water Protection ID. It also reports how much short-mapped system space is available (SR6/SR7 space).

    TP pin#

    The TP command prints the accumulated CPU time for the entire process tree starting at the specified pin. (TP stands for Tree Process time).

    TRace pin#

    The TRACE command tells SHOT to print a stack trace for the specified pin.

    Tree [pin#]

    This command has the following syntax:
    Tree pin# [depth#] [ALL]
    Displays a tree of process information, with the specified process as the root. Using a pin# of 1 will result in the entire system's process tree. The depth# option, if specified, tells SHOT to limit the depth of the tree to the value specified.
    The ALL keyword tells SHOT to temporarily ignore all process filters. (i.e., EXCLUDEPINS, EXCLUDEWAITS)
    Example 1: TREE 1 the tree of all processes
    Example 2: TREE 1,2 pin 1 and only its direct children (no grand-children)
    Example 3: TREE 0 process tree starting at SHOT

    USEq

    This command has the following syntax:
    USEq filename
    The USE and USEQ commands tell SHOT to read commands from the specified file. USE will echo the commands to $stdlist before executing them. USEQ does not echo the commands.
    USE / USEQ files may not be nested.

    USErs

    The USER command is a shorthand version of the SET PTYPE command:
    SET PTYPE = USER SON MAIN
    USER will filter out all non user processes from most SHOT displays.

    TOOLBOX STANDARDS

    The ToolBox collections from Lund Performance Solutions have a uniform user interface. As a result, in addition to the commands specific to each Toolbox tool, most tools allow the commands described in "TOOLBOX STANDARDS".

    SHOT Examples

    Here are some examples of the SHOT tool.


    Figure 16.4 A typical SHOT DELTA Display
    The DELTA command shows which processes have recently used CPU resources and what percentage of CPU resource was consumed for each process.
    The ALL command shows every process staring with pin#1 (PROGEN) in ascending order to the highest pin.






    Figure 16.5 SHOT ALL Command
    Figure 16.6 is an example that shows the use of restriction. In this case, the SHOT display is for jobs only.


    Figure 16.6 Restricted SHOT Display
    Figure 16.7 shows a typical SHOT sessions only display.


    Figure 16.7 Sessions-only SHOT Display
    In Figure 16.8 we see how to use SHOT’s TRace pin command.


    Figure 16.8 TRACE PIN Command
    The following example shows how running SHOT’s TREE command on pin #1 (PROGEN) displays the entire process tree.






    Figure 16.9 TREE Command
    SHOT’s default display can easily be modified using the ADM command (see Figure 16.10) to show only those process activities that are of interest to you.


    Figure 16.10 ADM Command
    The SWITCHDEPTH column (headed with the letter S) indicates how many times a process has switched between Native Mode and Compatibility Mode (see Figure 16.11).


    Figure 16.11 SWITCHDEPTH Column

    NOTE Program optimization on an MPE/iX machine often involves migrating from Compatibility Mode to Native Mode. SHOT’s SWDEPTH option can be used to determine how many times your application is switching between Compatibility Mode and Native Mode. Excessive switching can result in significant performance penalties.

    Figure 16.12 is an example that shows the use of the PROG command.


    Figure 16.12 PROG Command

    SHOT Error Messages

    Each SHOT error message is described in the next table.
    Table 16.8 SHOT Error Messages
    Message
    Cause
    Action
    DEBUG requires SM or PM capability
    Using the DEBUG command from within SHOT requires that you have PM.
    Use GRANT from the System Manager’s Toolbox to give yourself PM, or logon as a user that has PM.
    You must have SM capability to do this.
    The SHOT commands ABORTCONNS, ABORTPROCIO, BREAK, RESUME, KILL require that a user has SM.
    Use GRANT from the System Manager’s Toolbox to give yourself PM, or logon as a user that has PM.
    You must have SM or OP capability to do this.
    The SHOT command PRIORITY requires that a user have SM or OP.
    Use GRANT from the System Manager’s Toolbox, or logon as a user that has either SM or OP.
    You must have SM or PM capability to do this.
    The SHOT command TRACE requires that a user have SM or PM.
    Use GRANT from the System Manager’s Toolbox to give yourself PM, or logon as a user that has SM or PM.

    Lund Performance Solutions
    www.lund.com
    Voice: (541) 812-7600
    Fax: (541) 81207611
    info@lund.com
    TOCPREVNEXTINDEX