.LM 0
.RM 80
.NAJ
.NJ
.! This .rnd file has one variants
.! Without the variant it produces a DOC of the user instructions for SYSMON
.! With the /VARIANT=HELP it produces a .DOC file of the form needed for a
.! .HLP file and can be renamed and used as such.
.!
.! This file SYSMON.RND is the source for SYSMON.DOC and SYSMON.HLP which
.! are the user document and the HELP file respectively.
.!
.! They my be produced by the commands:
.!
.! DEF DECUS .....			! Define the "Disk" for Sysmon
.!
.! SET DEFAULT DECUS:[SYSMON]		! To enter the SYSMON directory. 
.!
.! RUNOFF DECUS:[SYSMON]SYSMON.RND	! to produce DECUS:[SYSMON]SYSMON.DOC
.!
.! RUNOFF/VARIANT=HELP/OUTPUT=DECUS:[SYSMON]SYSMON.HLP DECUS:[SYSMON]SYSMON.RND 
.!					! to produce the help file 
.!					! DECUS:[SYSMON]SYSMON.HLP
.!
.! LIB/REPLACE DECUS:[SYSMON]SYSMON.HLB DECUS:[SYSMON]SYSMON.HLP
.!					! to replace the data in the HELP
.!					! library.
.!
.if help
.nopaging
.rm 72
.lm 2
.i -2;1 SYSMON
.else help
.c;SYSMON
.c;A SYSTEM MONITOR
.endif help 
.p
This is an ICP developed SYStem MONitor utility program which can be used to
monitor changes in processes on the computer system.  The information
presented will define the alternatives available for SYSMON.
.P
It may be used on any VT-100 or compatible terminal, a LA-120 or compatible
printer terminal, or its output may be written to a file.  It produces output
lines that are up to 132 characters long.  When used on a CRT which is in 80
character mode, it will set it to 132 character mode for its output and reset
it to 80 character mode on exiting.  For other devices, it will write its
output as if it were a 132 characters per line hard copy device. 
.ifnot help
.hl INITIAL SETUP
.p
SYSMON is executed as a foreign command.  A symbol should be defined to
execute SYSMON as follows:
.b
SYSMON :== $DECUS:[SYSMON]SYSMON
.hl QUALIFIERS 
.endif help
.p
Several qualifiers allow selection of processes to be shown.  When multiple
selection qualifiers are used, a process must meet the requirements shown for
each qualifier in order to appear.
.p
Other qualifiers control the timing of the display and the selection of an
output device or file.
.if help
.p
To use this Help feature, simply respond with the desired topic or subtopic at
the prompts.  To re-display the menu of (sub) topics press the <?> key.
.p
To Exit press a series of <RETURN>s.
.else help

