1 PSTAT

  PSTAT is a multi-purpose tool for analyzing and managing processes
  on OpenVMS systems.  It performs the following functions:

  o  Lets users select processes based on various characteristics
     using wildcard characters.

  o  Allows continuous monitoring of a given process.  This mode has 
     a single keystroke deletion feature.

  o  Allows deletion of multiple processes based on selected process
     characteristics.

  o  Displays existing processes on a system, giving terminal name,
     process identification number, owner pid, uic, process name,
     current process state, current and base priority, login time,
     CPU time, connect time, physical memory used divided into the 
     number of pages the process has in the working set and the 
     global page count, currently running image, and the CPU time to
     connect time ratio.

2 Qualifiers

/NODE=nodename

  Selects processes on a specified node.  A wildcard character may
  be used to specify all nodes in the cluster.  PSTAT will default
  to the current node when this qualifier is not specified.

/USERNAME=username

  Selects processes matching the specified username.  The username may
  be abbreviated and may contain wildcard characters.
 
/PROCESS=process_name

  Selects processes matching the specified process name.  The process 
  name may be abbreviated and may contain wildcard characters.

/IDENTIFICATION=id_number

  Selects a process matching the specified process identification 
  number.

/IMAGE=image_name

  Selects processes matching the specified image name.  The image name 
  may be abbreviated and may contain wildcard characters.

/BEFORE=time

  Selects processes created prior to the specified time.  You can
  specify  time as an absolute time, as a combination of absolute and
  delta times, or as one of the following keywords:  TODAY, TOMORROW, 
  or YESTERDAY.                                 
  
/AFTER=time

  Selects processes created after the specified time.  You can
  specify  time  as an absolute time, as a combination of absolute and
  delta times, or as one of the following keywords:  TODAY, TOMORROW, 
  or YESTERDAY.

/RATIO=(comparison_type=float_number[,...])

  The following type keywords may be specified:

  LESS_THAN=float_number
  GREATER_THAN=float_number

  This qualifier selects processes with a CPU to connect time ratio
  which meets the specified criteria.

/TYPE=(process-type[,...])
  
  Controls the selection of the types of processes to be analyzed.
  Parentheses can be omitted if you specify only one process type.
  You can specify any of the following keywords:

  [NO]INTERACTIVE                        All interactive root processes.
  [NO]BATCH                              All batch root processes.
  [NO]NETWORK                            All network root processes.
  [NO]DETACHED                           All detached root processes.
  [NO]DIALUP                             All dialup root processes.
  [NO]REMOTE                             All remote root processes.
  [NO]SUBPROCESS=[UNION, INTERSECTION]   All subprocesses.  PSTAT defaults
                                         to union.  Notice, that the root 
                                         processes will still be shown.
  ANY                                    All processes are displayed.  Any
                                         other /TYPE options specified will 
                                         be overridden.

  By default, if you omit the /TYPE qualifier and none other
  qualifiers are specified, /TYPE=INTERACTIVE is assumed.  Otherwise,
  /TYPE=ANY is used as a default.
  
/CONTINUOUS

  Continuously displays updated information about a process selected
  by other qualifiers.  In the continuous update mode, CTRL-D may be
  used to delete the currently displayed process, if the user who
  activated PSTAT has sufficient privilege to stop the process.
                        
/FULL

  Displays detailed information about processes.  If this qualifier 
  is not specified, PSTAT shows brief information consisting of a 
  username, process identification number, process name, CPU time, 
  connect time, and the CPU to connect time ratio.
  
/DELETE
  
  All matching processes will be deleted, if the user who activated
  PSTAT has sufficient privilege to stop those processes.  PSTAT will
  request a confirmation request for every deletion operation;
  please see help for the /CONFIRM qualifier for more information.
  This qualifier may be used only for non-continuous mode. 

/CONFIRM

 /CONFIRM
 /NOCONFIRM

  Controls whether a request is issued before each individual process
  deletion to confirm that the operation should be performed on that
  process.  When PSTAT issues the prompt, a user can use YES or NO as
  a response.  Any combination of upper- and lowercase letters may be
  used.  The responses may be abbreviated to one or more letters.  If
  a user types a response other than YES or NO, the default value
  will be used.

  By default, PSTAT will prompt for confirmation for every deletion
  operation.

/LOCK

 /LOCK 
 /NOLOCK

  When this qualifier is used, PSTAT will lock on a matching process.
  Using this qualifier may speed up the operation of the program
  considerably when the process search space is large.  If /NOLOCK is 
  used, PSTAT will continuously check for any processes that match the
  initially set characteristics.  If such processes are found while
  monitoring the current process, PSTAT will exit with an informational
  message.  This qualifier may be used only for the continuous update
  mode.

  By default, PSTAT will lock on a currently viewed process.

/LOG
  
 /LOG
 /NOLOG

  Controls whether PSTAT will issue a confirmation when a process has
  been deleted.

  By default, PSTAT will output the confirmation message for every
  deleted process.

/VERSION

  Displays the copyright and the current version of PSTAT.  For
  PSTAT version 2.1 it returns the following string:

  PSTAT v2.1 * Author Vadim Gorokhovsky * Copyright (C) Brandeis University

2 Examples
 
  $ PSTAT /USER=SM*TH /IMAGE=MA*L /BEFORE=TODAY /FULL

  The program will display detailed information about processes 
  created before TODAY of users matching the specified username
  who run the image set by the /IMAGE qualifier.

  $ PSTAT /CONTINUOUS /USERNAME=SMITH /TYPE=INTERACTIVE

  If there a single process matching the specified characteristics,
  PSTAT will enter the continuous update mode.  CTRL-D may be used
  to delete the currently displayed process, if the user who activated
  PSTAT has sufficient privilege to stop the process.

  $ PSTAT /NODE=* /BEFORE=YESTERDAY /RATIO=LESS_THAN=0.01 /DELETE

  PSTAT will display and attempt to delete processes that were
  created before YESTERDAY with the connect to CPU time ratio
  less than 0.01 on all nodes in the cluster.  The program will
  ask for the confirmation from the user for every deletion
  operation and output log messages indicating the status of the
  deletions.

  $ PSTAT /TYPE=DETACHED /PROCESS=SSV$LTA* /DELETE /NOCONFIRM

  The program will display and attempt to delete all matching
  processes as well as output log messages indicating the status
  of the deletions.

  $ PSTAT /TYPE=(BATCH, SUBPROCESS=INTERSECTION)
 
  The program will display all batch processes including their 
  respective subprocesses.  

  $ PSTAT /TYPE=(BATCH, SUBPROCESS=UNION)

  The program will display all batch processes and all subprocesses
  on the system.
