source: WorldVistAEHR/trunk/r/MAILMAN-XM/XMCQA.m@ 1556

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

initial load of WorldVistAEHR

File size: 4.4 KB
RevLine 
[613]1XMCQA ;ISC-SF/GMB-Transmit Queue Status Report (others) ;12/04/2002 13:44
2 ;;8.0;MailMan;**8,10**;Jun 28, 2002
3 ; Was (WASH ISC)/CAP/RM/AML
4 ;
5 ; Entry points used by MailMan options (not covered by DBIA):
6 ; ACTIVE XMQACTIVE (was GO^XMS5)
7 ; ALL XMQUEUED (was ENT^XMS5)
8 ;
9ACTIVE ; Show queues actively transmitting.
10 D EN^XUTMDEVQ("AZTLOOP^XMCQA",$$EZBLD^DIALOG(42110)) ; MailMan: Active Transmission Queues Report
11 Q
12AZTLOOP ;
13 I $E($G(IOST),1,2)'="C-" D Q
14 . D AZTSK
15 . I $D(ZTQUEUED) S ZTREQ="@"
16 F D Q:'(Y!$D(DTOUT))
17 . D AZTSK
18 . W !
19 . N DIR,X,DTIME
20 . S DTIME=5
21 . S DIR(0)="Y",DIR("A")=$$EZBLD^DIALOG(42116) ; Refresh
22 . S DIR("B")=$$EZBLD^DIALOG(39054) ; YES
23 . ;Answer YES if you want the display refreshed.
24 . ;Answer NO if you don't.
25 . ;If you don't answer, the display will be refreshed every five seconds.
26 . D BLD^DIALOG(42117,"","","DIR(""?"")")
27 . D ^DIR
28 Q
29AZTSK ;
30 N XMIEN,XMSITE,XMABORT,XMRPT,XMCNT,XMREC,XMSECS,XMQD
31 S (XMABORT,XMCNT,XMCNT("QD"))=0
32 ;Active Transmission Queues
33 ;Domain Queued Device/Protocol Message Line ZTSK Err Rate
34 D INIT(.XMRPT,42111,42112)
35 S XMSITE=""
36 F S XMSITE=$O(^DIC(4.2,"B",XMSITE)) Q:XMSITE="" D Q:XMABORT
37 . S XMIEN=0
38 . F S XMIEN=$O(^DIC(4.2,"B",XMSITE,XMIEN)) Q:'XMIEN D Q:XMABORT
39 . . S XMREC=$P($G(^XMBS(4.2999,XMIEN,3)),U,1,7)
40 . . Q:"^^^^^^"[XMREC
41 . . S XMSECS=$$HDIFF^XLFDT($H,$P(XMREC,U),2)
42 . . Q:XMSECS>599
43 . . Q:$P(XMREC,U,1,6)?.P
44 . . S XMQD=$$BMSGCT^XMXUTIL(.5,XMIEN+1000)
45 . . I $Y+3+(XMSECS>180)>IOSL D Q:XMABORT
46 . . . D PAGE(.XMABORT) Q:XMABORT
47 . . . D HDR(.XMRPT)
48 . . W !,$$MELD^XMXUTIL1(XMSITE,XMQD,21)," " ; domain, q'd msgs
49 . . I XMSECS>180 D
50 . . . W $E($P(XMREC,U,6),1,16)
51 . . . W ?40,$$EZBLD^DIALOG(42113,XMSECS\60) ; == Appears Inactive - |1| Minutes
52 . . E D
53 . . . I '$P(XMREC,U,2) D Q
54 . . . . W $E($P(XMREC,U,6),1,16)
55 . . . . W ?44,$$EZBLD^DIALOG(42114) ; Connecting/Disconnecting
56 . . . ; Device, Msg #, xmit line, ztsk, errors, xmit rate
57 . . . W $$MELD^XMXUTIL1($P(XMREC,U,6),$P(XMREC,U,2),29),$J($P(XMREC,U,3),6),$J($P(XMREC,U,7),10),$J($P(XMREC,U,4),3),$J($P(XMREC,U,5),9)
58 . . S XMCNT=XMCNT+1
59 . . S XMCNT("QD")=XMCNT("QD")+XMQD
60 Q:XMABORT
61 I 'XMCNT W !,$$EZBLD^DIALOG(42115) Q ; No queues actively transmitting
62 ;I $Y+5>IOSL D Q:XMABORT
63 ;. D PAGE(.XMABORT) Q:XMABORT
64 ;. D HDR(.XMRPT)
65 ;W !!,$$MELD^XMXUTIL1($$EZBLD^DIALOG(42103),XMCNT,27) ; Total Domains:
66 ;W !,$$MELD^XMXUTIL1($$EZBLD^DIALOG(42104),XMCNT("QD"),27) ; Total Queued:
67 Q
68INIT(XMRPT,XMTITLE,XMHDR) ;
69 S XMRPT("PAGE")=0
70 S XMRPT("DATE")=$$MMDT^XMXUTIL1($$NOW^XLFDT)
71 S XMRPT("TITLE")=$S(+XMTITLE=XMTITLE:$$EZBLD^DIALOG(XMTITLE),1:XMTITLE)
72 S XMRPT("HDR")=$S(+XMHDR=XMHDR:$$EZBLD^DIALOG(XMHDR),1:XMHDR)
73 W:$E($G(IOST),1,2)="C-" @IOF
74 D HDR(.XMRPT)
75 Q
76PAGE(XMABORT) ;
77 I $E($G(IOST),1,2)="C-" D PAGE^XMXUTIL(.XMABORT) Q:XMABORT
78 W @IOF
79 Q
80HDR(XMRPT) ;
81 N XMPAGE
82 S XMRPT("PAGE")=XMRPT("PAGE")+1
83 W !,XMRPT("TITLE")
84 W ?79-$L(XMRPT("DATE")),XMRPT("DATE")
85 S XMPAGE=$$EZBLD^DIALOG(34542,$J(XMRPT("PAGE"),2))
86 W !,^XMB("NETNAME"),?79-$L(XMPAGE),XMPAGE
87 W !!,XMRPT("HDR"),!
88 Q
89ALL ; Show all queues which have messages, whether transmitting or not.
90 D RESEQ
91 D EN^XUTMDEVQ("QZTSK^XMCQA",$$EZBLD^DIALOG(42120)) ; MailMan: Transmission Queues with Messages Report
92 Q
93RESEQ ; Resequence the messages in the transmit queues. This also has the
94 ; effect of doing an integrity check on the queues.
95 N XMK
96 S XMK=999
97 F S XMK=$O(^XMB(3.7,.5,2,XMK)) Q:XMK'>0 Q:XMK>9999 I $O(^(XMK,1,0)) W:'$D(ZTQUEUED) "." D RSEQ^XMXBSKT(.5,XMK)
98 Q
99QZTSK ;
100 N XMRPT,XMIEN,XMSITE,XMABORT,XMCNT,XMREC,XMQD
101 S (XMABORT,XMCNT,XMCNT("QD"))=0
102 ;Transmission Queues with Messages
103 ;Domain Queued Physical Link
104 D INIT(.XMRPT,42121,42122)
105 S XMSITE=""
106 F S XMSITE=$O(^DIC(4.2,"B",XMSITE)) Q:XMSITE="" D Q:XMABORT
107 . S XMIEN=0
108 . F S XMIEN=$O(^DIC(4.2,"B",XMSITE,XMIEN)) Q:'XMIEN D Q:XMABORT
109 . . S XMQD=$$BMSGCT^XMXUTIL(.5,XMIEN+1000)
110 . . Q:'XMQD
111 . . S XMREC=^DIC(4.2,XMIEN,0)
112 . . I $Y+3>IOSL D Q:XMABORT
113 . . . D PAGE(.XMABORT) Q:XMABORT
114 . . . D HDR(.XMRPT)
115 . . W !,$$MELD^XMXUTIL1($P(XMREC,U),XMQD,47)," ",$P(XMREC,U,17)
116 . . S XMCNT=XMCNT+1
117 . . S XMCNT("QD")=XMCNT("QD")+XMQD
118 Q:XMABORT
119 I 'XMCNT W !,$$EZBLD^DIALOG(42123) Q ; No messages queued
120 I $Y+5>IOSL D Q:XMABORT
121 . D PAGE(.XMABORT) Q:XMABORT
122 . D HDR(.XMRPT)
123 W !!,$$MELD^XMXUTIL1($$EZBLD^DIALOG(42103),XMCNT,27) ; Total Domains:
124 W !,$$MELD^XMXUTIL1($$EZBLD^DIALOG(42104),XMCNT("QD"),27) ; Total Queued:
125 I $D(ZTQUEUED) S ZTREQ="@"
126 Q
Note: See TracBrowser for help on using the repository browser.