[comp.sources.unix] v12i073: MUSBUS 5.2 Upgrade, Part02/03

sources-request@munnari.oz (01/24/88)

Submitted by: kenj@moncsbruce.oz (Ken McDonell)
Posting-number: Volume 12, Issue 73
Archive-name: musbus5.2/Part02

#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	update.021
#	update.022
#	update.023
#	update.024
#	update.025
#	update.026
#	update.027
#	update.028
#	update.029
#	update.030
#	update.031
#	update.032
# This archive created: Tue Jan 19 08:36:41 EST 1988
export PATH; PATH=/bin:$PATH
echo 'x - update.021'
if test -f 'update.021'
then
	echo 'shar: over-writing existing file update.021'
fi
sed 's/^X//' > update.021 <<'End-of-File-Grunt'
X1c1
X< # Note: undocumented sed feature, use # for comments $Header: check.sed,v 3.9 87/09/09 12:33:08 kenj Exp $
X---
X> # Note: undocumented sed feature, use # for comments $Header: check.sed,v 5.2 87/12/09 09:47:24 kenj Exp $
X8c8
X< /^clone [0-9][0-9]* [0-9][0-9]* pid [0-9]*$/d
X---
X> /^clone [0-9][0-9]* pid [0-9][0-9]*$/d
X10,11c10
X< /^clone [0-9][0-9]* done, pid [0-9][0-9]* $/d
X< s/ [0-9][0-9]*$//
X---
X> /^clone done, pid [0-9][0-9]* $/d
End-of-File-Grunt
if test 440 -ne `cat 'update.021' | wc -c`
then
	echo 'shar: transmission error (expected 440 characters)'
fi
echo 'x - update.022'
if test -f 'update.022'
then
	echo 'shar: over-writing existing file update.022'
fi
sed 's/^X//' > update.022 <<'End-of-File-Grunt'
X1c1
X< # $Header: fs.awk,v 3.4 87/06/22 14:27:32 kjmcdonell Beta $
X---
X> # $Header: fs.awk,v 5.1 87/09/25 04:49:51 kenj Exp $
X2a3,5
X> /user/	{ next }
X> /sys/	{ next }
X> /^$/	{ next } 
End-of-File-Grunt
if test 183 -ne `cat 'update.022' | wc -c`
then
	echo 'shar: transmission error (expected 183 characters)'
fi
echo 'x - update.023'
if test -f 'update.023'
then
	echo 'shar: over-writing existing file update.023'
fi
sed 's/^X//' > update.023 <<'End-of-File-Grunt'
X1c1
X< # $Header: mem.awk,v 3.4 87/06/22 14:27:39 kjmcdonell Beta $
X---
X> # $Header: mem.awk,v 5.1 87/09/25 04:49:09 kenj Exp $
X2a3,5
X> /user/	{ next }
X> /sys/	{ next }
X> /^$/	{ next } 
End-of-File-Grunt
if test 185 -ne `cat 'update.023' | wc -c`
then
	echo 'shar: transmission error (expected 185 characters)'
fi
echo 'x - update.024'
if test -f 'update.024'
then
	echo 'shar: over-writing existing file update.024'
