! Timestamp log giving operational statistics. ! We get kicked by the datestamp routine if a pre-determined interval ! of time has elapsed. Note that this means that we don't get called ! %every 10 minutes (or whatever), but only if somebody is transacting ! with the system. %option "-nocheck-nostack-low" %include "Config.Inc" %include "System:Common" %include "System:Schedule.Inc" %include "System:Utility.Inc" %externalrecord(common fm)%mapspec common area %externalintegerspec disc high water %externalintegerspec disc cache hits %externalintegerspec disc cache misses %externalintegerspec disc cache forgets %externalroutine stamp main entry %conststring(3)%array stat(1 : last stat) = "FR", "FW", "DR", "DW", "DE", "ER", "EW", "EE", "OO", "EO", "LO" %constinteger last printed = last stat - 3 %record(common fm)%name common %integer i, comma, count common == common area %cycle wait for(stamp flag) comma = 0 pdate %for i = 1, 1, last printed %cycle %if common_monitor_s(i) # 0 %start printstring(", ") %if comma # 0 comma = 1 write(common_monitor_s(i), 0) space printstring(stat(i)) %finish %repeat common_monitor = 0 printstring(", ") %if comma # 0 comma = 1 write(common_buffer pool used, 0) printstring(" BHW, ") write(disc high water, 0); disc high water = 0 printstring(" DHW, ") write(disc cache hits, 0); disc cache hits = 0 printstring(" DCH, ") write(disc cache misses, 0); disc cache misses = 0 printstring(" DCM, ") write(disc cache forgets, 0); disc cache forgets = 0 printstring(" DCF, ") count = 0 %for i = 0, 1, Unos %cycle count = count + 1 %if common_Uno(i)_l owner # 0 %repeat write(count, 0) printstring(" U") count = 0 %for i = 1, 1, Xnos %cycle count = count + 1 %if common_Xno(i)_Uno >= 0 %repeat %if count # 0 %start printstring(", ") write(count, 0) printstring(" X") %finish count = 0 %for i = 1, 1, ports %cycle count = count + 1 %if common_port info(i)_state # 0 %repeat %if count # 0 %start printstring(", ") write(count, 0) printstring(" P") %finish newline %repeat %end %end %of %file