source: FOIAVistA/trunk/r/CAPACITY_MANAGEMENT_TOOLS-KMPD-KMPL/KMPDSSR.m@ 1742

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

initial load of FOIAVistA 6/30/08 version

File size: 3.4 KB
Line 
1KMPDSSR ;OAK/RAK - Resource Usage Monitor Status ;2/14/05 13:50
2 ;;2.0;CAPACITY MANAGEMENT - RUM;**3**;Mar 22, 2002
3 ;
4FORMAT(KMPRLN) ;-format text for display
5 ;-----------------------------------------------------------------------------
6 ; KMPRLN.... return number of lines - called by referrence
7 ;-----------------------------------------------------------------------------
8 ;
9 N CHECK,LN,VERSION S LN=0 K TMP
10 ;
11 ; check environment
12 ;D ENVCHECK^KMPRUTL1(.CHECK,1)
13 ; if RUM turned on but background job not queued ask user if they want
14 ; to queue it at this time.
15 ;D:(+CHECK)=200 ENVCHECK^KMPRUTL1(.CHECK)
16 ;
17 ; if no kmprutl routine
18 S X="KMPRUTL" X ^%ZOSF("TEST") I '$T D Q
19 .S LN=LN+1
20 .D SET^VALM10(LN,"The CAPACITY MANAGEMENT - RUM package is not installed!")
21 ;
22 ; option data
23 D OPT^KMPDSSD("KMPR BACKGROUND DRIVER")
24 ;
25 ; background data
26 D BKGRND
27 ;
28 ; file data
29 D FILES
30 ;
31 ; routine version check
32 D ROUCHK^KMPDSSD1("R")
33 ;
34 ; node/cpu data
35 D CPU^KMPDSSD1
36 ;
37 ; mail group members
38 D MGRP^KMPDSSD1
39 ;
40 ; legend
41 D LEGEND
42 ;
43 S KMPRLN=LN
44 ;
45 Q
46 ;
47BKGRND ; rum background info
48 ;
49 N DATA,DELTA,ENDT,I,STAT,STDT,Z
50 ;
51 S LN=LN+1
52 D SET^VALM10(LN,"")
53 S LN=LN+1
54 D SET^VALM10(LN," Temporary collection global..")
55 S LN=LN+1
56 D SET^VALM10(LN," ^KMPTMP(""KMPR"").............. "_$S('$D(^KMPTMP("KMPR")):"NOT ",1:"")_"Present")
57 S LN=LN+1
58 D SET^VALM10(LN,"")
59 ;
60 D PARAMS^KMPDUT("DATA") Q:'$D(DATA)
61 S DATA(2)=$G(DATA(2))
62 S STDT=$P(DATA(2),U,5),ENDT=$P(DATA(2),U,6),DELTA=$P(DATA(2),U,7)
63 S:$E(DELTA)=" " $E(DELTA)="0"
64 S LN=LN+1
65 D SET^VALM10(LN,"")
66 S LN=LN+1
67 D SET^VALM10(LN," RUM Dly Bckgrnd Last Start... "_$$FMTE^XLFDT(STDT))
68 S LN=LN+1
69 D SET^VALM10(LN," RUM Dly Bckgrnd Last Stop.... "_$$FMTE^XLFDT(ENDT))
70 S LN=LN+1
71 D SET^VALM10(LN," RUM Dly Bkgrnd Total Time.... "_DELTA)
72 S LN=LN+1
73 D SET^VALM10(LN,"")
74 S LN=LN+1
75 S STDT=$P(DATA(2),U,8),ENDT=$P(DATA(2),U,9),DELTA=$P(DATA(2),U,10)
76 S:$E(DELTA)=" " $E(DELTA)="0"
77 D SET^VALM10(LN," RUM Wkly Backgrnd Last Start. "_$$FMTE^XLFDT(STDT))
78 S LN=LN+1
79 D SET^VALM10(LN," RUM Wkly Bckgrnd Last Stop... "_$$FMTE^XLFDT(ENDT))
80 S LN=LN+1
81 D SET^VALM10(LN," RUM Wkly Bckgrnd Total Time.. "_DELTA)
82 S LN=LN+1
83 D SET^VALM10(LN," RUM Purge Data After......... "_$P(DATA(2),U,11)_" weeks")
84 D TRANSTO^KMPDUTL7(1,2,.Z)
85 I '$D(Z) D SET^VALM10(LN," RUM Transmit Data to......... <>") S LN=LN+1
86 E D
87 .S I=$O(Z("")) I I'="" S LN=LN+1 D SET^VALM10(LN," RUM Transmit Data to......... "_I)
88 .F S I=$O(Z(I)) Q:I="" S LN=LN+1 D SET^VALM10(LN,$J(" ",33)_I)
89 S LN=LN+1
90 D SET^VALM10(LN,"")
91 ;
92 Q
93 ;
94FILES ;-- file data
95 ;
96 N TEXT,X
97 ;
98 S LN=LN+1
99 D SET^VALM10(LN,$J(" ",35)_" # of Oldest Recent")
100 S LN=LN+1
101 D SET^VALM10(LN," File"_$J(" ",28)_"Entries Date Date")
102 S LN=LN+1
103 D SET^VALM10(LN," ------------------------- ------- ------- -------")
104 ; file name
105 S TEXT=" 8971.1-"_$P($G(^DIC(8971.1,0)),U)
106 ; number of entries
107 S TEXT=TEXT_$J(" ",35-$L(TEXT))_$J($FN($P($G(^KMPR(8971.1,0)),U,4),",",0),7)
108 ; oldest date
109 S X=$$FMTE^XLFDT(+$O(^KMPR(8971.1,"B",0)),2)
110 S X=$S(X=0:"---",1:X)
111 S TEXT=TEXT_$J(" ",45-$L(TEXT))_X
112 ; current date
113 S X=$$FMTE^XLFDT(+$O(^KMPR(8971.1,"B","A"),-1),2)
114 S X=$S(X=0:"---",1:X)
115 S TEXT=TEXT_$J(" ",55-$L(TEXT))_X
116 S LN=LN+1
117 D SET^VALM10(LN,TEXT)
118 ;
119 Q
120 ;
121LEGEND ;-- display legend
122 ;
123 S LN=LN+1 D SET^VALM10(LN,"")
124 S LN=LN+1 D SET^VALM10(LN,"")
125 S LN=LN+1
126 D SET^VALM10(LN," RUM = Resource Usage Monitor")
127 ;
128 Q
Note: See TracBrowser for help on using the repository browser.