fi
sed 's/^X//' > update.024 <<'End-of-File-Grunt'
X2c2,3
X< # $Header: Makefile,v 3.18 87/09/17 06:35:58 kenj Exp $
X---
X> # $Header: Makefile,v 5.2 87/12/14 10:21:29 kenj Exp $
X> SHELL = /bin/sh
X3a5,7
X> WORKDIR=Workload
X> # Note: the macro $(WORKDIR) may be imported to this Makefile, probably from
X> #	the environment or the command line.
X12,14c16,18
X< DATAFILES = BSDtime.awk Groan Intro.nr SysVtime.awk \
X< 	check.sed cleanup dc.dat fs.awk mem.awk \
X< 	mkscript run time.awk README
X---
X> DATAFILES = BSDtime.awk Intro.nr SysVtime.awk \
X> 	check.sed dc.dat fs.awk mem.awk \
X> 	time.awk README musbus.1
X19c23,24
X< 	mkdistrib mkinstall musbus.1
X---
X> 	MAKE mkdistrib mkinstall mkscript mkscript.out fixPATH \
X> 	run signature cleanup Groan progress qhisto
X21,24c26,27
X< 	mk1 mk2 mkcomp mktbl tbl.1 tbl.2 tbl.3 tbl.4 tbl.5 
X< WORKS = Makefile,1 cat.dat dummy.c edit.dat edscr1.dat edscr2.dat \
X< 	grep.dat mkprofile mkscript.out script.master
X< MANIFESTS = Workload.files Results.files Tools.files
X---
X> 	mk1 mk2 mkcomp mktbl tbl.1 tbl.2 tbl.3 tbl.4 tbl.5
X> MANIFESTS = $(WORKDIR).mf Tools.mf
X27,28c30,32
X< 	Workload/mkprofile Workload/mkscript.out \
X< 	Groan cleanup mkdistrib mkinstall mkscript run
X---
X> 	MAKE mkdistrib mkinstall mkscript mkscript.out fixPATH \
X> 	run signature cleanup Groan progress qhisto
X> 
X30a35
X> install:	Tools/Adjust	# pick any old one!
X32,33c37,40
X< install:
X< 	@chmod 755 mkinstall
X---
X> Tools/Adjust:
X> 	make unpack
X> unpack: source $(MANIFESTS)
X> 	@chmod 555 mkinstall
X35,36c42,45
X< 	@chmod 755 $(XSCRIPTS)
X< unrcs:	$(SOURCES) $(DATAFILES) $(TOOLS) $(WORKS) $(MANIFESTS)
X---
X> 	-@chmod 555 $(XSCRIPTS)
X> unrcs:	$(SOURCES) $(DATAFILES)
X> 	@chmod 555 MAKE
X> 	./MAKE context
X38c47
X< script:	Tmp Tmp/script.1 Tmp/script.out
X---
X> scripts:	Tmp Tmp/script.1
X91,98c100,105
X< Tmp/script.1: 	Workload/script.master mkperm mkscript
X< 	./mkscript 4 Workload/script.master
X< 	rm -f Tmp/script.[1-4]
X< 	mv script.[1-4] Tmp
X< Tmp/script.out: 	Workload/script.master
X< 	cd Workload ; make script.out
X< 	rm -f Tmp/script.out
X< 	mv Workload/script.out Tmp
X---
X> Tmp/script.1:	mkperm
X> 	cd $(WORKDIR) ; make scripts
X> 	rm -f Tmp/script.[0-9]* Tmp/script.out
X> 	cp $(WORKDIR)/script.[0-9]* $(WORKDIR)/script.out Tmp
X> time.awk:	BSDtime.awk	# Note BSD system assumed
X> 	ln BSDtime.awk time.awk
X106,110c113,119
X< 	chmod 444 *.c *.awk
X< 	cd Work ; chmod 444 *.c *.dat script.* workload
X< 	chmod 444 Intro.nr Makefile check.sed
X< 	chmod 555 Config Groan cleanup run 
X< clean:	Tmp
X---
X> 	chmod 444 $(SOURCES) $(DATAFILES)
X> 	chmod 444 */*.c */*.dat */script.master */Makefile
X> 	chmod 555 $(XSCRIPTS)
X> 	./MAKE modes
X> clean:	clean_x Tmp
X> 	./MAKE clean
X> clean_x:
X112,115c121,125
X< 	@cd Tmp ; /bin/rm -f masterlog.* userlog.* loggederrs
X< purge:	clean
X< 	@/bin/rm -f *.o core a.out ${PROGS}
X< 	@cd Tmp ; /bin/rm -rf *
X---
X> 	@cd Tmp ; /bin/rm -f masterlog.* userlog.* loggederrs log.groan nogroan
X> purge:	clean_x
X> 	/bin/rm -f *.o core a.out ${PROGS}
X> 	cd Tmp ; /bin/rm -rf *
X> 	./MAKE purge
End-of-File-Grunt
if test 2950 -ne `cat 'update.024' | wc -c`
then
	echo 'shar: transmission error (expected 2950 characters)'
fi
echo 'x - update.025'
if test -f 'update.025'
then
	echo 'shar: over-writing existing file update.025'
