-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathS7setup
executable file
·1195 lines (1066 loc) · 23.3 KB
/
S7setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
:
# Copyright (c) 1996 - 2001 Caldera International, Inc.
# All Rights Reserved.
#
# @(#) S7setup:1.14 1/22/96 00:00:00
#
# S7setup
#
NNL=
CCL=
#
# first, figure out how to make echo work without automatic newline
#
if echo "\c" | grep c >/dev/null 2>&1
then
NNL='-n'
else
CCL='\c'
fi
#
# are we doing an APR ?
#
case "$1" in
"")
DOAPR=NO
;;
"doapr")
DOAPR=YES
;;
*)
echo
echo "Usage: S7setup<CR> or S7setup doapr<CR>"
echo
exit 0
;;
esac
case $# in
0)
echo
;;
1)
echo
;;
*)
echo
echo "Usage: S7setup<CR> or S7setup doapr<CR>"
echo
exit 0
;;
esac
#
# display intro
#
cat << END
AIM Multiuser Benchmark - Suite VII S7setup
Copyright (c) 1996 - 2001 Caldera International, Inc.
All Rights Reserved.
------------
INTRODUCTION
------------
END
if test "$DOAPR" = "YES"
then
echo "YOU HAVE INDICATED THAT THIS IS AN APR RUN."
echo
fi
cat << END
This script guides you through the steps needed to tailor the AIM Multiuser
Benchmark - Suite IV to your environment. It will ask you a series of questions
to identify the components of the System Under Test (SUT). As each question is
displayed on the screen, you can accept the default value that is enclosed
in brackets (e.g. [default_value] ), or enter the correct value. At any
point during the execution of this script, you may type Q to terminate it.
CAUTION: This script will NOT automatically set up the correct environment
to run the benchmark. It is important that you provide the correct
information for the computer and operating system that are being benchmarked.
Verify and edit the Makefile as required before running the benchmark.
END
while :
do
echo $NNL "Press RETURN to continue, press Q to exit ...$CCL"
read ANS
case "$ANS" in
"") break;;
Q) exit 0;;
*) echo; echo "\"$ANS\" is not allowed ... ^G";;
esac
done
cat << END
You will be asked to provide the following information about the system
to be tested:
1) Benchmark mix
2) Your compiler name
3) The compiler options to be used
4) The linker options to be used
5) The location of the Bourne shell executable
6) The mount point for each configured disk drive,
if the SUT is configured with more than one drive
If you do not know or are unsure about any of the items mentioned above,
press Q to terminate this installation script. Check with your System
Administrator or consult the SUT manuals for the correct information.
END
while :
do
echo $NNL "Press RETURN to continue, press Q to exit ...$CCL"
read ANS
case "$ANS" in
"") break;;
Q) exit 0;;
*) echo; echo "\"$ANS\" is not allowed ... ^G";;
esac
done
#
# init default settings
#
CC=cc
DCCOPT=-O
BSH=/bin
#---------------------
# get the AIM id #
#---------------------
if test "$DOAPR" = "YES"
then
AIMID=`ls ../#* 2> /dev/null | wc -l`
if [ $AIMID -eq 1 ] # here is aimid#, is it correct?
then
echo $NNL "Enter the AIM id [`cd ..; ls \#*`] :$CCL"
read ANS
if [ "$ANS" != "" ]
then
ANS=`echo $ANS | sed "s/^#//"`
touch ../\#$ANS
fi
else
echo $NNL "Enter the AIM id :$CCL"
read ANS
ANS=`echo $ANS | sed "s/^#//"`
touch ../\#$ANS
fi
fi
cat << END
-------------
BENCHMARK MIX
-------------
Which mix do you wish to run?
1) Multiuser/Shared System
2) Compute Server
3) Large Database
4) File Server
5) Custom User Mix
END
while :
do
echo "If you do not know, type Q to exit and find the correct answer."
echo
echo $NNL "Enter benchmark mix (1, 2, 3, 4, 5 or Q) [] :$CCL"
read ANS
case "$ANS" in
1)
SUT_MIX="Multiuser/Shared System"
rm -f workfile
cp workfile.shared workfile
break
;;
2)
SUT_MIX="Compute Server"
rm -f workfile
cp workfile.compute workfile
break
;;
3)
SUT_MIX="Large Database"
rm -f workfile
cp workfile.dbase workfile
break
;;
4) SUT_MIX="File Server"
rm -f workfile
cp workfile.fserver workfile
break
;;
5)
echo $NNL "Enter mix filename: $CCL"
read ANS
case "$ANS" in
Q)
exit 0
;;
"")
break
;;
*)
SUT_MIX="Custom"
cp $ANS workfile
break
;;
esac
;;
Q)
exit 0
;;
*)
echo
echo "\"$ANS\" is not allowed ... ^G"
;;
esac
done
cat << END
----------
COMPILER
----------
Enter the name of the C compiler you wish to use for this run.
Please use BOTH upper and lower case, exactly as required by your
compiler.
END
echo $NNL "Enter compiler name [$CC] :$CCL"
read ANS
case "$ANS" in
Q)
exit 0
;;
"")
;;
*)
CC=$ANS
;;
esac
cat << END
----------------
COMPILER OPTIONS
----------------
Enter any compiler options that you want to use for $CC. Some examples
of valid entries are listed below:
"-O" to optimize code produced by "pcc" based compilers
"-OP" to do peephole optimization with the Pyramid OSx compiler
"-O -f68881" for optimization and floating point for Sun-3's
Please note that this benchmark is written in Ansi C and is POSIX
compliant. Some compilers have special flags for these options.
Please use BOTH upper and lower case, exactly as required by your
compiler.
You may type Q to exit and look up the correct answer.
END
echo $NNL "Enter compiler options [$DCCOPT] :$CCL"
read ANS
case "$ANS" in
Q)
exit 0
;;
"")
CCOPT=$DCCOPT
;;
*)
CCOPT=$ANS
;;
esac
LDOPT=
cat << END
--------------
LINKER OPTIONS
--------------
Are there any linker options that you should identify for the benchmark?
For information on the linker, refer to the Programmer's Reference Manual
for your system. You might identify a non-standard location of a library
or system specific libraries that are needed to build the benchmark.
For example, enter "-Wl,L/usr/local/lib" to search for libraries in
a "/usr/local/lib" directory.
Note that the benchmark requires that networking routines such as 'socket()'
be available. On some machines, an additional library such as -lsocket
will need to be specified. Check with your System Administrator or
consult your System manuals.
Again, use BOTH upper and lower case, exactly as required by your
compiler.
You may type Q to exit and look up the correct answer.
END
echo $NNL "Enter linker options [$LDOPT] :$CCL"
read ANS
case "$ANS" in
Q)
exit 0
;;
"")
;;
*)
LDOPT=$ANS
;;
esac
cat << END
------------
BOURNE SHELL
------------
You must specify the location of the Bourne shell executable on your
system. 'sh' is usually found in /bin. However, this may vary from
system to system. Check with your System Administrator or consult
your System manuals.
END
echo $NNL "Enter the path to 'sh' [$BSH] :$CCL"
read ANS
case "$ANS" in
Q)
exit 0
;;
"")
BSH=$BSH
;;
*)
BSH=$ANS
;;
esac
cat << END
----
DISK
----
A multiuser system is greatly affected by the performance of its I/O
subsystems. Your disk subsystem has a big impact on the benchmark results.
Generally, the more drives and controllers you have, the better your I/O
throughput will be. If you have configured your system with multiple disk
drives and would like the benchmark to use them to exercise your system, you
must list them in the "config" file.
For each installed drive that you would like the benchmark to use, enter a line
giving its mount point like the following example:
/disk1
Currently the benchmark can directly exercise up to 256 drives. If you are
ready, you may edit the "config" file now. The "config" file can be updated
anytime prior to starting the benchmark.
END
if [ -f config ]; then
echo "Currently, the config file contains:"
echo "------------------------------------"
cat config
echo "------------------------------------"
else
echo "The config file is currently empty, meaning the current"
echo "directory will be used for temporary file creation."
fi
echo
echo $NNL "Do you want to edit the \"config\" file now (y/n) ? [y] $CCL: "
read ANS
case "$ANS" in
n|N|no|NO)
;;
Q)
exit 0
;;
"")
vi config
;;
y|Y|yes|YES)
vi config
;;
esac
#only ask if creating 'input' file for AIM staff
#if test "$DOAPR" = "YES"
#then
#MAX_USERS=
#echo
#echo "---------------------"
#echo "MAX USERS TO SIMULATE"
#echo "---------------------"
#echo
#while :
# do
# echo
# echo $NNL "Enter the maximum number of tasks to be simulated [ex: 300]: $CCL"
# read MAX_USERS
# echo
# while :
# do
# echo "The maximum number of tasks to be simulated is $MAX_USERS."
# echo $NNL "Press Enter to accept press C to change: $CCL"
# read ANS
# case "$ANS" in
# "Q") exit 0;;
# "C") break;;
# "") break;;
# *) echo; echo "\"$ANS\" is not allowed ...." ;;
# esac
# done
# if test "$ANS" = ""
# then break;
# fi
#done
#fi # end of doapr loop
#
# create makefile
#
echo
echo $NNL "Creating \"Makefile\" ... $CCL"
rm -f Makefile
echo "# Copyright (c) 1996 - 2001 Caldera International, Inc." > Makefile
echo "# All Rights Reserved." >> Makefile
echo "#" >> Makefile
echo "CC=$CC" >> Makefile
echo "CCOPT=$CCOPT" >> Makefile
echo "LDOPT=-lm $LDOPT" >> Makefile
echo >> Makefile
echo "CFLAGS= \$(CCOPT)" >> Makefile
#
cat >> Makefile <<END
SRCS = add.c disk1.c div.c funcal.c mul.c \\
ram.c creat-clo.c disk_src.c int_fcns.c num_fcns.c pipe_test.c \\
fillin.c rand.c rtmsec.c
TASKS = add.o disk1.o div.o funcal.o mul.o \\
ram.o creat-clo.o disk_src.o int_fcns.o num_fcns.o pipe_test.o
OBJS = fillin.o rand.o rtmsec.o \$(TASKS)
# ugly but portable, even on (very) dumb makes..
.c.o: suite.h
\$(CC) \$(CFLAGS) -c \$*.c
all: multitask rpt
echo "#!$BSH/sh" > true
chmod +x true
multitask: multitask.o suite.h files.h \$(OBJS)
\$(CC) \$(CFLAGS) -o multitask multitask.o \$(OBJS) \$(LDOPT)
rpt: rpt.o
\$(CC) \$(CFLAGS) -o rpt rpt.o \$(LDOPT)
add.o : add.c suite.h
creat-clo.o : creat-clo.c suite.h
disk1.o : disk1.c suite.h
disk_src.o : disk_src.c suite.h
div.o : div.c suite.h
fillin.o : fillin.c suite.h
funcal.o : funcal.c suite.h funcal.h
mul.o : mul.c suite.h
multitask.o : multitask.c suite.h files.h
int_fcns.o : int_fcns.c suite.h
num_fcns.o : num_fcns.c suite.h
pipe_test.o : pipe_test.c suite.h
ram.o : ram.c suite.h
rand.o : rand.c suite.h
rtmsec.o : rtmsec.c suite.h testerr.h
clean newrun:
@echo "Resetting AIM Multiuser Benchmark - Suite VII for another run."
@rm -f tmp* core *.o
reset:
@echo "Resetting AIM Multiuser Benchmark - Suite VII to new install condition."
@rm -f workfile suite.ss logfile results
@rm -f input multitask nohup.out
@rm -f tmp* core *.o
@rm -rf fakeh
@cp Makefile.setup Makefile
END
cp Makefile Makefile.orig # for SAVE script
#
rm -f tmp* core *.o
if test "$DOAPR" = "FORGET IT"
then
USE_OLD_APRINFO=NO
if test -f ../save/APRINFO
then
NO_OLD_APRINFO=FALSE
echo "There is an APRINFO file in the ../save directory already."
while :
do
echo
echo "Use the information in that APRINFO file for this Suite 7 run (y/n)? [y]: $CCL"
read ANS
case "$ANS" in
Y|y)
USE_OLD_APRINFO=YES
break
;;
N|n)
USE_OLD_APRINFO=NO
break
;;
"")
USE_OLD_APRINFO=YES
break
;;
*)
echo
echo "\"$ANS\" is not allowed ...^G"
;;
esac
done
else
NO_OLD_APRINFO=TRUE
fi
if test "$USE_OLD_APRINFO" = "NO" -o "$NO_OLD_APRINFO" = "TRUE"
then
while :
do
echo
echo $NNL "Enter the name of the System Under Test [ex: MS8640]:$CCL"
read SUT_NAME
echo
while :
do
echo "The name of the System Under Test is $SUT_NAME."
echo $NNL "Press Enter to accept press C to change: $CCL"
read ANS
case "$ANS" in
"Q")
exit 0
;;
"C")
break
;;
"")
break
;;
*)
echo; echo "\"$ANS\" is not allowed ...."
;;
esac
done
if test "$ANS" = ""
then
break
fi
done
while :
do
echo
echo $NNL "Enter the price of the SUT as configured [ex: $77,568]:$CCL"
read SUT_PRICE
echo
while :
do
echo "The price of the SUT as configured is $SUT_PRICE."
echo $NNL "Press Enter to accept press C to change: $CCL"
read ANS
case "$ANS" in
"Q")
exit 0
;;
"C")
break
;;
"")
break
;;
*)
echo
echo "\"$ANS\" is not allowed ...."
;;
esac
done
if test "$ANS" = ""
then
break
fi
done
while :
do
echo
echo $NNL "Enter CPU type and number [ex: 88100(2)]:$CCL"
read SUT_CPU
echo
while :
do
echo "The CPU type and number is $SUT_CPU."
echo $NNL "Press Enter to accept press C to change: $CCL"
read ANS
case "$ANS" in
"Q") exit 0;;
"C") break;;
"") break;;
*) echo; echo "\"$ANS\" is not allowed ...." ;;
esac
done
if test "$ANS" = ""
then
break
fi
done
while :
do
echo
echo $NNL "Enter CPU clock rate [ex: 25 MHz]:$CCL"
read SUT_CLOCKRATE
echo
while :
do
echo "The CPU clock rate is $SUT_CLOCKRATE."
echo $NNL "Press Enter to accept press C to change: $CCL"
read ANS
case "$ANS" in
"Q")
exit 0
;;
"C")
break
;;
"")
break
;;
*)
echo
echo "\"$ANS\" is not allowed ...."
;;
esac
done
if test "$ANS" = ""
then break;
fi
done
while :
do
echo
echo $NNL "Enter 1st level cache size [ex: 32 KB data, 32 KB inst.]:$CCL"
read SUT_CACHE
echo
while :
do
echo "The 1st level cache size is $SUT_CACHE."
echo $NNL "Press Enter to accept press C to change: $CCL"
read ANS
case "$ANS" in
"Q")
exit 0
;;
"C")
break
;;
"")
break
;;
*)
echo
echo "\"$ANS\" is not allowed ...."
;;
esac
done
if test "$ANS" = ""
then
break;
fi
done
while :
do
echo
echo $NNL "Enter 2nd level cache size [ex: 4 MB]:$CCL"
read SUT_CACHE2
echo
while :
do
echo "The 2nd level cache size is $SUT_CACHE2."
echo $NNL "Press Enter to accept press C to change: $CCL"
read ANS
case "$ANS" in
"Q")
exit 0
;;
"C")
break
;;
"")
break
;;
*)
echo
echo "\"$ANS\" is not allowed ...."
;;
esac
done
if test "$ANS" = ""
then
break
fi
done
while :
do
echo
echo $NNL "Enter total amount of RAM installed [ex: 32 MB]:$CCL"
read SUT_RAM
echo
while :
do
echo "The size of the intalled RAM is $SUT_RAM."
echo $NNL "Press Enter to accept press C to change: $CCL"
read ANS
case "$ANS" in
"Q")
exit 0
;;
"C")
break
;;
"")
break
;;
*)
echo
echo "\"$ANS\" is not allowed ...."
;;
esac
done
if test "$ANS" = ""
then
break
fi
done
while :
do
echo
echo $NNL "Enter line 1 of information on installed disk drives [ex: 320MB, 11.2ms (2)]:$CCL"
read SUT_DLINE1
echo
while :
do
echo "Line 1 of the information on installed disks is:"
echo "$SUT_DLINE1"
echo $NNL "Press Enter to accept press C to change: $CCL"
read ANS
case "$ANS" in
"Q") exit 0;;
"C") break;;
"") break;;
*) echo; echo "\"$ANS\" is not allowed ...." ;;
esac
done
if test "$ANS" = ""
then
break
fi
done
while :
do
echo
echo $NNL "Enter line 2 of information on installed disk drives [ex: 320MB, 11.2ms (2)]:$CCL"
read SUT_DLINE2
echo
while :
do
echo "Line 2 of the information on installed disks is:"
echo "$SUT_DLINE2"
echo $NNL "Press Enter to accept press C to change: $CCL"
read ANS
case "$ANS" in
"Q")
exit 0
;;
"C")
break
;;
"")
break
;;
*)
echo
echo "\"$ANS\" is not allowed ...."
;;
esac
done
if test "$ANS" = ""
then break;
fi
done
while :
do
echo
echo $NNL "Enter any additional disk drives information:$CCL"
read SUT_DLINE3
echo
while :
do
echo "Additional disk drives information is:"
echo "$SUT_DLINE3"
echo $NNL "Press Enter to accept press C to change: $CCL"
read ANS
case "$ANS" in
"Q")
exit 0
;;
"C")
break
;;
"")
break
;;
*)
echo
echo "\"$ANS\" is not allowed ...."
;;
esac
done
if test "$ANS" = ""
then
break
fi
done
while :
do
echo
echo $NNL "Enter type and number of disk controllers [ex: SCSI(2)]:$CCL"
read SUT_DCTYPE
echo
while :
do
echo "The type and number of installed disk controller(s) is $SUT_DCTYPE."
echo $NNL "Press Enter to accept press C to change: $CCL"
read ANS
case "$ANS" in
"Q") exit 0;;
"C") break;;
"") break;;
*) echo; echo "\"$ANS\" is not allowed ...." ;;
esac
done
if test "$ANS" = ""
then
break
fi
done
while :
do
echo
echo $NNL "Enter amount of RAM reserved for I/O buffers [ex: 12MB or dynamic]:$CCL"
read SUT_IOBUFF
echo
while :
do
echo "The amount of RAM reserved for I/O buffering is $SUT_IOBUFF."
echo $NNL "Press Enter to accept press C to change: $CCL"
read ANS
case "$ANS" in
"Q")
exit 0
;;
"C")
break
;;
"")
break
;;
*)
echo
echo "\"$ANS\" is not allowed ...."
;;
esac
done
if test "$ANS" = ""
then break;
fi
done
while :
do
echo
echo $NNL "Enter OS name and version [ex: SYSTEM V/88 r32v2]:$CCL"
read SUT_OSNAME
echo
while :
do
echo "The name and version number of the OS is $SUT_OSNAME."
echo $NNL "Press Enter to accept press C to change: $CCL"
read ANS
case "$ANS" in
"Q")
exit 0
;;
"C")
break
;;
"")
break
;;
*)
echo
echo "\"$ANS\" is not allowed ...."
;;
esac
done
if test "$ANS" = ""
then
break
fi
done
while :
do
echo
echo $NNL "Enter File System type [ex: SYSTEM V enhanced]:$CCL"
read SUT_FS
echo
while :
do
echo "The type of the File System is $SUT_FS."
echo $NNL "Press Enter to accept press C to change: $CCL"
read ANS
case "$ANS" in
"Q")
exit 0
;;