.endif help
.if help
.b;.i -2;2 /MODE
.b
.else help
.hl +1 /MODE
.endif help 
/MODE=(INTERACTIVE,BATCH,NETWORK,OTHER)
.b
/MODE=ALL	(default)
.p
This allows the user to select processes based on their modes.  The two
qualifier
strings shown above are equivalent.  Any subset of the four modes (INTERACTIVE,
BATCH, NETWORK, or OTHER) may be specified.
.if help
.b;.i -2;2 /USER
.b
.else help
.hl /USER
.endif help 
/USER=XX...X
.b
/USER=(FRED,CHARLIE,JANE)
.p
This allows the user to select process based on their usernames.  Up to ten
usernames may be specified.  The program compares the characters
given with the same number of characters of the username for the process.  Thus
for the example shown, any process by the user JANET would also be shown.
The default is that the selection does not occur and processes for all users
are shown.
.if help
.b;.i -2;2 /PROCESS
.b
.else help
.hl /PROCESS
.endif help 
/PROCESS=XX...X
.b
/PROCESS=(JOB_CONTROL,ACCOUNTING_001,JANET,SYMB)
.p
This allows the user to select processes based on their processnames.  Up to ten
processnames may be specified.  The program compares the characters
given with the same number of characters of the processname for the process.
Thus for the example shown, all print SYMBIONT process would be shown.
The default is that the selection does not occur and all processes 
are shown.
.b
/NOPROCESS
.p
This allows the user to suppress all process displays and therefore display
only the system related data including the /DLB data if requested.  Since it
prevents the display of any processes, it is mutually exclusive
of the /MODE, /USER, and /ID qualifiers.
.if help
.b;.i -2;2 /ID
.b
.else help
.hl /ID 
.endif help 
/ID=PID
.b
/ID=(PID1,PID2...PIDn)
.p
This allows the user to select processes based on their process identification
numbers (PIDs).  Up to ten PIDs may be specified.  Since process
identification numbers are unique for a given boot of the computer system
and are neither predictable nor repeatable for a new process being created,
SYSMON will determine which processes exist as it checks the existing processes.
If any process PIDs are or become unused, the system will delete those from its
list.  Should that list become empty it will prompt for further instructions.
.p
This qualifer, since it identifies specific processes, is mutually exclusive
of the /MODE, /USER, and /PROCESS qualifiers.
.if help
.b;.i -2;2 /SELECT
.b
.else help
.hl /SELECT
.endif help 
/SELECT=XX...X
.b
/SELECT=(FAULTS,GCNT,PCNT,MEMORY,BUFIO,DIRIO)
.p
This allows the user to control the selection reasons for updating the display
for processes.  The user may list any set of the following reasons:
.ls
.dle "",ll,"."
.le;FAULTS - A change in the number of FAULTS for a process is detected, and/or
.le;GCNT - A change in the Global page CouNT for a process is detected, and/or
.le;PCNT - A change in the Page CouNT for a process is detected, and/or
.le;MEMORY - A change in the sum of Page CouNT and Global Page CouNT for a
process is detected, and/or
.le;BUFIO - A change in the BUFfered IO CouNT for a process is detected,
and/or
.le;DIRIO - A change in the DIRect IO CouNT for a process is detected.
.els 0
.b
/NOSELECT
.p
This allows the user to suppress the selection reasons for updating the display.
No process changes are required for an update of the display for a process to
occur.  Since it causes all processes meeting the other qualifer requirements
to appear on each update, it is mutually exclusive of the /NOPROCESS qualifier
which prevents the display of process data.
.if help
.b;.i -2;2 /INTERVAL
.b
.else help
.hl /INTERVAL
.endif help 
/INTERVAL=n
.p
This allows the user to specify the period (in seconds) between successive
displays.  If /INTERVAL is 0 or not present, then the system will produce a
single display and then display the SYSMON> prompt.  Pressing the <RETURN> key
at that prompt will produce an updated display.  (i.e., When no interval is
specified SYSMON will produce an updated display on demand.)#  Typing "exit", or
Ctrl/Z will cause the program to terminate.  Typing Ctrl/Y, or Ctrl/C will
interupt the program.   A new command string may also be entered after the
SYSMON> prompt as is the case for DEC's MONITOR after a CTRL/C.
.if help
.b;.i -2;2 /BEGINNING
.b
.else help
.hl /BEGINNING
.endif help
/BEGINNING=delta time
.p
This allows the user to schedule the starting of the display or recording
process for a predetermined time.  If specified, SYSMON will hibernate until the
specified time.
.if help
.b;.i -2;2 /ENDING
.b
.else help
.hl /ENDING
.endif help 
/ENDING=delta time
.p
This allows the user to schedule a stopping time for SYSMON.  If specified,
then SYSMON will exit after the specified time passes.  If /ENDING is specified
and /INTERVAL is omitted, then /INTERVAL=60 is implied.
.if help
.b;.i -2;2 /OUTPUT
.b
.else help
.hl OUTPUT
.endif help
/OUTPUT=FILEname or device
.b
/OUTPUT=SYS$OUTPUT 	(default)
.p
This allows the user to define an output device or file for SYSMON results.  All
display output will be directed to that file or device.  If omitted, then
SYS$OUTPUT is implied.  This qualifier may be useful in creating a file of
process activities for later review.   
.if help
.b;.i -2;2 /OLD
.b
.else help
.hl /OLD
.endif help 
/OLD (default)
.b
/NOOLD
.p
This allows the user to tell SYSMON that it should not report on the OLD state
of the processes when it updates its display.  Once this qualifier is set, it
remains as set until explicitly changed or the image exits.  
.if help
.b;.i -2;2 /DLB
.b
.else help
.hl /DLB
.endif help 
/DLB
.b
/NODLB (default)
.p
This allows the user to tell SYSMON to show two lines of information related to
the activies of the Touch Technologies, Inc_. Dynamic Load Balancer (DLB).  The
first line shows the system dynamic parameters which DLB may change.  The second
shows the translation the DLB__STATUS__INFO system logical name which DLB uses
to record and report its activity.
.p
If the system does not have DLB then those system dynamic parameters are
reported.  If the DLB__STATUS__INFO system logical name does not exist, then no 
output line is produced.  If it does, then its translation is displayed.
.p
Once set this remains as set until explicitly changed or the image exits.  
.if help
.b;.i -2;2 Examples
.b
.else help
.hl Examples 
.endif help 
SYSMON
.p
Run SYSMON to display the processes on the system.  This will produce a 
single listing of the processes and a SYSMON> prompt.  At the prompt
the user may press <RETURN> to produce a new display, provide a new or revised
set of qualifiers (with or without the SYSMON verb) to produce a new display,
type "EXIT" or CTRL/Z to exit, or press CTRL/Y to interupt.
.b
SYSMON/DLB/OUTPUT=USERDISK:SYSMON.OUTPUT/BEGINNING=00:30/ENDING=01:00
.p
Run SYSMON with its output written to the SYSMON.OUTPUT file, including the
two lines of information on DLB, beginning
in thirty minutes from the execution of the command and ending one hour
from the execution of the command.  Since an ENDING time is specified without
an INTERVAL, the interval period is sixty seconds.
.b
SYSMON/ID=(AF,135A,E44B)/INTERVAL=120
.p
Run SYSMON showing only the processes listed with a wait of 120 seconds between
displays.
.b
SYSMON/MODE=(INTERACTIVE,BATCH)
.p
Run SYSMON showing only INTERACTIVE and BATCH processes.  As in the first
example this will produce a single listing of the processes and a
SYSMON> prompt.
.b
SYSMON/USER=(BILL,SAM,SHERRIE)
.p
Run SYSMON showing only processes owned by the given usernames.  Since the
comparison is only for the number of characters given any processes owned by
SAMANTHA whould also be shown.  As in the first
example this will produce a single listing of the processes and a
SYSMON> prompt.
.b
SYSMON/PROCESS=(ACCOUNTING,ENGINEERING)
.p
Run SYSMON showing all processes whose process names begin with either
"ACCOUNTING" or "ENGINEERING".  Since the comparison is only for the number of
characters given, a process such as ACCOUNTING_001 would also be shown.
As in the first example this will produce a single listing of the processes and 
a SYSMON> prompt.
.b
SYSMON/DLB/NOPROCESS/INTERVAL=30
.p
Run SYSMON including the two lines of information on DLB, updating the output
every 30 seconds.  No process details are shown.
.if help
.b;.i -2;1 SPAWN
.b
.else help
.tp 8
.hl -1 SPAWN
.endif help
SPAWN
.p
This allows the user to tell SYSMON to SPAWN another process.  A command with
qualifiers and parameters may be specified following the SPAWN verb.
.if help
.b;.i -2;1 HELP
.b
.else help
.tp 8
.hl HELP
.endif help
HELP
.p
This allows the user to see 
.if help
this
.else help
the
.endif help
help information for SYSMON.
.if help
Text for this help file and instructions for creating it is found in
in SYSMON.RND.
.else help
.p
The help file is created from SYSMON.RND by the steps shown below:
.b
.nofill
$ SET DEFAULT DECUS:[SYSMON]		! or wherever it may be in your system. 
$
$ RUNOFF/VARIANT=HELP/OUTPUT=DECUS:[SYSMON]SYSMON.HLP DECUS:[SYSMON]SYSMON.RND 
$					! to produce DECUS:[SYSMON]SYSMON.HLP
$
$ LIB/REPLACE DECUS:[SYSMON]SYSMON.HLB DECUS:[SYSMON]SYSMON.HLP
$					! to replace the data in the HELP
$					! library.
$
.p
The document file is created from SYSMON.RND by the steps shown below:
.b
$ SET DEFAULT DECUS:[SYSMON]		! or wherever it may be in your system. 
$
$ RUNOFF DECUS:[SYSMON]SYSMON.RND	! to produce DECUS:[SYSMON]SYSMON.DOC
.fill
.hl HINTS
.p
SYSMON uses a 132 column screen for its display.  If the terminal is not
already in 132 column mode SYSMON will set it.  On exiting, if the terminal
was initially not in 132 column mode, SYSMON will reset the terminal to 80
column mode.  For the teminals used here, this causes the data to disappear.
.hl MAINTENANCE
.p
The program consists of a command language definition, SYSMON_CLD.CLD, a 
FORTRAN main program, SYSMON.FOR, and several FORTRAN subroutines.
GETSYSINFO.FOR uses the system table SYS.STB to extract data about the system.
GETSYSINFO uses the function IPEEK4 with entry points IPEEK4, IPEEK2, and
IPEEK1 to get longward, word and byte data respectively.
.p
A linking procedure, SYSMON.COM is also provided.
.hl +1 SYSMON_CLD.CLD
.p
Should the user wish to change the command language definition, it may be done
in any of the text editors.  The revised definition should then be "compiled"
with the command
.b
SET COMMAND/OBJECT SYSMON_CLD
.b
to create the SYSMON_CLD.OBJ file.
.b2
SYSMON.RND
.endif help