fi
sed 's/^X//' > update.025 <<'End-of-File-Grunt'
X2c2,3
X< .\" $Header: Intro.nr,v 3.12 87/09/16 07:24:45 kenj Exp $
X---
X> .\" $Header: Intro.nr,v 5.2 87/12/17 07:16:10 kenj Exp $
X> .\" $Compile: typeset %f
X43c44
X< \\fI\\$1\\fP\\$2
X---
X> \&\fI\\$1\fP\\$2
X46c47
X< \\fB\\$1\\fP\\$2
X---
X> \&\fB\\$1\fP\\$2
X56c57
X< \\fI$\\$1\\fP\\$2
X---
X> \&\fI$\\$1\fP\\$2
X73c74
X< .IP "\fIShell Variable:\fP \\fB\\$1\\fP  (default: \\$2)"
X---
X> .IP "\fIShell Variable:\fP \fB\\$1\fP  (default: \\$2)"
X77c78
X< .IP "\fITest Name:\fP \\fB\\$1\\fP"
X---
X> .IP "\fITest Name:\fP \fB\\$1\fP"
X114c115
X< ACSnet: kenj@moncskermit.oz
X---
X> Internet: kenj@moncsbruce.oz.AU
X116,118c117
X< USENET: seismo!munnari!moncskermit.oz!kenj
X< .br
X< ARPA: kenj%moncskermit.oz@seismo.arpa
X---
X> USENET: uunet!munnari!moncsbruce.oz!kenj
X120c119
X< Revised: 16 September, 1987
X---
X> Revised: 15 December, 1987
X154c153
X< This document provides an overview for \fBVersion\fP \fB5.0\fP of MUSBUS
X---
X> This document provides an overview for \fBVersion\fP \fB5.2\fP of MUSBUS
X182a182
X> .PR pr
X188a189
X> .PR umask
X214,215c215,216
X< .FL Workload ,
X< descriptions of the workload profile, all associated data files and some
X---
X> .FL Work* ,
X> descriptions for assorted workload profiles, all associated data files and some
X221a223,224
X> or
X> .SC "./mkinstall"
X224c227
X< as required.
X---
X> the controlling command procedure as required.
X307a311,316
X> The
X> .FL Makefiles
X> in the workload directories
X> .FL Work*
X> may also need to be similarly tuned to match the local environment.
X> .LP
X317a327,336
X> Select the appropriate workload description directory
X> (see Section 4 for hints
X> on tailoring your own description), and if this is other than
X> .FL Workload
X> (the default), ensure that the environment
X> variable
X> .SV workdir
X> is set, e.g.
X> .SC "workdir=Work_mystuff ; export workdir"
X> .LP
X375c394,395
X< Output sent to ... /dev/ttyp0
X---
X> Current directory:  /usr/kenj/musbus
X> Output sent to ... /dev/ttyi04
X383d402
X< /dev/hp1a	\07419	\04169	\02508	62%	/jnk
X385d403
X< /dev/hp1g	38383	32579	\01965	94%	/mnt
X389a408,416
X> ****
X> * Common Distributed Workload for a C Program Development Environment
X> *  Workload script profile: shell=/bin/sh
X> *  23 commands (header:1 & trailer:1)
X> * freq  command     freq  command     freq  command     freq  command
X> *    7  :	       4  rm		 2  cc		   2  chmod
X> *    2  cp	       2  ed		 1  cat		   1  grep
X> *    1  ls	       1  mkdir
X> ****
X427a455,458
X> the optional command procedure
X> .SV workdir /\c
X> .PR cleanstderr ,
X> followed by
X436c467,468
X< .FL check.sed
X---
X> .SV workdir /\c
X> .PR cleanstderr
X442a475,478
X> .FL check.sed
X> should not have to be altered since this deals with
X> expected standard error output that is \fIindependent\fP of the multi-user
X> workload.
X480c516
X< When possible, an idle system in mult-iuser mode is
X---
X> When possible, an idle system in multi-user mode is
X500c536
X< A designated test may by run using the command
X---
X> A designated test may be run using the command
X616c652
X< This test is due to John Lions (University of New South Wales) who
X---
X> This test is due to Chris Maltby (Softway Pty Ltd, Sydney) who
X750c786
X< where the simulated tty output is sent -- there is a lot of this, and
X---
X> where the simulated tty output is sent -- there may be a lot of this, and
X764a801,805
X> .VA nscripts 4
X> Number of workload scripts to be constructing from permutations
X> of the master script.
X> .VA workdir Workload
X> Directory containing the workload profile descriptions and data files.
X773,822d813
X< The synthetic workload is created from a number of job streams, each
X< of which is described by a line in the file
X< .FL Tmp/workload .
X< Each line consists of
X< .IP \(bu
X< the home directory for the job stream,
X< .IP \(bu
X< the full pathname of the program to run,
X< .IP \(bu
X< optional arguments to that program,
X< .IP \(bu
X< an optional source
X< of standard input to that program (a filename prefixed by ``<''), and
X< .IP \(bu
X< an optional destination
X< for standard output from that program (a filename prefixed by ``>'').
X< .LP
X< .FL Tmp/workload
X< is created automatically by the command script
X< .PR run
X< based upon
X< .IP (a)
X< the variables
X< .SV dirs
X< and
X< .SV ttys , and
X< .IP (b)
X< the workload profile
X< .FL Workload/script.master
X< from which the script interpreter program name is extracted
X< and the individual input script files (\c
X< .FL Tmp/script.? ).
X< .LP
X< When
X< .FL Tmp/workload
X< is constructed, a cyclic scheme
X< is used to share user work amongst the
X< available directories and tty lines (as per
X< .SV dirs
X< and
X< .SV ttys ).
X< In this way, serial i/o bottlenecks for large numbers of simulated
X< users, and unbalanced disk i/o across spindles may be avoided.
X< As a dynamic check, the program
X< .PR ttychk
X< is used within
X< .PR run
X< to check for potential bandwidth limitations on the serial i/o
X< lines, given the number of lines and the maximum number of job streams.
X< .LP
X824c815,816
X< .FL Workload/script.master )
X---
X> .SV workdir /\c
X> .FL script.master )
X848a841,843
X> .IP 5.
X> Lines beginning with a single ``%'' are treated as comments and stripped
X> from the scripts.
X854,857c849,857
X< are used (by
X< .PR run )
X< to create several (usually 4) scripts from
X< .FL Workload/script/master
X---
X> are used (in
X> .SV workdir /\c
X> .FL Makefile )
X> to create several
X> (i.e. \c
X> .SV nscripts )
X> scripts from
X> .SV workdir /\c
X> .FL script.master
X860,863c860,865
X< These scripts reside in
X< .FL Tmp/script.?
X< and are assigned in a cyclic manner to create the job streams.
X< The work for \fBeach\fP
X---
X> These scripts are initially created in
X> .SV workdir ,
X> then copied as required to
X> .FL Tmp/script.?  .
X> The scripts are assigned in a cyclic manner to create the job streams
X> so that the work for \fBeach\fP
X865c867,868
X< \fBone\fP job stream.
X---
X> \fBone\fP job stream, although several job streams may be
X> based on the same script.
X875a879,880
X> PATH=XXX:$PATH
X> export PATH
X878,884c883
X< \&./keyb edscr1.dat | ed edit.dat
X< : .......................................................
X< : .    This is some filler of about the same            .
X< : .    size as the file edscr1.dat, since the           .
X< : .    emulated input proceeds in parallel, and         .
X< : .    we want the real-time delay to be about right    .
X< : .......................................................
X---
X> keyb edscr1.dat | ed edit.dat
X896,897c895
X< \&./keyb edscr2.dat | ed dummy.c
X< : .  more textual and time filler for the second edscript file, edscr2.dat .
X---
X> keyb edscr2.dat | ed dummy.c
X912c910
X< .FL Tmp/script.1 )
X---
X> .FL Workload/script.1 )
X918c916,918
X< .CK Tmp/script.1
X---
X> .CK Workload/script.1
X> PATH=/mnt/kenj/Src/musbus:$PATH
X> export PATH
X922,928c922,927
X< \&./keyb edscr1.dat | ed edit.dat
X< : .......................................................
X< : .    This is some filler of about the same            .
X< : .    size as the file edscr1.dat, since the           .
X< : .    emulated input proceeds in parallel, and         .
X< : .    we want the real-time delay to be about right    .
X< : .......................................................
X---
X> keyb edscr1.dat | ed edit.dat
X> : +00000+ FILLER Mary had a little lamb, its fleece was white as snow
X> : +00070+ FILLER Mary had a little lamb, its fleece was white as snow
X> : +00140+ FILLER Mary had a little lamb, its fleece was white as snow
X> : +00210+ FILLER Mary had a little lamb, its fleece was white as snow
X> : +00339+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
X934,935c933,935
X< \&./keyb edscr2.dat | ed dummy.c
X< : .  more textual and time filler for the second edscript file, edscr2.dat .
X---
X> keyb edscr2.dat | ed dummy.c
X> : +00000+ FILLER Mary had a little lamb, its fleece was white as snow
X> : +00076+ 
X945a946,1013
X> Note that
X> .PR mkscript
X> knows that the program
X> .PR keyb
X> is used to simulate a user typing input to an interactive program, and so
X> .PR mkscript
X> adds filler text (of the same size as the
X> .PR keyb
X> input file) into the script as comments (i.e. ``FILLER Mary had a little
X> lamb, ...'') to approximate the corresponding real-time delay to
X> the shell's rate of command execution while at the same time
X> .PR keyb
X> is pumping the same volume of input to the interactive command.
X> .LP
X> The synthetic workload for each simulated user is
X> described by a line in the file
X> .FL Tmp/workload .
X> Each line consists of
X> .IP \(bu
X> the home directory for the job stream,
X> .IP \(bu
X> the full pathname of the interpreter to run,
X> .IP \(bu
X> optional arguments to that program,
X> .IP \(bu
X> an optional source
X> of standard input to that program,
X> i.e. a script file (a filename prefixed by ``<''), and
X> .IP \(bu
X> an optional destination
X> for standard output from that program (a filename prefixed by ``>'').
X> .LP
X> .FL Tmp/workload
X> is created automatically by the command script
X> .PR run
X> based upon
X> .IP 1.
X> the variables
X> .SV dirs
X> and
X> .SV ttys , and
X> .IP 2.
X> the workload profile
X> .SV workdir /\c
X> .FL script.master
X> from which the script interpreter program name is extracted,
X> and
X> .IP 3.
X> the individual input script files (\c
X> .FL Tmp/script.? ).
X> .LP
X> When
X> .FL Tmp/workload
X> is constructed, a cyclic scheme
X> is used to share user work amongst the
X> available scripts, directories and tty lines (as per
X> .SV dirs
X> and
X> .SV ttys ).
X> In this way, serial i/o bottlenecks for large numbers of simulated
X> users, and unbalanced disk i/o across spindles may be avoided.
X> As a dynamic check, the program
X> .PR ttychk
X> is used within
X> .PR run
X> to check for potential bandwidth limitations on the serial i/o
X> lines, given the number of lines and the maximum number of job streams.
X> .LP
X949c1017
X< nusers=8
X---
X> nusers=7
X951a1020
X> nscripts=4
X968d1036
X< /usr/tmp/user8 /bin/sh -ie <Tmp/script.4 >/dev/ttyh8
X973,1014d1040
X< It is strongly recommended that you create your own workload
X< profile for the multi-user test to reflect the anticipated
X< system usage.
X< To do this,
X< .IP 1.
X< Use the distributed files in the
X< .FL Workload
X< directory as a guide.
X< .IP 2.
X< Create a new
X< .FL Workload/script.master
X< describing the required job steps.
X< .IP 3.
X< Ensure all required data files are in the
X< .FL Workload
X< directory, because every job stream executes with the current
X< directory containing its own private copies of \f3all\fP the
X< files from
X< .FL Workload .
X< .IP 4.
X< Ensure the makefile (\c
X< .FL Workload/Makefile )
X< has the following targets defined (they are assumed to exist by
X< .PR run ).
X< .RS
X< .nr II 6n
X< .IP (a)
X< context : ensure all files needed to run a script are present.
X< .IP (b)
X< clean : remove any unnecessary temporary files, e.g. those created from
X< somewhere else during a ``make context''.
X< .IP (c)
X< script.out : run a script and trap all the output; the file
X< .FL script.out
X< should contain the concatenation of the script input and the
X< script output.
X< This file is used by
X< .PR ttychk
X< to compute the output tty bandwidth requirements.
X< .RE
X< .nr II 0
X< .LP
X1025c1051,1062
X< starts the user program(s) (\c
X---
X> .IP 1.
X> redirects all standard i/o streams (\fIstdin\fP to a pipe,
X> \fIstdout\fP to a terminal, and \fIstderr\fP to the file
X> .FL Tmp/userlog.nnn ),
X> .IP 2.
X> changes current directory,
X> .IP 3.
X> creates the file
X> .FL USER
X> whose contents are the ordinal simulated user number,
X> .IP 4.
X> starts the designated command interpreter (\c
X1027,1028c1064,1067
X< above) and pumps
X< random chunks of input to them down pipes
X---
X> above), and
X> .IP 5.
X> pumps random chunks of input to the command
X> interpreter down pipes
X1055c1094
X< .PR /bin/ed .
X---
X> the interactive programs.
X1071a1111,1119
X> If the environment variable
X> .SV tty
X> is undefined or assigned to the null string "",
X> .PR keyb
X> will not echo any of its input; this is useful when the output from
X> .PR keyb
X> is going to a program that turns tty driver echoing off and handles
X> all of its own echo processing, e.g. \c
X> .PR vi .
X1088c1136
X< should be nearly the same for all users in a given run (although
X---
X> should be nearly the same for all simulated users in a given run (although
X1095c1143
X< and shell error output from the simulated user work.
X---
X> and unexpected shell error output from the simulated user work.
X1100,1102d1147
X< This should consist of a row of ``# ''s (assuming root's 
X< .PR /bin/sh
X< prompt is ``# '').
X1112a1158,1162
X> Insufficient user work specifications in the workload file
X> cannot open input file "%s"
X> makework: internal snark -- code is broken!
X> makework: bad rate, reset to %.2f chars/sec
X> makework: cannot open copy file '%s'
X1113a1164,1165
X> makework: missing nusers
X> makework: impossible nusers (%d<-%s)
X1115,1121c1167,1175
X< user %d job %d pid %d done exit code %d
X< user %d job %d pid %d done status 0x%x
X< user %d job %d pid %d done exit code %d status 0x%x
X< clone %d done, pid %d exit code %d
X< clone %d done, pid %d status 0x%x
X< clone %d done, pid %d exit code %d status 0x%x
X< user %d job %d pid %d killed off
X---
X> makework: creat "USER" failed for user %d
X> write(,,%d) returns %d
X> user %d pid %d done status %d
X> user %d pid %d done exit code %d
X> user %d pid %d done exit code %d status %d
X> clone done, pid %d exit code %d
X> clone done, pid %d status %d
X> clone done, pid %d exit code %d status %d
X> user %d pid %d killed off
X1131a1186,1187
X> *** New Run ***
X> makework: typing rate reset to %.2f chars/sec
X1134,1136c1190,1193
X< user %d job %d pid %d pipe fd %d
X< user %d job %d pid %d done
X< clone %d done, pid %d
X---
X> user %d master stream %d pid %d pipe fd %d >%s
X> user %d clone %d stream %d pid %d pipe fd %d >%s
X> user %d pid %d done
X> clone done, pid %d
X1149c1206,1214
X< .NH 4 "The Complete Test"
X---
X> .TN arithmetic
X> Run all the arithmetic group of raw speed tests, i.e. like
X> \&``run arithoh register short int long float double dc''.
X> .TN system
X> Run the system-related group of speed tests, i.e. like
X> \&``run syscall pipe context1 spawn execl fstime''.
X> .TN speed
X> Run everything from the ``arithmetic'' and ``system'' groups.
X> .NH 4 "Creating Your Own Multi-user Workload Description"
X1150a1216,1339
X> Several synthetic workloads for the multi-user test are included in
X> the distribution.
X> However a particular installation is unlikely to have a
X> user community whose pattern of interaction matches
X> any one of these workloads.
X> .LP
X> Consequently, it is strongly recommended that you create your own workload
X> profile for the multi-user test to reflect your anticipated
X> system usage.
X> To do this,
X> .IP 1.
X> Use the distributed files in the
X> .FL Work*
X> directories as a guide.
X> .IP 2.
X> Create a new directory, e.g. \c
X> .FL Work_local .
X> .IP 3.
X> Create a new
X> .FL Work_local/script.master
X> (see Section 3.2 for the format specifications)
X> describing the required job steps.
X> .IP 4.
X> Ensure all required data files are either included in the
X> .FL Work_local
X> directory, or readily accessible (see comments on ``make manifest'' below).
X> .IP 5.
X> Ensure the makefile (\c
X> .FL Work_local/Makefile )
X> has the following targets defined (they are assumed to exist by
X> .PR run ).
X> .RS
X> .nr II 6n
X> .IP (a)
X> \fBscripts\fP : create
X> .FL script.?
X> from
X> .FL script.master ,
X> typically by using the command procedure
X> .PR ../mkscript .
X> The command procedure
X> .PR ../fixPATH
X> may also be used at this juncture to edit the
X> .FL script.?
X> files by locating lines of the form ``PATH=XXX:...'' and replacing
X> the string ``XXX'' by the full pathname of the parent directory ``..''
X> (\c
X> .PR ../fixPATH\ -w
X> is a variant that also adds the full pathname of the workload directory, ``.'').
X> In this way, MUSBUS programs (e.g. \c
X> .PR keyb
X> or some of the raw speed tests)
X> and/or workload specific programs can be included in
X> .FL script.master
X> \fIwithout\fP requiring that all the executables be in the current directory
X> of each simulated user.
X> Use the command procedure
X> .PR ../mkscript.out
X> to run the designated workload command interpreter with
X> .FL script.1
X> as its standard input
X> trapping all the output; the file
X> .FL script.out
X> should contain the concatenation of the script input and the
X> script output.
X> This file is used by
X> .PR ttychk
X> to compute the output tty bandwidth requirements.
X> .IP (b)
X> \fBcontext\fP :
X> ensure all executable programs and
X> files needed to run a script are present, then
X> start any necessary background tasks.
X> .IP (c)
X> \fBmainfest\fP : echo the names of all files required to be in the current
X> working directory of a user when a script is run.
X> Used by
X> .PR run
X> to set up an independent local directory context for each simulated user.
X> A typical example of an appropriate
X> .FL Makefile
X> entry might be
X> .RS
X> .nf
X> .if t .HS
X> manifest:
X> 	@echo mystuff.dat other data files
X> .if t .HE
X> .fi
X> .RE
X> .IP (d)
X> \fBclean\fP : remove any unnecessary temporary files, e.g. those created from
X> somewhere else during a ``make context''.
X> .IP (e)
X> \fBpurge\fP : kill off any background proceses and discard everything that
X> cannot be recreated.
X> Usually includes ``clean'' as a prerequesite.
X> .IP (f)
X> \fBmodes\fP : set appropriate file protection modes \- be especially careful
X> of shell scripts that tend to lose their execute permissions when sent
X> across the electronic mail-based networks.
X> .RE
X> .nr II 0
X> .IP 5.
X> Optionally create the filter
X> .PR cleanstderr 
X> to remove anticipated
X> \fIstderr\fP output from the command interpreter, e.g. command prompts.
X> Called by
X> .PR cleanup .
X> .PR ../mkscript.out
X> also uses
X> .PR cleanstderr
X> (if it exists) and checks that no \fIstderr\fP residue remains after
X> .FL script.out
X> has been created.
X> .IP 6.
X> Optionally create a file called
X> .FL DESCRIPTION
X> that describes the particular workload environment being simulated.
X> .PR run
X> will use this file, if it exists, to annotate the log file of results.
X> .NH 5 "The Complete Test"
X> .LP
X1152,1153c1341,1344
X< login as root, choose another inactive terminal running at 9600 baud
X< (/dev/ttyx below) and start the whole charade as follows.
X---
X> login as root, choose one or more other inactive terminals running at 9600 baud
X> (/dev/ttyx below), select the appropriate workload if the multi-user
X> test is to be run (Work_local below)
X> and start the whole charade as follows.
X1155,1157c1346,1349
X< .SC "export tty"
X< .SC "rm Report/log Report/log.work"
X< .SC "./run &"
X---
X> .SC workdir=Work_local
X> .SC "export tty workdir"
X> .SC "rm -f Report/log Report/log.work"
X> .SC "./run"
X1160,1161c1352,1354
X< users in the multi-user test, this takes about 5 hours to run!
X< .NH 5 "What Does It All Mean?"
X---
X> users in the Workload multi-user test, this takes about 5 hours to run!
X> .NH 6 "Other Goodies"
X> .NH 6.1 "Alternative Multi-user Workloads"
X1162a1356,1418
X> The distributed source includes the following workload profiles.
X> .IP (a)
X> \fBWorkload\fP :
X> the common distributed workload for a C program development environment.
X> .IP (b)
X> \fBWork_text\fP :
X> a text processing workload (lots of
X> .PR vi ,
X> .PR nroff
X> and
X> .PR spell ).
X> .IP (c)
X> \fBWork_stress\fP :
X> a system exerciser that includes some of the raw speed tests and selected job
X> steps from the other workload profiles;  useful for
X> shaking out system faults under normal to heavy simulated load.
X> .NH 6.2 "Continuous System Exerciser"
X> .LP
X> The command procedure
X> .PR Groan
X> is intended to run assorted tests in a continuous mode.
X> It starts with the raw speed tests (Section 3.1)
X> and then runs each of the workload
X> profiles in turn, over and over again.
X> .LP
X> The existence of the file
X> .FL Tmp/nospeed
X> may be used to by-pass all the raw speed tests that are
X> performed only during the first major iteration of
X> .PR Groan .
X> .LP
X> Similarly, if the file
X> .FL Tmp/nogroan
X> exists at the end of a major iteration,
X> .PR Groan
X> will terminate.
X> .LP
X> All the standard output chit-chat from
X> .PR run
X> is sent to the file
X> .FL Tmp/log.groan .
X> .NH 6.3 "Monitoring the Progress of the Multi-user Test"
X> .LP
X> The command procedure
X> .PR progress
X> produces a histogram displaying the relative progress of all simulated
X> user job streams.
X> It uses the command procedure and
X> .PR awk
X> script
X> .PR qhisto
X> to plot the histogram \-
X> .PR qhisto
X> is quite a useful little program in its own right!
X> .NH 6.4 "Shipping the Source"
X> .LP
X> Use
X> .PR mkdistrib
X> to flatten out the directory structure and prepare shipping
X> manifests; this is the converse action to
X> .PR mkinstall .
X> .NH 7 "What Does It All Mean?"
X> .LP
X1230,1234c1486,1489
X< There is \fBno\fP reason to suspect that the distributed workload
X< for the multi-user test (i.e. the files
X< .FL Tmp/script.?
X< and
X< .FL Tmp/workload )
X---
X> There is \fBno\fP reason to suspect that any of the distributed workloads
X> for the multi-user test (i.e. the contents of the
X> .FL Work*
X> directories)
X1237c1492
X< expected system usage.
X---
X> expected system usage (refer to Sections 3.2 and 4 above).
X1278c1533,1535
X< This is easy to fix by adding a list of more tty devices to the 
X---
X> This condition is detected by
X> .PR ttychk
X> and is easy to fix by adding a list of more tty devices to the 
X1293a1551,1556
X> .LP
X> A MUSBUS newsletter is published at irregular intervals and
X> details new release information, anecdotes and general benchmarking
X> experiences.
X> E-mail submissions or subscription requests should be sent to
X> musbus-req@moncsbruce.oz.AU.
End-of-File-Grunt
if test 21465 -ne `cat 'update.025' | wc -c`
then
	echo 'shar: transmission error (expected 21465 characters)'
fi
echo 'x - update.026'
if test -f 'update.026'
then
	echo 'shar: over-writing existing file update.026'
fi
sed 's/^X//' > update.026 <<'End-of-File-Grunt'
X3c3
X< # $Header: cleanup,v 3.5 87/06/22 14:40:45 kjmcdonell Beta $
X---
X> # $Header: cleanup,v 5.2 88/01/07 10:58:24 kenj Exp $
X6a7
X> bell=""
X15c16
X<     -a)	: abort
X---
X>     -a) : abort
X21c22
X< 	echo  ; sleep 2 ; echo  ; sleep 2 ; echo 
X---
X> 	echo $bell ; sleep 2 ; echo $bell ; sleep 2 ; echo $bell 
X31c32
X<     -f)	: filesystem throughput
X---
X>     -f) : filesystem throughput
X37c38
X<     -i)	: report last iteration
X---
X>     -i) : report last iteration
X53c54
X<     -m)	: mem throughput tests
X---
X>     -m) : mem throughput tests
X59c60
X<     -t)	: timing with /bin/time
X---
X>     -t) : timing with /bin/time
X66a68,69
X> 	workdir=${workdir-Workload}
X> 	touch $worktmp		# thanks to Mark Hewitt, mjh%kernel.uucp@ukc.ac.uk
X87,88c90,95
X< 	PS1=`sh -ic "" 2>&1`
X< 	sed -e "s/\\${PS1}//g" $worktmp | sed -f check.sed >loggederrs
X---
X> 	if test -f $workdir/cleanstderr
X> 	then
X> 		$workdir/cleanstderr <$worktmp >${worktmp}a
X> 		mv ${worktmp}a $worktmp
X> 	fi
X> 	sed -f check.sed $worktmp >loggederrs
X96c103
X<         rm -f loggederrs
X---
X> 	rm -f loggederrs
X101c108
X<     '')	: 'skip it (residual effect of shifts)'
X---
X>     '') : 'skip it (residual effect of shifts)'
End-of-File-Grunt
if test 1169 -ne `cat 'update.026' | wc -c`
then
	echo 'shar: transmission error (expected 1169 characters)'
