DMT, Peek, PeekSum




This  documentation  describes  the  operation  of  three  related Alto
Subsystems: DMT, the  Memory/Control Ram diagnostic; Peek,  the program
to  which DMT  reports  its findings;  and PeekSum,  the  program which
summarizes the reports collected by Peek.



1. Creating a Peek Disk


You should devote a  separate disk to Peek.   Boot files can take  up a
lot of space and the Peek  report file can get quite large over  a long
holiday weekend if your network has many hosts.  To avoid coming  in on
Monday and discovering your Peeker in Swat out of disk space, clean the
disk out regularly.  Peek automatically keeps its network directory and
boot files up-to-date, so building a new peek disk amounts  to building
an bare disk (OS, Exec, Ftp, Empress, perhaps Bravo), getting  Peek and
PeekSum and just running it: it does the rest.  I have written a canned
procedure for building a Peek disk from scratch:

     1) Boot an OS from the  net and respond 'Yes' when it asks  if you
        want the long  installation dialog, and  'Yes' when it  asks if
        you want to ERASE the disk.

     2)    When     the    erase    procedure     finishes,    retrieve
        [Maxc]<Alto>PeekDisk.cm and invoke it by typing to the Exec:
                >@PeekDisk.cm@

     3)  When the  smoke  clears, install  your printer's  name  in the
        [HardCopy]  section of  user.cm and  re-install Bravo.   If you
        aren't on  the west  coast, change the  ZONE parameter  (e.g to
        +5:00 if you are on the east coast).



2. History


Chuck Thacker made DMT (early 1973) by combining many small diagnostics
which he  had developed  to stress main  memory using  certain emulator
instructions.  There were originally two versions: PMT  (Printer Memory
Test) which logged statistics  on the Diablo printer; and  DMT (Display
Memory Test) which  used the display.   Later (late 1973),  an Ethernet
driver  was added  to DMT,  Bob Metcalfe  wrote Peek,  and  Chuck wrote
PeekSum.  At  this point, development  and maintenance of  PMT stopped.
Still later (mid  1975), David Boggs added  a Control Ram test  to DMT,
rewrote the Ethernet driver and took over maintenance.  Nate Tobol, who
designed the Alto II memory system, wrote the Alto II memory  test (mid
1976) which was merged into DMT.  David rewrote Peek and took  over its
maintenance.   Doug   Clark  extended  PeekSum,   and  took   over  its
maintenance (early 1977).


                             ------------
                   Copyright Xerox Corporation 1979


DMT, Peek, PeekSum         February 12, 1979                          2




3. DMT


DMT is written in the Alto BCPL-compatible variant of  machine language
and  is  distributed  as   a  type-B  boot  file  (see   the  BuildBoot
documentation for more details).

When  DMT is  running, the  Alto screen  is black  with a  white cursor
changing position once each time through the main loop.  For Alto I the
cursor flips at random intervals;  for Alto II the interval is  about 1
second.  On Alto IIs with extended memory, the cursor contains a number
between 0  and 3 indicating  which bank it  is currently  testing.  DMT
contains  a  TeleSwat  server.   The  key  combination  <Control><Left-
Shift><Swat> causes DMT to stop and enter the debugger.


3.1. Statistics

If the  'S' key  is depressed, DMT  will display  (and transmit  on the
Ethernet)  the  statistics  it  has  accumulated.   The  display  looks
something like this:

DMT of 25 Dec 78, Alto II XM 241. 456 blocks, testing 17341 to 176777
    0 bad main memory chips
    0 bad control memory chips

If  there are  errors, a  line describing  each type  of error  will be
displayed, and  then, if  the errors  can be  resolved to  a particular
chip, the  Card, Row  and Column  (for Alto  I), or  the Card  and Chip
number (for Alto II) will  be displayed.  This display will stay  up as
long  as the  "S" key  is depressed.   Periodically the  statistics are
automatically  broadcast  on the  Ethernet  and appear  briefly  on the
screen.


