|
|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 9216 (0x2400)
Types: TextFile
Names: »tdiscstat«
└─⟦667bb35d6⟧ Bits:30007480 RC8000 Dump tape fra HCØ.
└─⟦4334b4c0b⟧
└─⟦this⟧ »tdiscstat«
discstat version: 7 date: 21.02.78
begin
<* pej 09.02.78 discstat page 1
discstat
--------
the program extracts statistical information from a disc driver
and prints the information on current output.
example
-------
the following command extracts statistics about the disc to which
the disc driver process named 'disc2' is connected:
discstat disc.disc2
the following command creates the peripheral process
'disc2auto' on device 12:
discstat disc.disc2auto.12
call
----
1
discstat <s> disc.<drivername> <device>
0
<device>::= .<devicenumber>
function
--------
the program sends a message to the specified driver to
collect the statistics. the driver may be either a logical or
a physical disc driver - in either case the statistics concerns
the information created by a physical driver. please note that
the driver will reset its statistics when the information has
been collected.
if <device> is specified the program creates a peripheral
process named <drivername> to the device.
error messages
--------------
syntax
syntax error in call.
buffer claim exceeded
no message buffer available.
monitor result <result>
a normal answer was not received from the disc driver. <result>
is the result delivered in the answer to the message.
create <result>
not possible to create a peripheral process for a
reason given by <result>.
status error <status>
<status> is the (decimal) statusword received from
the disc driver.
*>
\f
<* pej 09.02.78 discstat page 2 *>
procedure write_disc_statistics(z,ra);
zone z ; <* output zone *>
real array ra ; <* disc driver statistics *>
begin
integer field accesses, errors, ecc_correc, rep_correc;
boolean field neg, pos, late, late_neg, late_pos, early,
early_neg, early_pos;
boolean array field magnitude;
boolean array field compound;
boolean array field detailed;
integer array field segments;
integer field segm_no;
boolean field in_ok, in_rep, out_ok, out_rep;
integer i;
boolean sp, nl;
sp:= false add 32; nl:= false add 10;
accesses:= 2; errors:= 4; ecc_correc:= 6; rep_correc:= 8;
neg:= 9; pos:= 10; late:= 12; late_neg:= 13; late_pos:= 14;
early:= 16; early_neg:= 17; early_pos:= 18;
magnitude:= 19; compound:= 34; detailed:= 58;
segments:= 82;
segm_no:= 2;
in_ok:= 3; in_rep:= 4; out_ok:= 5; out_rep:= 6;
\f
<* pej 09.02.78 discstat page 3 *>
write(z,<<ddddddd>,nl,3,
<:number of accesses:>,sp,17,ra.accesses,nl,3,
<:errors in first attempt:>,sp,12,ra.errors,nl,1,
<:errors corrected solely by ecc:>,sp,5,ra.ecc_correc,nl,1,
<:errors corrected within 3 retries:>,sp,2,ra.rep_correc,nl,3);
write(z,<<dddd>,
<:errors corrected by::>,nl,1,
<: neg offset:>,sp,17,ra.neg extract 12,nl,1,
<: pos offset:>,sp,17,ra.pos extract 12,nl,1,
sp,15,<:late strobe:>,sp,3,ra.late extract 12,nl,1,
<: neg offset + late strobe:>,sp,3,ra.late_neg extract 12,nl,1,
<: pos offset + late strobe:>,sp,3,ra.late_pos extract 12,nl,1,
sp,15,<:early strobe:>,sp,2,ra.early extract 12,nl,1,
<: neg offset + early strobe:>,sp,2,ra.early_neg extract 12,nl,1,
<: pos offset + early strobe:>,sp,2,ra.early_pos extract 12,nl,3);
write(z,
<:errors corrected by offset magnitude::>,nl,1,
<: -01- -02- -03- -04- -05- -06- -07- :>,
<:-08- -09- -10- -11- -12- -13- -14- -15-:>,nl,1,sp,2);
for i:= 1 step 1 until 15 do
write(z,<<dddd>,ra.magnitude(i) extract 12,sp,1);
write(z,nl,3,
<:occurrencies of::>,nl,1);
for i:= 7,8,12,9,10,11, <* curr status *>
1,2,4,5,6,21,22,23,24, <* event status *>
20,19,18,17,16,15,14 do <* i/o result *>
write(out,case i of (
<: event status bit 0 intervention :>,
<: 1 data error (parity) :>,
<::>,
<: 3 data overrun :>,
<: 4 hard error :>,
<: 5 position error :>,
<: curr status bit 0 power low :>,
<: 1 local :>,
<: 8 write protect :>,
<: 9 high density :>,
<: 10 mode :>,
<: 5 seek error :>,
<::>,
<: 6 power restart :>,
<: 5 wait progr. termination :>,
<: 4 abnorm. termination :>,
<: 3 software timeout :>,
<: 2 bus timeout :>,
<: 1 bus reject :>,
<: i/o result 0 normal termination :>,
<: 20 bus communication error :>,
<: 21 interrupt error :>,
<: 22 bus timeout :>,
<: 23 bus parity error :>),
<<dddd>,ra.compound(i) extract 12,nl,1);
\f
<* pej 09.02.78 discstat page 5 *>
write(z,nl,2,
<:occurrencies of detailed statusbit::>,nl,1,
<: -00- -01- -02- -03- -04- -05- -06- -07- -08- -09- -10- -11-:>,
nl,1,sp,2);
for i:= 1 step 1 until 12 do
write(z,<<dddd>,ra.detailed(i) extract 12,sp,1);
write(z,nl,2,
<: -12- -13- -14- -15- -16- -17- -18- -19- -20- -21- -22- -23-:>,
nl,1,sp,2);
for i:= 13 step 1 until 24 do
write(z,<<dddd>,ra.detailed(i) extract 12,sp,1);
if ra.segments.segm_no <> -1 then
begin
write(z,nl,3,
<:segment successful input op. successful output op.:>,
nl,1,
<:number input op. with rep. output op. with rep.:>,
nl,1);
for segments:= 82 step 6 until 136 do
if ra.segments.segm_no = -1
then segments:= 137
else
write(z,
sp,1,<<dddddd>,ra.segments.segm_no,
sp,6,<<dddd>,ra.segments.in_ok extract 12,
sp,8,ra.segments.in_rep extract 12,
sp,9,ra.segments.out_ok extract 12,
sp,9,ra.segments.out_rep extract 12,nl,1);
end
else
write(z,nl,3,<:no error segments detected:>,nl,1);
end;
\f
<* pej 09.02.78 discstat page 6 *>
integer statistics_length;
statistics_length:= 142; <* no of bytes *>
begin
zone z(statistics_length,1,stderror);
integer array ia(1:20);
integer i,i1, base_buffer_area;
real array discname(1:2), ra(1:2);
real time, r;
if system(4,2,discname) <> 8 shift 12 add 10
then write(out,<:<10>*** discstat: syntax:>)
else
begin
systime(1,0,time);
i:= 1;
write(out,<:<10><10>disc statistics, disc: :>,
string discname(increase(i)),<: date: :>,<<dd dd dd>,
systime(4,time,r),<: time: :>,r,<:<10>:>,
false add 45,76,<:<10>:>);
i:= 1;
open(z,0,string discname(increase(i)),0);
if system(4,3,ra) = 8 shift 12 add 4 then
begin
i:= ra(1);
i:= monitor(54)create_peripheral:(z,i,ia);
end
else i:= 0;
if i <> 0 and i <> 3
then write(out,<:<10>*** discstat: create, :>,
case i of (
<:function forbidden in calling process:>,
<:calling proc not user; catalog i/o error:>,
<:name conflict:>,
<:device no does not exist:>,
<:device is reserved by another user:>,
<:name format illegal:>))
else
begin
getzone6(z,ia);
base_buffer_area:= ia(19);
ia(14):= base_buffer_area; <* record base *>
ia(16):= statistics_length; <* record length *>
setzone6(z,ia);
getshare6(z,ia,1);
ia(4):= 9 shift 12; <* operation *>
ia(5):= base_buffer_area + 1; <* firstaddr *>
ia(6):= ia(5) + statistics_length - 2; <* lastaddr *>
setshare6(z,ia,1);
if 0 = monitor(16)send_message:(z,1,ia)
then write(out,<:<10>*** discstat: buffer claim exceeded:>)
else
begin
i:= monitor(18)wait_answer:(z,1,ia);
if i <> 1
then write(out,<:<10>*** discstat: monitor result, :>,
case i - 1 of (
<:message rejected:>,
<:message unintelligible:>,
<:receiver malfunction:>,
<:receiver does not exist:>))
else
if ia(1) <> 0
then write(out,<:<10> discstat: status error, :>,ia(1))
else
begin
write_disc_statistics(out,z);
write(out,<:<10>:>);
for i:= 5, 6, 7 do
begin
write(out,<:<10>:>,case i-4 of (
<:latest sensed curr status :>,
<: event status :>,
<: detailed status:>),<: :>);
for i1:= -23 step 1 until 0 do
write(out,if ia(i) shift i1 extract 1 = 0
then <:.:> else <:1:>);
end;
end;
end;
end;
end;
write(out,<:<10><10><10><10>:>);
end;
end;
▶EOF◀