Google
 

Trailing-Edge - PDP-10 Archives - custsupcuspmar86_bb-x130b-sb - sct014.doc
There are 6 other files named sct014.doc in the archive. Click here to see a list.


SCT014.DOC -- Version 014
March 1979






























COPYRIGHT (C) 1973,1978,1979 BY
DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.


THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE
INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER
COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
TRANSFERRED.

THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE
AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT
CORPORATION.

DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS
SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
SCT014.DOC                                                      Page 2


1.0  SUMMARY

The new version of  "SCRIPT"  allows  the  user  to  watch  or  gather
response  times  for  only the selected interesting lines in a script.
In order to make the response file more useful, the line in the script
is  printed  before its response information and the CPU time required
to execute the line is also given along with the response  time.   The
new  version  also allows the user to run a script periodically over a
large period of time  without  requiring  attention.   The  watch  and
response  files  are automaticlly saved from system crashes.  "SCRIPT"
now  uses  HIBER  UUO  instead  of  SLEEP  in  order  to  get   better
measurements.  An option to lock "SCRIPT" in core is also included for
the same reason.  A generalized way of including altmodes and  control
characters  in  a  script  has  been  intorduced.   The new version is
completely compatible with the old version and will run  all  existing
batch   programs   using   "SCRIPT"   (e.g.    MONTST)   without   any
modifications.

"SCRIPT" version 014 will run on all supported monitors.  It has  been
tested  under  5.06A  and  5.06B,  and  fully  supersedes all previous
versions.  There are no known deficiencies.


1.1  Bibliography

Specifications for "SCRIPT" in the software notebook #8.
SCRIPT.DOC  EXTERNAL CHANGES                                    Page 3


2.0  EXTERNAL CHANGES

Throughout this document ' "SCRIPT" ' always refers to the  SCRIPT.MAC
program  and ' script ' always refers to the file executed by "SCRIPT"
like TECMAC.SCP etc.

The external changes can  best  be  explained  by  going  through  the
question answer dialogue required by the new version of "SCRIPT".  The
new questions are marked by an *.  Conforming with  the  standard  DEC
conventions, the choice of answers will be given in brackets after the
question.  In all questions except the "yes, no" type  questions,  the
value in the script supplied by the proper ! command will be used as a
default if CARRIAGE-RETURN> is entered as an answer.  However, if that
particular value is not specified in the script, then the value in the
brackets after the question will  be  used  as  a  default.   For  the
"yes,no"  type  questions  ,  the  default after a CARRIAGE-RETURN> is
always "no".

Q1.  How many jobs to be run (1):

Enter any integer between 1 and 14 (inclusive).  The default  after  a
CARRIAGE-RETURN> is 1 job.

Q2.  Watch how many jobs (All):

Enter a number between 0 and # of jobs to  be  run  (inclusive).   The
default  after  a  CARRIAGE-RETURN>  is  all  jobs.   If 0 is entered,
watching is inhibited.

Q3.  Where (DSK:  SCRIPT.WCH):

Enter TTY:  for quick output on TTY for debugging  the  scripts.   The
fields  not  supplied  by  the user are defaulted to DSK:  for device,
"SCRIPT" for name and WCH for extension.

*Q4.  Watch each line of SCRIPT (N,Y):

If "Y" is entered all the lines in the script are  watched.   This  is
usually not required but still in the earlier version of "SCRIPT" each
line used to be watched.  If "N" is entered, watching is  switched  on
only  after an !W is seen in the script.  An !D in the script switches
off watching.  This allows the user  to  watch  only  the  interesting
lines  by enclosing them in a !W, !D pair.  Any number of !W, !D pairs
can be used in a script.  If the answer to Q2 is  0,  !W  and  !D  are
ignored.

Example:  The following can be a part of a script.

!W

SY J

!D

....
SCRIPT.DOC  EXTERNAL CHANGES                                    Page 4


!W

Get Foo

ST

!D

*Q5.  Response time for how many jobs (All):

Enter a number between 0 and # of jobs to  be  run  (inclusive).   The
default  after  a  CARRIAGE-RETURN>  is  all  jobs.   If 0 is entered,
response time is not gathered.

*Q6.  Response time for each line (N,Y):

If "Y" is entered, another question "Are  you  sure  (N,Y):   will  be
asked.  This is necessary since it is not expected that the user needs
response  time  measurements  for  each  of  the  script  lines.   The
TECMAC.SCP  script  for  example, contains about 100 lines whereas the
number of interesting lines is about 10.  So by entering "N"  to  this
question  and enclosing the interesting lines between !P, !E pair, the
volume of the output can be greatly reduced.  By using  !P,  !E  pairs
the  interesting  lines  need not have to be searched among 100 lines.
Similar to the !W command, an !P command switches on the response time
gathering  mode.  It stays on until a !E command is encountered in the
script.  Any number of !P, !E pairs can be used in a script.   If  the
answer to Q5 is 0, !P and !E are ignored.

Note that this response file is always written out on DSK:  SCRIPT.RSP
as against the watch file which can be specified by the user.

Example:

R BLISI0
!P
Foo,_Foo
!E

The above part of the script measures the cpu and real  time  required
for a compilation of file Foo.BLI

Q7.  Lock in core (N,Y):

Enter Y if locking privileges are available to the user.

Q8.  Repeat Count (1):

Enter a number.  The script will be executed that many times one after
another,   without   sleeping   in   between.   The  default  after  a
CARRIAGE-RETURN> is 1 but this can be over-ridden by a !T  command  in
the script.

