source: FOIAVistA/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XUTMTZ3.m@ 1765

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

initial load of FOIAVistA 6/30/08 version

File size: 3.4 KB
Line 
1XUTMTZ3 ;SEA/RDS - TaskMan: Toolkit, troubleshooting, part 4 ;6/25/91 15:20 ;
2 ;;8.0;KERNEL;;Jul 10, 1995
3 ;
4HERE ;REPORT--log errors by count for this cpu
5 S ZTV=^%ZOSF("VOL"),ZT1=0 W !,ZTV
6 F ZT=0:0 S ZT1=$O(^%ZTER(1,ZT1)),ZT2=0 Q:'ZT1 F ZT=0:0 S ZT2=$O(^%ZTER(1,ZT1,1,ZT2)) Q:'ZT2 I $D(^(ZT2,"ZE"))#2 S ZTE=$E($TR(^("ZE"),ZTRANSLT,""),1,40) I ZTE]"" D LOG
7 Q
8 ;
9OTHERS ;REPORT--find other cpus, lookup mgr accounts, compute for each
10 S ZTV="" F ZT=0:0 S ZTV=$O(^%ZIS(14.5,"B",ZTV)) Q:ZTV="" I ZTV'=^%ZOSF("VOL") S ZTN=$O(^%ZIS(14.5,"B",ZTV,"")) I ZTN]"",$D(^%ZIS(14.5,ZTN,0))#2 S ZTS=^(0) S ZTM=$P(ZTS,"^",6) I ZTM]"" D THERE
11 Q
12 ;
13THERE ;OTHERS--log errors by count for other cpus
14 I $P(ZTS,"^",3)="N" Q
15 I $P(ZTS,"^",4)="Y" Q
16 W !,ZTV S ZT1=0
17 F ZT=0:0 S ZT1=$O(^[ZTM,ZTV]%ZTER(1,ZT1)),ZT2=0 Q:'ZT1 F ZT=0:0 S ZT2=$O(^[ZTM,ZTV]%ZTER(1,ZT1,1,ZT2)) Q:'ZT2 I $D(^(ZT2,"ZE"))#2 S ZTE=$E($TR(^("ZE"),ZTRANSLT,""),1,40) I ZTE]"" D LOG
18 Q
19 ;
20LOG ;HERE & THERE--log totals entry and dailies entry
21 I ZTDAY,$H-ZT1<ZTNUMBER S X=$S($D(^TMP($J,"D",1,ZT1,ZTE))#2:^(ZTE),1:"0^,"),Y=$P(X,"^",2),X=X+1,^(ZTE)=X_"^"_Y_$S(Y[(","_ZTV_","):"",1:ZTV_",")
22 I ZTCOUNT S X=$S($D(^TMP($J,"T",1,ZTE))#2:^(ZTE),1:"0^,"),Y=$P(X,"^",2),X=X+1,^(ZTE)=X_"^"_Y_$S(Y[(","_ZTV_","):"",1:ZTV_",")
23 W "." Q
24 ;
25DAILIES ;REPORT--compute dailies
26 W !,"DAILIES"
27 S ZT1=0 F ZT=0:0 S ZT1=$O(^TMP($J,"D",1,ZT1)),ZT2="" Q:'ZT1 F ZT=0:0 S ZT2=$O(^TMP($J,"D",1,ZT1,ZT2)) Q:ZT2="" S ZTX=^(ZT2),^TMP($J,"D",2,99999-ZT1,99999-ZTX,ZT2)=$P(ZTX,"^",2) W "."
28 Q
29 ;
30TOTALS ;REPORT--compute totals
31 W !,"TOTALS"
32 S ZT1="" F ZT=0:0 S ZT1=$O(^TMP($J,"T",1,ZT1)) Q:ZT1="" S ZTX=^(ZT1),^TMP($J,"T",2,99999-ZTX,ZT1)=$P(ZTX,"^",2) W "."
33 Q
34 ;
35OUT ;REPORT--report the data computed
36 I ZTCOUNT W !!,"Errors by total count since install:"
37 I ZTCOUNT S ZT1=0 F ZT=0:0 S ZT1=$O(^TMP($J,"T",2,ZT1)),ZT2="" Q:'ZT1 F ZT=0:0 S ZT2=$O(^TMP($J,"T",2,ZT1,ZT2)) Q:ZT2="" S X=^(ZT2) W !,99999-ZT1,?4,ZT2,?46,$E(X,2,$L(X)-1)
38 I ZTDAY W !!,"Errors by day:"
39 I ZTDAY S ZT1=0 F ZT=0:0 S ZT1=$O(^TMP($J,"D",2,ZT1)),ZT2=0 Q:'ZT1 W !,$$HTE^XLFDT(99999-ZT1) D OUT2
40 Q
41 ;
42OUT2 ;OUT--report the data by day
43 F ZT=0:0 S ZT2=$O(^TMP($J,"D",2,ZT1,ZT2)),ZT3="" Q:'ZT2 F ZT=0:0 S ZT3=$O(^TMP($J,"D",2,ZT1,ZT2,ZT3)) Q:ZT3="" S X=^(ZT3) W !,99999-ZT2,?4,ZT3,?46,$E(X,2,$L(X)-1)
44 Q
45 ;
46SEND ;REPORT--mail the report to the San Francisco ISC
47 W !,"Assembling mail report" S ZTLINE=1
48 I ZTCOUNT S ^TMP($J,"M",ZTLINE,0)="Report by raw count since install:",ZTLINE=ZTLINE+1
49 I ZTCOUNT S ZT1=0 F ZT=0:0 S ZT1=$O(^TMP($J,"T",2,ZT1)),ZT2="" Q:'ZT1 F ZT=0:0 S ZT2=$O(^TMP($J,"T",2,ZT1,ZT2)) Q:ZT2="" S X=^(ZT2),^TMP($J,"M",ZTLINE,0)=$J(99999-ZT1,5)_$J(ZT2,45)_" "_$E(X,2,$L(X)-1),ZTLINE=ZTLINE+1 W "."
50 I ZTCOUNT,ZTDAY S ^TMP($J,"M",ZTLINE,0)=" ",ZTLINE=ZTLINE+1
51 I ZTDAY S ^TMP($J,"M",ZTLINE,0)="Report by day:",ZTLINE=ZTLINE+1
52 I ZTDAY S ZT1=0 F ZT=0:0 S ZT1=$O(^TMP($J,"D",2,ZT1)),ZT2=0 Q:'ZT1 S ^TMP($J,"M",ZTLINE,0)=$$HTE^XLFDT(99999-ZT1)_":",ZTLINE=ZTLINE+1 D SEND2
53 S ZTN="" I $D(^XMB(1,1,0))#2 S ZTN=$P(^(0),"^")
54 I ZTN]"",$D(^DIC(4.2,ZTN,0))#2 S ZTN=$P(^(0),"^")
55 D EN^XM S XMSUB="Error report from "_ZTN_" on "_$$HTE^XLFDT($H)
56 S XMTEXT="^TMP($J,""M"","
57 W !,"Sending the report..." D ^XMD,KILL^XM W !!,"Report sent."
58 Q
59 ;
60SEND2 ;MAIL--prepare to mail report by day
61 F ZT=0:0 S ZT2=$O(^TMP($J,"D",2,ZT1,ZT2)),ZT3="" Q:'ZT2 F ZT=0:0 S ZT3=$O(^TMP($J,"D",2,ZT1,ZT2,ZT3)) Q:ZT3="" S X=^(ZT3),^TMP($J,"M",ZTLINE,0)=$J(99999-ZT2,5)_$J(ZT3,45)_" "_$E(X,2,$L(X)-1),ZTLINE=ZTLINE+1 W "."
62 Q
63 ;
Note: See TracBrowser for help on using the repository browser.