Google
 

Trailing-Edge - PDP-10 Archives - BB-M836A-BM - tools/sysdpy/sysdpy.mem
There are 12 other files named sysdpy.mem in the archive. Click here to see a list.
	                  The SYSDPY Program	  


DESCRIPTION

	SYSDPY  shows the  status  of the  system.  The  status  is
continually  updated  on video terminals.  You can select a variety
of  displays  for  items such as  jobs,  forks,  JFN's, queues, and 
system  statistics.   You  can type  commands  while the program is
running to change the display parameters.


                                 NOTE
                    SYSDPY   is   an   unsupported
                    product.   However,  you   may
                    submit   SPRs   pertaining  to
                    the program. All SPRs received
                    will be  examined, but not all
                    will be answered.


MONITOR MODIFICATIONS BY SYSDPY

    	In order to collect much of the information which is shown,
SYSDPY  modifies the  monitor to implement a new JSYS.  SYSDPY does
this  using the  SNOOP JSYS when the first privileged user runs the
program.  (Later  runs of SYSDPY  do not need to SNOOP again.)  The
SNOOP code allocates about 554 octal words of  swappable  free core 
and  inserts  JSYS  717, called  MONRD%, into  the running monitor. 
MONRD%  is  active  as  long  as  the  monitor  is   running.   The 
functions of MONRD% are  discussed in the file SYSDPY.MAC, near the 
label .MONRD.
             

WARNINGS
	
       .The reliability of MONRD% requires that the correct version 
        of SYSDPY be used for a particular monitor. If the versions
	of  SYSDPY  and the  monitor do not match, (such as running 
        Release 4  SYSDPY  under  a  Release 3A monitor) either the
	system may crash or you may obtain incorrect results.

       .Since ENQ/DEQ storage and IPCF data also use swappable free
        core,  running  SYSDPY  may cause applications to fail when 
	they would not normally.   This occurs if the free space is
	almost full during normal use.   In this situation,  either
	you cannot run  SYSDPY  or you must  increase the amount of 
	swappable free core in the monitor.

       .MONRD%  is  only  guaranteed  to  work  as  it  is written. 
        If you modify it, you take chances with  the  stability  of  
        the monitor.

       .The conditional FTPRIV is usually on in  SYSDPY.MAC.   This
        means  that unprivileged users cannot use  MONRD%.   SYSDPY 
	still runs, but  it only  gives the information returned by 
	the normal JSYS's.  If FTPRIV is off,  any user  can obtain 
	much  of  the information once a  privileged  user  inserts 
	MONRD%.  (Do  this  only  if  you  are  not concerned about 
	security.   MONRD%  can  return  the  data  that  users are 
	reading or writing.)


SYSDPY COMMANDS

	SYSDPY  commands are  generally  in single or double letter
format.   You terminate all commands when you press the RETURN key.  
The editing characters ^U and DELETE perform their usual functions. 
SYSDPY does not  prompt for  commands,  and they do not echo as you 
type them.  Instead,  SYSDPY  continues to update  the  page  until 
you finish  the  command  line,  then  it  processes  the  command.   
You can type  more than one command on a line.   In doing this,  it
may be necessary to insert a space or a comma between the  commands
to remove ambiguities.  For example, the "S" command  means  scroll
the page.   The "T" command means show titles.   However,  the "ST"
command  means  show  the  structure  status.   The  "S T"  command
scrolls the page and shows titles.

	If you run  SYSDPY  by typing its name to the EXEC, you can 
type  commands after the name.   For example,  to  show the  status  
of the structures, type the following line to the EXEC:

	@SYSDPY ST   <RET>

        SYSDPY  can also read commands from your  SYSDPY.INI  file,
which contains a list of commands or options.  SYSDPY.INI is always
read from your logged in  directory on PS:.   The  following  is an 
example of a SYSDPY.INI file:

	:SYSDPY		NT  O  W5
	:A		GSYSDPY  CCONNECT-TIME/6  BJOBS/2

	The file contains two sets of commands,  SYSDPY and A.  The 
colon before each command identifies it as a  label.  Commands  can 
be several lines long, in which case SYSDPY treats carriage returns
as  spaces.  To process one of the options, type the  name  of  the 
option as the argument to the "G" command.  Thus, in  the  previous
example, the  command  "GA"  processes the commands  in the  SYSDPY 
option, adds a new column to the display, and changes the number of
blanks in the display.  Options can call each other only to a depth 
of 5.

	When the program starts, it processes the  SYSDPY option in