fi
echo 'x - update.027'
if test -f 'update.027'
then
	echo 'shar: over-writing existing file update.027'
fi
sed 's/^X//' > update.027 <<'End-of-File-Grunt'
X#! /bin/sh
X# $Header: signature,v 5.2 87/12/09 16:49:25 kenj Exp $
Xtmp=/tmp/$$
Xworkdir=${workdir-Workload}
X
Xif test -f $workdir/script.master
Xthen
X	:
Xelse
X	echo "signature: cannot find $workdir/script.master"
X	exit 1
Xfi
X
Xecho "****"
Xtest -f $workdir/DESCRIPTION && sed 's/^/* /' $workdir/DESCRIPTION
X
Xsed \
X    -e 's/.*keyb.*| *//' \
X    -e '/.*keyb.*> *.*&/d' \
X    -e '/[a-zA-Z][a-zA-Z0-9]*=/d' \
X    $workdir/script.master \
X| awk '
XNR==1		{ shell=$2; next }
X/^%%/		{ if (head==0) head=tail+1; tail=0; next }
X/^%/		{ next }
X		{ num++; tail++
X		  cmd=$1
X		  if (length(cmd)>12) cmd=substr(cmd,1,12)
X		  f[cmd]++
X		}
XEND		{ for (cmd in f) print "     " f[cmd] "  " cmd >"'$tmp'"
X		  print "*  Workload script profile: shell=" shell
X		  print "*  " num " commands (header:" head-1 " & trailer:" tail ")"
X		  print "* freq  command     freq  command     freq  command     freq  command"
X		}'
Xsort +0nr -1 $tmp \
X| pr -l1 -t -4 \
X| sed 's/^.../*  /'
X
Xecho "****"
X
Xrm -f $tmp
End-of-File-Grunt
if test 973 -ne `cat 'update.027' | wc -c`
then
	echo 'shar: transmission error (expected 973 characters)'