Q9.  Delay Factor (1):
SCRIPT.DOC  EXTERNAL CHANGES                                    Page 5


Enter a number.  All delays will be multiplied by this number.   If  0
is  entered,  delays  are  ignored.   A CARRIAGE-RETURN> defaults to a
delay factor of 1.

Q10.  Stagger Time (20 (sec)):

If  0  is  entered,  all  jobs   are   started   simultaneously.    If
CARRIAGE-RETURN> is entered, stagger time of 20 seconds is used but it
can be overriden by an !S command in the script.

Q11. See comments to operator (N,Y):

Enter Y or N.

Q12. Debug (N,Y):

Enter Y or N

Q13. Watch for Errors (N,Y):

Enter Y or N.

*Q14. Cyclic Mode (N,Y):

If N is entered, the  "SCRIPT"  starts  immediately  and  exits  after
completing  the specified number of executions of the script.  If Y is
entered, the script gets executed repeatedly with a  period  of  sleep
(e.g.   10 minutes) in between two executions.  This is useful if some
program is to be run at different  system  loads  over  a  day.   That
program  can  be  included  in  a  script  and then can be run every n
minutes without user's attention.

*Q15. Cycle interval in minutes (10):

Enter a number.  If non-null, the day will  be  time  marked  starting
00:00 with an interval of the number.

For example, if 20 is entered, the day will be time-marked  at  00:00,
00:20,  00:40, 01:00....etc.  A new cycle of script is started only on
a time mark.  This is useful for consistancy independent of the amount
of  time taken to execute the script.  If in the above example a cycle
of script ends at 03:15, then the next cycle will be begun on 03:20.

*Q16. Cycle Count (10):

Enter a number.  The script will be  exeucted  that  many  times  with
intervals of sleep in between.

*Q17. Start run on the first time mark (N,Y):

If Y is entered, the script will be bugun at the first time  mark  and
if  N is entered , the script will be begun immediately.  In the above
example, if the current time is 03:17 then a Y answer to this question
will start the script at 03:20.
SCRIPT.DOC  EXTERNAL CHANGES                                    Page 6


Putting special and control characters in a script is now easier.   To
specify  an  altmode  in a script type UP-ARROW>dollar-sign> i.e.  ^$.
Similarly all control characters are  specified  by  typing  UP-ARROW>
CONTROL-CHARACTER>.  The CR>LF> at the end of a line containing ^C, ^U
will not be sent over the PTY.  For all other control  characters  the
CR>LF>  at  the  end of the line will be sent.  In the new version the
control characters can be put anywhere in a line as  against  only  at
the  beginning  of a line in the earlier version.  In order to specify
the actual up-arrow character, use UP-ARROW>up-arrow>.  Watch out  for
scripts  using UP-ARROW> for exponentiation as in BASIC.  In fact care
must be taken while introducing any of the following characters  in  a
script --- #, !, ^ .

The response file now contains the line  for  which  the  response  is
gathered.   the  CPU  time  required to execute the line is also given
along with the response time.  this makes "SCRIPT" a very useful  tool
for Performance Measurements.
SCRIPT.DOC                                                      Page 7


3.0  KNOWN BUGS AND DEFICIENCIES

There are no known bugs or deficiencies.



4.0  INSTALLATION INSTRUCTION

To use on KI-TENEX, compile with TENEX==1.
Convert all single  UP-ARROW>'S  used  in  the  existing  scripts  for
non-control use to double UP-ARROWS>'S.
SCRIPT.DOC  INTERNAL CHANGES                                    Page 8


5.0  INTERNAL CHANGES


5.1  Saving Files From System Crashes

If watching is enabled, the lines in the script are watched in a  file
SCPnnn.WCH  where  nnn is the job number.  Similarly, if response time
measurements are enabled, they are recorded  in  the  file  SCPnnn.RSP
where  nnn  is  the  job  number.   At  the  end  of each cycle, these
temporary files are appended to SCRIPT.WCH (or the user supplied name)
and  SCRIPT.RSP  respectively.  The output can always be obtained from
these master files even after a system crash.  The "APPEND" routine is
written  in BLISS and its compiled listing in MACRO is inserted in the
SCRIPT.MAC will as little change as possible.


5.2  Compatability With Earlier Batch Programs

Earlier batch programs like MONTST use the  dialogue  in  the  earlier
version  of  "SCRIPT".   The first question in the new version that is
different from an earlier question is question 4:  WATCH EACH LINE  OF
SCRIPT  (N,Y):.   If any batch job answers this question with anything
other then "Y", "YES", "N", "NO", it is marked as an old batch job and
the  answer  to  this question is taken to be the answer to the fourth
question in the earlier version i.e.  "WHERE TO LOG RESPONSE  TIMES?".
From  this  point on, only the old version questions are asked to that
job.  This allows the new batch and timesharing jobs to use  the  full
capabilities of the new version.  If however, the new capabilities are
required for the old batch programs, the control files for  them  have
to be modified to answer the new version questions.


5.3  Other Changes

The earlier  version  of  "SCRIPT"  used  the  HISEG  pseudo-op  which
prevented  the  user  from  debugging  "SCRIPT".  The new version uses
TWOSEG pseudo-op which allows debugging  of  the  "SCRIPT".   The  new
version also uses the HIBER UUO instead of SLEEP to be more responsive
to the PTY's.  For the same reason, an option  of  locking  itself  in
core has been provided.  The new version of "SCRIPT" complies with the
DATE 75 standard.


[End of SCRIPT.DOC]