3.2. Booting in Response to Packets

If DMT receives  a request-for-connection (RFC)  Pup and DP0  is ready,
then it  boots the  Operating system and  passes it  a message  of type
eventRFC.  If the Executive section of user.cm contains an entry of the
form:

                      eventRFC: <arbitrary command line>

then the executive will consume the event and execute the command line.
<< If DMT receives an EFTP  data packet with sequence number 0  and DP0
is  ready  then  it boots  the  OS  and passes  it  a  message  of type
eventEFTP.   This is  included  so that  printers (which  use  the EFTP
protocol)  can  drop   into  DMT  when   nobody  is  using   them,  and
automatically wake up when someone wants to print.  >> If  DMT receives
a  Kiss-of-Death Pup  for socket  4 (miscellaneous  services),  then it
EtherBoots the file whose ID is contained in the low 16 bits of the Pup
ID.



4. Peek


DMT, Peek, PeekSum         February 12, 1979                          3




Peek opens several windows on the display.  The top window is  for user
commands.  There is currently only one: Quit.  The next window displays
the release date of the program, a digital clock, the  Pup internetwork
address of the machine, and the number of free pages on the  disk.  The
next window is  opened by the Peek  Server and displays DMT  reports as
they arrive.

Peek  loads special  Ethernet  microcode so  that it  can  receive Peek
reports directed to  host 376b as well  as conduct business  as itself.
If it can't load the ram, it runs the Ether interface promiscuously and
filter packets in software.   More diagnostic reports will be  lost and
booting may be slower, but things should still work.

Peek has a lot  of options, and reads User.cm  to find out what  to do.
An example  of the Peek  slice of  a User.cm file  is given  below.  In
addition, it contains a host of network servers:


4.1. Peek Server

If there is a line of the form "Peek <filename>" in User.cm,  Peek will
start up a Peeking process  which will listen for raw Ether  packets of
type PeekReport and write  them on <filename>.  The filename  should be
'Peek.reports' since PeekSum, described below, assumes this (I was just
feeling general the day I wrote that code).


4.2. Event Report Server

Peek implements the  Pup Event Report protocol.   For each line  of the
form "ERP  <number> <filename>"  in User.cm,  Peek will  instantiate an
event report  process which  will listen on  socket <number>  and write
event reports on <filename>.  The default address which the OS  uses is
Maxc, so I don't expect many people will use this, however it  might be
helpful for an Alto site that isn't connected to the Parc Internet.


4.3. Pup Echo Server

Peek contains a Pup Echo server running continuously in the background.
PupTest and GateControl contain Echo users with which you can poke it.


4.4. Raw Ether Echo Server

Peek  also contains  a  raw Ethernet  Echo  server.  This  is  the echo
protocol used by EDP and NEDP, the diagnostic programs for the Alto and
Nova Ethernet interfaces.


4.5. Boot Server

Peek implements the protocols necessary to be an Alto boot file server.
For each line of the  form "Boot <number> <filename>" in  User.cm, Peek
will  send  <filename>  when it  receives  a  Mayday  packet requesting
bootfile <number>.  If the file isn't on the disk, or if Peek discovers
a neighboring Boot server with  a later version, your Peek  will aquire
it.  The more boot files you tell Peek to keep, the less space there is
for Peek reports.


DMT, Peek, PeekSum         February 12, 1979                          4




4.6. Name Server

PeekSum consults the file 'Pup-Network.Directory' to get the  owner and
location of Altos.  Peek contains a name lookup server and  in addition
to answering lookup requests, keeps its copy of the directory current.


4.7. Time Server

Peek also  has a  time server.  Alto  time is  based on  Greenwich Mean
Time, and local users must know their local time zone and the beginning
and ending  days of  Daylight Savings  Time to  convert to  local time.
Time servers  are the source  of this information,  so it  is important
that the  time parameters  in User.cm be  correct.  "Zone  +8:00" means
that the peek disk is 8  hours west of Greenwich -- in the  USA Pacific
Time zone.  The standard User.cm contains this, so you must edit  it if
you live elsewhere.   The Daylight Savings  Time parameters are  set by
the line "DST 121,305", and only change when Congress messes with time.
Keep an eye on your local CongressPerson.