fi
echo 'x - update.028'
if test -f 'update.028'
then
	echo 'shar: over-writing existing file update.028'
fi
sed 's/^X//' > update.028 <<'End-of-File-Grunt'
X# $Header: Makefile,v 5.2 88/01/12 06:43:13 kenj Exp $
XDUMMY	= aa.1.dat aa.2.dat aa.3.dat aa.4.dat aa.5.dat aa.6.dat \
X	mm.1.dat mm.2.dat mm.3.dat mm.4.dat mm.5.dat mm.6.dat \
X	zz.1.dat zz.2.dat zz.3.dat zz.4.dat zz.5.dat zz.6.dat
XDATA	= cat.dat cctest.c dummy.c edit.dat edscr1.dat edscr2.dat \
X	grep.dat script.master
XOTHERPROGS = ../keyb
X
Xscripts:	script.1 script.out
X
Xscript.1:	../mkscript ../mkperm ../fixPATH script.master
X	../mkscript $${nscripts-4} script.master
X	../fixPATH
X
Xscript.out:	../mkscript.out script.1 cleanstderr
X	../mkscript.out
X
Xcontext: $(DATA) $(DUMMY) $(OTHERPROGS) cleanstderr cctest.c DESCRIPTION
X
Xmanifest:
X	@echo $(DATA) $(DUMMY)
Xclean:
X	rm -f $(DUMMY) core workload cctest.c *.bad
X	rm -rf .tmp
X
Xpurge:	clean
X	rm -f script.? script.out
X
Xmodes:
X	chmod 555 cleanstderr
X
Xcctest.c:	../cctest.c
X	ln ../cctest.c .
X../keyb:
X	cd .. ; make keyb
X../mkperm:
X	cd .. ; make mkperm
X
X$(DUMMY):
X	touch $@
X
X.DEFAULT:
X	co RCS/$@,v
End-of-File-Grunt
if test 942 -ne `cat 'update.028' | wc -c`
then
	echo 'shar: transmission error (expected 942 characters)'