your  SYSDPY.INI file.   The SYSDPY option  is  also  processed  if 
you use a null name as an argument to the "G" command.   Thus,  you
can  set  your  own  special defaults for SYSDPY by putting them in
the SYSDPY option.  If the SYSDPY option exists in your  SYSDPY.INI
file and you then type commands when you start the program,  SYSDPY
processes the commands in the file first.

Whenever  SYSDPY  encounters  an  error  in  command  handling,  it 
notifies you with a bell and does not process further commands from
that command level.


THE HELP COMMAND

	There is a help command in SYSDPY, the  "H"  command, which
you can use at any time without losing your current display.   This
command  reads the file  HLP:SYSDPY.HLP  and displays  it  on  your
terminal.  The file lists all SYSDPY command formats.  You can also
type  the  "HC"  command.   This shows all possible columns in  the
various  displays.   (These  names  are  used  by  the  "B" and "C"
commands.)  To return to your previous display, type "NH".

CHANGING COLUMNS OF A DISPLAY

	Some  displays have many  possible columns  of data.   Your 
terminal screen may not be wide enough to show all possible columns
for a particular display.  Therefore,  commands exist to change the
columns  of a  display.   You can  use the  "C"  command to  change
columns around.  To insert a column at the end of a display (to the
right of the current columns), type the "C" command followed by the
name of the column, which you can abbreviate.  To insert  a  column
at any desired  location, type  the name  of the column followed by 
a  slash and the column number.  SYSDPY inserts that column at that
column number, moving the remaining columns to the right.  You  can
use  the  "NC"  command  to  remove a column  from a  display.  For
example, the command  "CPRIVILEGES/3" shows  the fork's  privileges
in the third column of  the fork display.   The  command  "NCSTATE"
removes the STATE column from the job display.

	Some columns can be very wide.  For example, user names can
be  39  characters long.  To fit several wide columns on the screen 
at the same time,  SYSDPY restricts the width of all columns except
the last one.   Consequently,  data in  a wide  column is sometimes
cut off.  In this case, move the column to  the end of  the display   
to view all of the data.


TYPES OF DATA IN DISPLAYS

	This section describes the columns of  data that  appear in 	
various displays.  The obvious columns are not discussed.

Job Display:

	Job - This is the job number.  SYSDPY always flags your own
	      job with an asterisk.

	Terminal - This  is the terminal controlling  the job.   If 
              the terminal is the CTY, the number is  flagged  with
	      an asterisk.  If the terminal is a PTY, you also  see 
              the letter "J" followed by the controlling job number.

	CPU Percentage - This is the total percentage of  CPU  time 
              the  job used  in the last minute.   SYSDPY  computes  
    	      the data about every 20 seconds.  The column is blank
  	      for  the  first  minute because it takes  SYSDPY that
	      amount of time to compute the first percentage.

	Idle Time - This is the number of minutes that the job run-
	      time remained  stable.   If a  plus sign  follows the 
              number, this specifies a lower bound;  SYSDPY was not
              running long enough to know the actual idle time.

File Display:	

	OFN - This is the system-wide handle on an open disk  file.
              Dashes appear if it is not a disk file.  If the  file 
              is long,  you see two numbers separated  by  a slash.
              The first number is the  OFN  of  the last referenced            
              512 page section of the file.   The  second number is 
              the OFN of the super index block.

	Fork - This is the system fork number that did the original
              GTJFN for this JFN.

        File Status - This indicates the mode of  the  file when it 
	      was opened and the current  status of  the file.  The            
              variables in this column are the following:

              Nopen	File is not open yet.
              Parse	The JFN is parse-only.
	      Rd	The file is open for read access.
              Wrt	The file is open for write access.
	      App	The file is open for append access.			
              Xct	The file is open for execute access.
              Res	The JFN is restricted.  No other forks can
                        use it.
              Eof       The file is at end-of-file.
              Err	An error occurred reading  or writing  the
                        file.
              Inv	The JFN is not  currently  valid because a
                        GTJFN or a GNJFN is looking for  the  next 
                        file to return.                              
                         