4.8. User.cm Example

Below  is an  example of  the Peek  part of  a User.cm  file.   In this
example DMT  statistics go  to the  file 'Peek.reports',  Event reports
addressed to socket 30 (swat error reports) go to the  file 'Swat.ERP',
and  some  maintenance-type  boot files  are  available  for diagnosing
Altos.  Notice that all  characters between a semicolon and  a carriage
return are considered to be  comments and ignored by Peek (this  is not
true for all programs that use User.cm).

[EXECUTIVE]
 ...executive stuff...

[PEEK]
; Syntax:
; Boot <boot file number> <filename>
; ERP <socket number> <filename>
; Peek <filename>
; Correction <seconds per day> (decimal) [positive makes clock go faste
; DST <beginning day> <ending day> (decimal)
; Probe <hours> (decimal)
; Zone <sign><hours>:<minutes> (decimal, plus is west of Greenwich)

Peek Peek.reports       ; for PeekSum.run

ERP 30 Swat.erp         ; Swat Error reports

Zone +8:00              ; USA Pacific Time Zone
DST 121,305             ; DST begins on day 121 and ends on day 305

Boot 0 DMT.boot
Boot 5 CRTTest.Boot
Boot 6 MadTest.Boot
Boot 10 NetExec.boot
Boot 11 PupTest.boot
Boot 12 EtherWatch.Boot
Boot 13 KeyTest.boot
Boot 15 DiEx.Boot
Boot 17 EDP.Boot


DMT, Peek, PeekSum         February 12, 1979                          5




Boot 20 BFSTest.Boot

[BRAVO]
 ...bravo stuff...

Peek writes the contents of User.cm into the Command window as it reads
through the file.  If the file has bad syntax, Peek will call Swat with
a description  of its complaint  (e.g. "[ReadNumber] -  number contains
illegal characters"  if it  is expecting a  number and  reads something
other than 0-7).   Typing <ctl>-U will  restore the user  display.  The
last item in the Command window is what Peek is having trouble with.

The source code for  most of the servers  in Peek is borrowed  from the
gateway program, and so there are some more specialized  commands which
you  can ignore  and which  default to  reasonable actions.   I mention
there here for completeness.   "Correction +20" means the  Alto's clock
looses  20 seconds  per  day, and  the  time server  should  correct by
gaining 1 second  at 20 equally spaced  times during a day.   "Probe 1"
means attempt to  locate newer versions of  boot files and  the network
directory once an hour.



5. PeekSum


PeekSum  reads  the  file  "Peek.Reports"  (the  output  of  Peek)  and
constructs a summary of the errors reported by DMT (see above) for each
Alto.  PeekSum writes on the file 'PeekSummary.Tx' a tabulation  of the
error  reports,  together  with  the  owner's  name  and  the machine's
location,    retrieved   (if    possible)   from    the    file   "Pup-
Network.Directory", which is maintained by Peek, as described above.

As Peek is started and stopped, it writes short messages to this effect
on  Peek.Reports; these  messages are  reproduced at  the  beginning of
PeekSummary.Tx.  The number of  the local network is also  written.  If
Peek.Reports contains  multiple reports  from a  single Alto  (which is
usually the case), PeekSum will record the largest number of  errors of
each type, over all such reports.

PeekSum will complain and  then gracefully stop execution if  the files
Peek.Reports or PeekSummary.Tx are unopenable for some reason.  If Pup-
Network.Directory   is   unopenable   or   absent,   the   ouput   file
PeekSummary.Tx will not include names and locations of Altos,  but will
contain error reports grouped by Alto host number.

To run PeekSum, just type:

>PeekSum

and the  program will  go about  its business.   When it  has finished,
PeekSummary.Tx should be printed on your local printer.