fi
echo 'x - update.029'
if test -f 'update.029'
then
	echo 'shar: over-writing existing file update.029'
fi
sed 's/^X//' > update.029 <<'End-of-File-Grunt'
XCommon Distributed Workload for a C Program Development Environment
End-of-File-Grunt
if test 68 -ne `cat 'update.029' | wc -c`
then
	echo 'shar: transmission error (expected 68 characters)'
fi
echo 'x - update.030'
if test -f 'update.030'
then
	echo 'shar: over-writing existing file update.030'
fi
sed 's/^X//' > update.030 <<'End-of-File-Grunt'
X%W% /bin/sh -ie
XPATH=XXX:$PATH
Xexport PATH
Xmkdir /tmp/$$ tmp
X%% 1 edit
Xkeyb edscr1.dat | ed edit.dat
Xchmod u+w temporary
Xrm temporary
X%% 2 ls
Xls -l
X%% 3 cat
Xcat cat.dat
X%% 4 compile
Xcc -c cctest.c 1>&2
Xrm *.o
X%% 5 edit, compile and link
Xchmod 444 dummy.c
Xkeyb edscr2.dat | ed dummy.c
Xcc dummy.c 1>&2
Xrm a.* grunt.c
X%% 6 grep
Xgrep '[ 	]*nwork' grep.dat
X%% 7 file copying
Xcp *.c edit.dat /tmp/$$
Xcp /tmp/$$/* tmp
X%%
Xrm -rf tmp /tmp/$$
End-of-File-Grunt
if test 433 -ne `cat 'update.030' | wc -c`
then
	echo 'shar: transmission error (expected 433 characters)'
fi
echo 'x - update.031'
if test -f 'update.031'
then
	echo 'shar: over-writing existing file update.031'
fi
sed 's/^X//' > update.031 <<'End-of-File-Grunt'
X#! /bin/sh
X# Clean prompt stuff from standard error output in multi-user test.
X# Called from ../cleanup
X# $Header: cleanstderr,v 5.2 87/12/09 09:38:11 kenj Exp $
X
XPS1=`/bin/sh -ic "" 2>&1`
Xsed \
X    -e "s/\\${PS1}//g" \
X    -e '/^cctest.c$/d' \
X    -e '/^dummy.c$/d' \
X    -e '/^[ 	]*$/d'
End-of-File-Grunt
if test 289 -ne `cat 'update.031' | wc -c`
then
	echo 'shar: transmission error (expected 289 characters)'
fi
echo 'x - update.032'
if test -f 'update.032'
then
	echo 'shar: over-writing existing file update.032'
fi
sed 's/^X//' > update.032 <<'End-of-File-Grunt'
X# $Header: Makefile,v 5.2 88/01/12 06:46:44 kenj Exp $
XDATA	= big.txt viscr1.dat viscr2.dat small.txt big.spell ttytype
XOTHERPROGS = ../keyb map_pty termname
X
Xscripts:	context script.out
X
Xscript.1:	../mkscript ../mkperm ../fixPATH script.master
X	../mkscript $${nscripts-6} script.master
X	../fixPATH -w
X
Xscript.out:	../mkscript.out script.1 cleanstderr
X	../mkscript.out
X
Xcontext: $(DATA) $(OTHERPROGS) script.master DESCRIPTION README
X
Xmanifest:
X	@echo $(DATA)
X
Xclean:
X	rm -f core *.bad term temporary USER
X	rm -rf .tmp
X
Xpurge:	clean
X	rm -f termname termname.o script.? script.out big.spell ttytype
X
Xmodes:
X	chmod 555 cleanstderr map_pty
X
Xtermname:	termname.c termname.o
X	cc $(CFLAGS) -o termname termname.o
X
Xttytype:
X	echo "/dev/tty00 vt100" >ttytype
X
Xbig.spell:	big.txt
X	spell big.txt >big.spell
X
X../keyb:
X	cd .. ; make keyb
X
X../mkperm:
X	cd .. ; make mkperm
X
X.DEFAULT:
X	co RCS/$@,v
End-of-File-Grunt
if test 883 -ne `cat 'update.032' | wc -c`
then
	echo 'shar: transmission error (expected 883 characters)'
fi