*DECK CSESES USETEXT TEXTOV USETEXT TEXTCS USETEXT TEXTSS USETEXT TXTAPSS USETEXT TXTSMCS PROC CSESES; # TITLE - SEND ELEMENT STATISTICS. # BEGIN # ** CSESES - SEND ELEMENT STATISTICS. * * D.K. ENDO 82/03/30 * * THIS PROCEDURE FORMATS STATISTICS INFORMATION FROM THE INCOMING * SM. IT THEN SENDS IT OUT TO THE SYSTEM ACCOUNT FILES. * FOR STI/NP/U, CHECK FOR CPU AND BUFFER THRESHOLD. * IF EXCEEDED, SEND ALM/OP SM. * * PROC CSESES * * ENTRY 1. STI/NP/U, STI/TR/U, OR STI/LI/U SM FROM THE EVENT * QUEUE. * * EXIT 1. STATISTICS INFO SENT TO THE SYSTEM ACCOUNT FILES. * 2. ALM/OP SM SENT TO * EVQ* . * * * ACCOUNT DAYFILE MESSAGE FORMATS: * * *SCLI, NODE, C1, PORT, TTTTTTLLLLLL. * *SCLI, NODE, C2, SSSSSSCCCCCC. * *SCLI, NODE, C3, BBBBBBPPPPPPAAAAAA. * NUMBER OF BLOCKS AND CHARACTERS TRANSMITTED AND * RECEIVED ON NODE NUMBER *NODE* AND LINE NUMBER * *PORT*. ALSO NUMBER OF PAD AND A-A REJECTS. * * *SCNQ, NODE, C1, CCCCCCDDDDDDLLLLLL. * *SCNQ, NODE, C2, GGGGGGRRRRRRSSSSSS. * *SCNQ, NODE, C3, PPPPPPIIIIIINNNNNN. * *SCNQ, NODE, C4, WWWWWW. * VARIOUS STATISTICS FOR NODE NUMBER *NODE*. * * *SCTU, NODE, C1, PORT, TTTTTTLLLLLL. * *SCTU, NODE, C2, SSSSSSCCCCCC. * *SCTU, NODE, C3, BBBBBB. * NUMBER OF BLOCKS AND CHARACTERS TRANSMITTED AND * RECEIVED ON NODE NUMBER *NODE* AND PORT NUMBER * *PORT*. * # # **** PROC CSESES - XREF LIST BEGINS. # XREF BEGIN PROC MESSAGE; # SEND TEXT TO SYSTEM ACCOUNT FILE # PROC SSBEBF; # EXTRACT BIT FIELD # PROC SSBSBF; # STORE BIT FIELD # PROC SSTAQE; # ACCEPT A QUEUE ENTRY # FUNC SSDCDA U; # CONVERT DISPLAY CODE TO ASCII # FUNC XCDD U; # CONVERT DECIMAL INTEGER TO DISPLAY CODE # FUNC XCHD U; # CONVERT HEX INTEGER TO DISPLAY CODE # END # **** # DEF ACCT # 5 #; # IDENTIFIER FOR ACCOUNT FILE # DEF ERRLOG # 4 #; # IDENTIFIER FOR ERROR LOG FILE # ITEM CNST1; # CONSTANT ---> 1 # ITEM CNST2; # CONSTANT ---> 2 # ITEM CNST3; # CONSTANT ---> 3 # ITEM I; # LOOP INDUCTION VARIABLE # ITEM ITEMP U; # UNSIGNED INTEGER TEMPORARY # ITEM LEN U; # LENGTH OF TEXT # ITEM NP U; # NPUCB INDEX # # THIS ARRAY DEFINES THE STATISTICS TEXT FORMAT THAT IS SENT WHEN THIS PROC IS INVOKED. # ARRAY ELS$TXT [00:00] S(4); BEGIN ITEM ELS$SC C(00,00,02) = ["SC"]; ITEM ELS$TYP C(00,12,02); ITEM ELS$C1 C(00,24,02) = [", "]; ITEM ELS$SN U(00,36,24); ITEM ELS$C2 C(01,00,03) = [", C"]; ITEM ELS$CNUM C(01,18,01); ITEM ELS$C3 C(01,24,02) = [", "]; ITEM ELS$PRM1 C(01,36,06); ITEM ELS$P U(01,36,24); ITEM ELS$C4 C(02,00,02); ITEM ELS$PRM2 U(02,12,36); ITEM ELS$P1 C(02,48,01); ITEM ELS$ZBYT11 U(02,54,06); ITEM ELS$ZBYT12 U(03,00,12); ITEM ELS$PRM3 C(02,48,06); ITEM ELS$PER C(03,24,01) = ["."]; ITEM ELS$ZBYT U(03,30,30) = [ 0 ]; END # THIS ARRAY DEFINES THE SECOND BUFFER WHICH ONLY CONTAINS ONE PARAMETER. # ARRAY ES1$TXT [00:00] S(3); BEGIN ITEM ES1$SC C(00,00,02) = ["SC"]; ITEM ES1$TYP C(00,12,02); ITEM ES1$C1 C(00,24,02) = [", "]; ITEM ES1$SN U(00,36,24); ITEM ES1$C2 C(01,00,03) = [", C"]; ITEM ES1$CNUM C(01,18,01); ITEM ES1$C3 C(01,24,02) = [", "]; ITEM ES1$PRM1 C(01,36,06); ITEM ES1$PER C(02,12,01) = ["."]; ITEM ES1$ZBYT U(02,18,42) = [0]; END # * THE FOLLOWING ARRAY DEFINES THE TEXT PORTION OF CPU UTILIZATION * ALARM MESSAGE. # ARRAY CPUMSG [00:00] S(3); BEGIN ITEM CPU$MSG C(00,00,22) = ["CPU THRESHOLD EXCEEDED"]; END # * THE FOLLOWING ARRAY DEFINES THE BUFFER AVAILABILITY ALARM MESSAGE. # ARRAY BUFMSG [00:00] S(3); BEGIN ITEM BUF$MSG C(00,00,25) = ["BUFFER THRESHOLD EXCEEDED"]; END # * THE FOLLOWING BASED ARRAY IS FOR GENERAL PURPOSE USAGE. # BASED ARRAY GENPBUF[00:00] S(1);; CONTROL EJECT; # # # CSESES CODE BEGINS HERE # # # # * CONVERT THE SOURCE NODE I.D. AND APPEND IT TO THE TEXT. # ELS$SN[0] = XCDD(ABHSN[0] ); # * IF THIS SM IS STI/NP/U, THEN CONVERT THE MG, MP, AND MB VALUES TO * DISPLAY CODE AND APPEND THEM TO THE MESSAGE TEXT. SEND THE TEXT * TO THE ACCOUNT FILE. CONVERT THE BD, BF, AND L3 VALUES AND APPEND * THEM TO THE TEXT. SEND THE MESSAGE OUT TO THE ACCOUNT FILE. * CONVERT THE L2, L1, AND L0 VALUES AND APPEND THEM TO THE TEXT. * SEND THE MESSAGE OFF TO THE ACCOUNT FILE. # IF WCB$SMID[0] EQ SMID"STINP" THEN BEGIN ELS$TYP[0] = "NQ"; ELS$CNUM[0] = "1"; ITEMP = XCDD(STIMG[0]); CNST1 = 1; CNST2 = 36; CNST3 = 36; SSBSBF(ELS$TXT,CNST1,CNST2,CNST3,ITEMP); ELS$PRM2[0] = XCDD(STIMP[0]); ITEMP = 0; B<44,12>ITEMP = STIMB1[0]; B<56,4>ITEMP = STIMB2[0]; ITEMP = XCDD(ITEMP); CNST1 = 2; CNST2 = 48; CNST3 = 36; SSBSBF(ELS$TXT,CNST1,CNST2,CNST3,ITEMP); MESSAGE(ELS$TXT,ACCT); MESSAGE(ELS$TXT,ERRLOG); ELS$CNUM[0] = "2"; ITEMP = XCDD(STIBD[0]); CNST1 = 1; CNST2 = 36; CNST3 = 36; SSBSBF(ELS$TXT,CNST1,CNST2,CNST3,ITEMP); ELS$PRM2[0] = XCDD(STIBF[0]); ITEMP = XCDD(STIL3[0]); CNST1 = 2; CNST2 = 48; CNST3 = 36; SSBSBF(ELS$TXT,CNST1,CNST2,CNST3,ITEMP); MESSAGE(ELS$TXT,ACCT); MESSAGE(ELS$TXT,ERRLOG); ELS$CNUM[0] = "3"; ITEMP = 0; B<44,8>ITEMP = STIL21[0]; B<52,8>ITEMP = STIL22[0]; ITEMP = XCDD(ITEMP); CNST1 = 1; CNST2 = 36; CNST3 = 36; SSBSBF(ELS$TXT,CNST1,CNST2,CNST3,ITEMP); ELS$PRM2[0] = XCDD(STIL1[0]); ITEMP = XCDD(STIL0[0]); CNST1 = 2; CNST2 = 48; CNST3 = 36; SSBSBF(ELS$TXT,CNST1,CNST2,CNST3,ITEMP); MESSAGE(ELS$TXT,ACCT); MESSAGE(ELS$TXT,ERRLOG); ES1$TYP[0] = ELS$TYP[0]; ES1$SN[0] = ELS$SN[0]; ES1$CNUM[0] = "4"; ITEMP = XCDD(STIAW[0]); CNST1 = 1; CNST2 = 36; CNST3 = 36; SSBSBF(ES1$TXT,CNST1,CNST2,CNST3,ITEMP); MESSAGE(ES1$TXT,ACCT); MESSAGE(ES1$TXT,ERRLOG); # * SEARCH THE *NPUCBS* FOR THE NPU. IF NOT FOUND, IGNORE THE SM. * IF FOUND, CHECK FOR CPU AND BUFFER THRESHOLD, AND * SEND THE APPROPRIATE ALARM MESSAGE(S) TO THE *EVQ* IF NECESSARY. # FOR I = 0 STEP 1 WHILE (ABHSN[0] NQ NPU$NID[I]) AND (I LS CSNPCNT) DO BEGIN END NP = I; IF NP GQ CSNPCNT THEN BEGIN GOTO EXIT; END IF NPU$CP[NP] NQ DEFCP$ THEN BEGIN # CP NOT DEFAULT VALUE # IF STIMG[0] GR (NPU$CP[NP] * 10) THEN BEGIN # CP IN STI/NP GR CP VALUE # P = LOC(CPUMSG[0]); # SEND ALM/OP SM # LEN = 22; CONVERT; END END IF NPU$BU[NP] NQ DEFBU$ THEN BEGIN # BU IN STI/NP GR BU VALUE # IF STIMP[0] LS NPU$BU[NP] THEN BEGIN # BU IN STI/NP GR BU VALUE # P = LOC(BUFMSG[0]); # SEND ALM/OP SM # LEN = 25; CONVERT; END END END # * IF THIS SM IS STI/TR/U OR STI/LI/U, THEN CONVERT THE PORT AND * APPEND IT TO THE TEXT. IF THIS SM IS STI/LI/U, SET THE SUB-PORT * VALUE TO ZERO, ELSE SEARCH THE PHYSICAL LINK XREF TABLE FOR THE * NODE AT THE OTHER END OF TRUNK, IF FOUND, SAVE THE NODE I.D., ELSE * SET IT TO ZERO. CONVERT THE SUB-PORT OR NODE I.D. AND APPEND IT * TO THE TEXT. CONVERT THE BT VALUE AND APPEND IT TO THE TEXT. SEND * THE MESSAGE TO THE ACCOUNT FILE. CONVERT THE BR, CT, AND CR VALUE * AND APPEND THEM TO THE TEXT. SEND THE MESSAGE TO THE ACCOUNT * FILE. CONVERT THE BB VALUE AND APPEND IT TO THE TEXT. SEND THE * TEXT TO THE ACCOUNT FILE. # ELSE BEGIN IF WCB$SMID[0] EQ SMID"STILI" THEN BEGIN ELS$TYP[0] = "LI"; ITEMP = 0; END ELSE BEGIN ELS$TYP[0] = "TU"; END ELS$CNUM[0] = "1"; ELS$P[0] = XCHD(STIP[0]); ELS$C4[0] = ", "; ELS$PRM2[0] = XCDD(STIBT[0]); ITEMP = 0; B<44,12>ITEMP = STIBR1[0]; B<56,4>ITEMP = STIBR2[0]; ITEMP = XCDD(ITEMP); CNST1 = 2; CNST2 = 48; CNST3 = 36; SSBSBF(ELS$TXT,CNST1,CNST2,CNST3,ITEMP); MESSAGE(ELS$TXT,ACCT); MESSAGE(ELS$TXT,ERRLOG); ELS$CNUM[0] = "2"; ITEMP = XCDD(STICT[0]); CNST1 = 1; CNST2 = 36; CNST3 = 36; SSBSBF(ELS$TXT,CNST1,CNST2,CNST3,ITEMP); ELS$PRM2[0] = XCDD(STICR[0]); ELS$P1[0] = "."; ELS$ZBYT11[0] = 0; ELS$ZBYT12[0] = 0; MESSAGE(ELS$TXT,ACCT); MESSAGE(ELS$TXT,ERRLOG); IF WCB$SMID[0] EQ SMID"STILI" THEN BEGIN # PROCESS SCLI C3 TEXT # ELS$CNUM[0] = "3"; ITEMP = XCDD(STIBB[0]); # CONVERT NO. BAD BLKS TRANSMITTED# CNST1 = 1; # WORD ORDINAL OF BITFIELD # CNST2 = 36; # STARTING BIT POSITION # CNST3 = 36; # NO. OF BITS TO STORE # SSBSBF(ELS$TXT,CNST1,CNST2,CNST3,ITEMP); # STORE BITFIELD # ITEMP = 0; B<44,8>ITEMP = STIRP1[0]; B<52,8>ITEMP = STIRP2[0]; ELS$PRM2[0] = XCDD(ITEMP); # CONVERT NO. PAD REJECTS # ITEMP = XCDD(STIRA[0]); # CONVERT NO. A-A REJECTS # CNST1 = 2; # WORD ORDINAL OF BITFIELD # CNST2 = 48; # STARTING BIT POSITION # CNST3 = 36; # NO. OF BITS TO STORE # SSBSBF(ELS$TXT,CNST1,CNST2,CNST3,ITEMP); # STORE BITFIELD # MESSAGE(ELS$TXT,ACCT); # SEND TEXT TO ACCOUNT FILE # MESSAGE(ELS$TXT,ERRLOG); # SEND TEXT TO ERRLOG FILE # END # PROCESS SCLI C3 TEXT # ELSE BEGIN # PROCESS SCTU C3 TEXT # ES1$TYP[0] = ELS$TYP[0]; # MOVE *TU* TO TEXT ARRAY # ES1$SN[0] = ELS$SN[0]; # MOVE SOURCE NODE TO TEXT ARRAY # ES1$CNUM[0] = "3"; ITEMP = XCDD(STIBB[0]); # CONVERT NO. BAD BLKS TRANS # CNST1 = 1; # WORD ORDINAL OF BITFIELD # CNST2 = 36; # STARTING BITPOSITION # CNST3 = 36; # NO. OF BITS TO STORE # SSBSBF(ES1$TXT,CNST1,CNST2,CNST3,ITEMP); # STORE BITFIELD # MESSAGE(ES1$TXT,ACCT); # SEND TEXT TO ACCOUNT FILE # MESSAGE(ES1$TXT,ERRLOG); # SEND TEXT TO ERRLOG FILE # END # PROCESS SCTU C3 TEXT # END EXIT: RETURN; # **** RETURN **** # CONTROL EJECT; PROC CONVERT; # TITLE CONVERT - CONVERTS DISPLAY CODE TEXT TO ASCII. # BEGIN # CONVERT # # ** CONVERT - CONVERTS DISPLAY CODE TEXT TO ASCII. * * A. LIM 83/02/24 * * THIS PROCEDURE IS INTERNAL TO *CSESES* AND IS ONLY CALLED BY * *CSESES*. ITS MAIN FUNCTION IS TO CONVERT DISPLAY CODE TEXT * TO ASCII AND STORE IT INTO TEXT PORTION OF AN ALM/OP SM ( WITH * PFC/SFS, PORT AND SUBPORT PRESET TO ZERO). THEN THE SM IS * SENT TO THE *EVQ*. * * PROC CONVERT * * ENTRY: TEXT IN AREA POINTED TO BY *GENPBUF* * LEN = LENGTH IN CHARACTERS OF TEXT * * EXIT: TEXT CONVERTED TO ASCII, AND AN ALM/OP SENT TO *EVQ* * # ITEM CHAR U; # CHARACTER # ITEM I U; # LOOP INDUCTION VAR # ITEM EBIT U; # STARTING BIT OF EXTRACTION # ITEM EORD U; # STARTING WORD OF EXTRACTION # ITEM SBIT U; # STARTING BIT OF STORING # ITEM SORD U; # STARTING WORD OF STORING # # * CLEAR BUFFER AREAS. # WCB$WORD[1] = 0; ABHWORD[1] = 0; FOR I = (NMSGBUF$ + 1)/2 STEP 1 UNTIL NMSGBUF$ DO BEGIN MSG$WORD[I] = 0; # CLEAR 2ND HALF OF *MSGBUF* # END # * INITIALIZE INDICES. # EBIT = 0; EORD = 0; SBIT = 32; SORD = 0; # * CONVERT MESSAGE INTO ASCII AND STORE IT INTO THE TEXT PORTION OF * AN ALM/OP SM. # FOR I = 0 STEP 1 UNTIL LEN-1 DO BEGIN SSBEBF(GENPBUF[0],EORD,EBIT,6,CHAR); # EXTRACT A CHAR # CHAR = SSDCDA(CHAR); # CONVERT IT TO ASCII # SSBSBF(CSSM[1],SORD,SBIT,8,CHAR); # STORE IT IN ALM/OP # END # * BUILD ABH, WC AND SEND SM TO *EVQ*. # ABHSN[1] = ABHSN[0]; ABHTLC[1] = 4 + LEN; # PFC + SFC + P + SP + TEXT # WCB$SMID[1] = SMID"ALMOP"; WCB$WC[1] = (((ABHTLC[1]*8)+59)/60) + 2; SSTAQE(P, WCBUF[1], ABH[1], CSSM[1]); END # CONVERT # END # CSESES # TERM