Fork Display:

	Fork - This is the  system-wide  fork number for this fork.

	Superior - This is the system-wide  fork number that is the
              immediate superior to this fork.

	Monitor PC - This is the  EXEC mode PC of the fork if it is
	      executing in  the monitor,  such  as in  a JSYS.  You 
              see dashes in this column if the fork is in user mode.

       Mapped Pages - This is a  list  of  what the  various  pages
	      belong to in the fork's  core image (section 0 only).
	      SYSDPY orders the list by size, so the first value is 
              the most common, the second is next most common, etc.   
              The values are:

	      P - Private pages owned by the fork itself.
	      Fn - Indirect mapping to pages in system fork n.
	      n - Shared or indirect mapping to the file whose
		  OFN is n.

	Scheduler Test - This is only  meaningful if the fork is in 
 	      some kind of wait.  The  right half is the address of
	      the monitor routine.   It determines if the fork will 
	      be unblocked.  The left  half is data for the routine
	      to check.  There are many  different scheduler tests.
	      Some of the most common ones are:

	      BLOCKM, BLOCKW	A sleep for about one minute.
	      BLOCKT		A longer sleep.
	      FORCTM		The fork halted due to an error.
	      FRZWT		The fork is frozen.
              HALTT		The fork halted itself.
              JRET		Wait until interrupted.
	      TCITST		Wait for terminal input.
	      TCOTST		Wait for available space in the
                                output buffer.
	      TTIBET		Wait for an empty input buffer.
	      TTOBET		Wait for an empty output buffer.
	      TRMTST		Wait for a particular fork to
                                terminate.
	      TRMTS1		Wait for any inferior fork to
                                terminate.
	      PIDWAT		Wait for an IPCF packet to arrive.
	      ENQTST		Wait for an available ENQ lock.
	      MTAWAT		Wait for IO to finish for a unit.

	Privileges - These are enabled  and possible privileges of
              the fork.  Privileges following a slash are possible
	      privileges which are not  enabled by the fork.   The
	      various privileges are:

	      W	  Wheel
	      O	  Operator
	      M	  Maintainance
              +	  Any privilege other than the above

	Last Call - This is the last  instruction  that called the
              monitor.  It  is  usually a  JSYS, but it could also
              be  a  UUO  for  PA1050 or  an  illegal instruction.  
              When an asterisk preceeds the instruction, the PC is
	      in EXEC mode and the JSYS is being processed.  If an
	      asterisk does not preceed the instruction, the  fork
              is running in user mode  and  the JSYS  was the last
              one done.  Only  JSYS's  done  from  user  mode will 
              appear.  (Nested JSYS's do not appear.)    

	Fork Flags - These give some status of the fork.  They can
	      be any of the following:

	      E        The fork is execute-only.
	      V	       The fork is virgin (newly-created by CFORK).
	      G	       The fork is doing an execute-only GET.

        Page Traps - This is the total  number of  page traps that
	      the fork caused since its creation.

	Page Trap PC - This is the PC of the last page trap.  This 
              can be either a  user mode  or  EXEC  mode  PC.   An 
	      asterisk flags EXEC mode.

	Runtime - This is the  runtime of the  fork to the nearest
              tenth  of  a  second.

	Working Set Size - This consists of two numbers  separated
              by a slash.  The  first  number is the  real working
	      set  size  determined by  the monitor.  This  is the
	      number  of pages the monitor allows you to use with-
	      out page  faulting.  Some of the pages may belong to
	      the  swappable  monitor.  The  second  number is the
	      number of pages existing in the  fork's  core image.
	      (Pages  mapped  indirectly  to  other  forks are not
	      included.)   The  ratio  of  these two numbers is an
              approximation of how much of  the program is in core
	      at one time.

	Interrupt Defer Count - This is  the word  which indicates
              whether  or not a  process can be  stopped or inter-
	      rupted.  The value is the number of reasons why this
	      fork  cannot  be  interrupted,  minus 1.  A negative
              value  allows  a  fork to  be stopped.  Non-negative
	      values do not allow stopping.

IPCF Display:

	Flags - These are status  flags for this PID.   The  flags 
	      can be any of the following:

	      Job	The PID is job-wide; it stays even when
			the fork that created it disappears.
              Res	The PID is restricted; no other fork
			in the job can reference it.

	Quotas - These  are the  send and  receive  quotas for the 
              PID.  They are always separated by a slash.

	Packets - This is the number of IPCF packets waiting to be
	      read for this PID.

	Name - This  is  the  name  of  the  PID that was obtained  
              from <SYSTEM>INFO.

Structure Display:

	Structure - This is the name of the mounted structure.  It 
	      is usually the same name as the alias.

	Alias - This  is the real  name of the structure specified
	      in the HOME blocks.

	Units - These are two  numbers separated  by a slash.  The 
	      first  number  specifies  the  pack's  logical  unit 
	      number in a structure.   The second number specifies 
	      how many packs are in the structure.

	Swapping - This is the number of swapping  pages the  disk
              has.
 
	Status - This  is information  on the  status of the unit.  
              It is a combination of the following:

	      Mount	The structure is mounted.
	      Diag      The structure is being used by diagnostics.
              Offline	The drive is not accessible by the monitor.
	      Free	The drive is on-line; a pack is in the 
			drive but it is not mounted.
	      Err	Errors occurred while reading the pack.
	      BadBAT	The BAT blocks on the pack are incorrect.
	      BadHOM	The HOME blocks on the pack are incorrect.
	      Wrtlck	The structure is write-locked.

	Errors (Read, Write, and Seek) - These specify the  number  
              of various hard  and  soft errors  the unit has had.  
              Soft errors  are  in  the left column and preceeding  
	      the letter "S".  Hard errors are in the right column
	      preceeding  the letter "H".   Dashes  indicate  that 
	      there are no errors.

ENQ Display:

	Lock Number - This  is used  to  match  the locks with the
	      queues.  The  queues  belong  to  the  lock with the 
	      matching number.

	Type - This  is  the  type  of lock.   It  is  one  of the 
              following:

	      ENQ Jobs	  Lock  is  obtained  by any  job with ENQ 
                          privileges.
              WHEEL Jobs  Lock is obtained by any  job with  WHEEL
                          privileges.
              OFN n	  Lock  is  obtained  by  a  job using the 
                          specified file.
	      Job n	  Lock is obtained by any fork in the job.

	Resources - These are  two  numbers  separated by a slash.  
              The first number specifies how  many  resources  are
	      available for the lock.  The second number specifies
	      the  total  number  of  resources in the pool.  This 
	      second value also specifies the group number associ-
	      ated with this lock.

	Lock Time - This  is  the  time  of day when this lock was 
              last given to a fork.

	Lock Code - This is either the  ASCIZ string for this lock
	      or an octal number following a hash mark.

	ENQ Flags - This is the status of this queue block.  It is
              one of the following:

	      Owner	The lock is owned by this queue block.
	      Blocked	The fork is waiting for the lock.

Terminal Display:

	Input Count - This  is  the  number  of  characters in the 
              input buffer.

	Output Count - This is the  number  of  characters  in the 
              output buffer.

	Job - This is the job that owns the terminal.  It  is  one 
              of the following:

	      n		Job n has the terminal assigned or opened.
	      --	The terminal is not in use.
              Ass	A new job number is  being created  on the
                        terminal.

	Flags - This is the status of the terminal.   It is one of
              the following:

              Prm	The terminal data block is always  alloca-
                        ted.
	      Sht	The terminal block is short.
	      Msg	The terminal block sends system messages.
	      Sndal	A send-all is in progress.
	      Pag	The terminal is paged.
	      Out	Characters are being sent to the terminal.
	      In	A fork is in an input wait.
	      Rmt	The line is remote.
	      Car	Carrier is on.
	      Auto	The line is auto-baud.
	      Cty	The line is the CTY.
	      Pty	The line is a PTY.

DECNET Display:

	Fork - This  is  the  fork which owns  this logical  link.  
	       Dashes appear if	the  link  is no longer associated
               with a fork.

	Byte Count - This specifies  how many  bytes of data exist 
               in the current segment being filled.

	Counts (Input and Output) - These are the  segment numbers 
               for the link.  They are not related to any particu-
	       lar amount of data; they increase as data transfers
	       are done and wrap around after 7777 is reached.

	Type - This specifies the type of link.  The  byte size of 
	       the link appears in parentheses.  The  link type is 
               one of the following:

	       DCN      This is the active  half of a  link making
                        connections.
	       SRV	This is the passive half of a line waiting
                        for a connection.
	       INT	This is an internal monitor link.

	Flow Status - This  gives the  restraints  on  the flow of
	       data  across  the  link.  It  can  be  one  of  the 
               following:

	       None	 No flow control exists for the link.
	       Seg: n	 A  maximum  of  n more  segments  can  be
                         transmitted.
	       Msg: n	 A  maximum  of  n more  messages  can  be
                         transmitted.

	       In addition, the information above can be preceeded 
               by the following status bits:

	       T	Transmission back-pressure exists.
	       R	Receive back-pressure exists.