source: WorldVistAEHR/trunk/r/TOOLKIT-AWCM-XD-XIN-XPAR-XQAB-XT-XUC-XUR-ZIN-ZTED/XUCSXCD.m@ 862

Last change on this file since 862 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.5 KB
Line 
1XUCSXCD ;SFISC/HVB - CROSS-SITE CPU,DISK,RT for 486 SITES ;2/18/96 15:05
2 ;;7.3;TOOLKIT;**14**;Dec 15, 1995
3A Q:'$$CHKF^XUCSUTL S U="^" S:'$D(DT) DT=$$HTFM^XLFDT($H,1)
4 S XUCSEND=0 D A3^XUCSUTL3 G XIT:XUCSEND
5 S %ZIS="Q" D ^%ZIS I POP S POP=0 G XIT
6 I $D(IO("Q")) D G XIT
7 . S ZTSAVE("XUCS*")="",ZTRTN="DQ^XUCSXCD",ZTDESC="MPM X-SITE CPU,DISK,RT REPORT",ZTIO=ION
8 . S %DT="AEFRX",%DT("A")="Queue for what DATE/TIME? ",%DT("B")="NOW",%DT(0)="NOW" D ^%DT K %DT
9 . I +Y'<0 S ZTDTH=Y D ^%ZTLOAD,HOME^%ZIS
10 . K IO("Q")
11 U IO W:$E(IOST)="C" #
12DQ ; Dequeue entry point
13 K CD,RT S X=0 F S X=$O(^XUCS(8987.2,X)) Q:X]"@"!(X="") S NODE=^(X,0) D:$D(^XUCS(8987.2,X))>1
14 . S FMDT=XUCSBD F S FMDT=$O(^XUCS(8987.2,"C",FMDT)) Q:FMDT="" Q:$D(^(FMDT,X))
15 . Q:FMDT="" S Y=$O(^XUCS(8987.2,"C",FMDT,X,0))-1
16 . F S Y=$O(^XUCS(8987.2,X,1,Y)) Q:Y]"@"!(Y="") S FMDT=^(Y,0) Q:FMDT>(XUCSED+.24) D:FMDT>XUCSBD&($D(^(5))>1)
17 . . I $E($P(FMDT,".",2),1,2)<12,XUCSRT="P" Q
18 . . I $E($P(FMDT,".",2),1,2)>11,XUCSRT="A" Q
19 . . F I=1:1:17 S $P(RT(NODE),"^",I)=$P($G(RT(NODE)),"^",I)+$P(^XUCS(8987.2,X,1,Y,5,I,0),"^",3)
20 . . S ET=^XUCS(8987.2,X,1,Y,0),RDT=$P(ET,"^"),ET=$P(ET,"^",3)
21 . . S X1=0 F S X1=$O(^XUCS(8987.2,X,1,Y,6,X1)) Q:+X1<1 S X0=^(+X1,0) D
22 . . . S $P(CD(NODE),"^",5)=$P($G(CD(NODE)),"^",5)+1
23 . . . F I=1:1:4 S $P(CD(NODE),"^",I)=$P(CD(NODE),"^",I)+$P(X0,"^",I+1)
24P S Y=XUCSBD D DD^%DT S BD=Y,Y=XUCSED D DD^%DT S ED=Y D HDR
25 S (NODE,OSITE)="" F S NODE=$O(CD(NODE)) Q:NODE="" S Y=CD(NODE) D
26 . S SITE=$E(NODE,1,3) D:SITE'=OSITE&(OSITE]"") PRINT S OSITE=SITE,T=$E(NODE,4,5),@T=$G(@T)+1
27 . S (J,SEET,SUM)=0 I T="CS" F M=0.3,1.4,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,15,25 S J=J+1,CNT=$P(RT(NODE),"^",J),SEET=SEET+(CNT*M),SUM=SUM+CNT
28 . S S=+Y,TYPE(@T,T)=NODE_$J($P(Y,"^",2)/S*100,6,1)_$J($P(Y,"^",3)/S*100,6,1)_$J($P(Y,"^",4)/$P(Y,"^",5),4,0)_$S(T="CS"&SUM:$J(SEET/SUM,6,2),T="CS":" ",1:"")
29PRINT Q:'$D(^DIC(4,OSITE,0)) D:$Y>(IOSL-7) HFF W !?1,$P(^DIC(4,OSITE,0),"^")
30 S STR="" F I=1:1 S $E(STR,1,29)=$J($G(TYPE(I,"CS")),29),$E(STR,30,53)=$J($G(TYPE(I,"FS")),24),$E(STR,54,77)=$J($G(TYPE(I,"PS")),24) Q:STR?1."" W !,STR Q:'$D(TYPE(I+1))
31 S (CS,FS,PS)=0 K TYPE W ! G XIT:NODE=""
32 Q
33XIT I $E($G(IOST))'="C",'$D(ZTQUEUED) D ^%ZISC
34 K BD,CD,CNT,CS,ED,ET,FMDT,FS,I,J,M,NODE,OSITE,PS,RDT,RT,S,SEET,SITE
35 K STR,SUM,T,TYPE,X,X0,X1,XUCSBD,XUCSED,XUCSEND,XUCSRT,Y
36 Q
37HFF W #
38HDR W ?3,"MPM Cross-site Performance Report for ",BD," to ",ED," (",$S(XUCSRT="A":"AM)",XUCSRT="P":"PM)",1:"AM&PM)")
39 W ! F I=1:1:3 W " Node CPU Disk Jobs" W:I=1 " RT "
40 W !?1 F I=1:1:77 W "="
41 W ! Q
Note: See TracBrowser for help on using the repository browser.