source: FOIAVistA/trunk/r/CAPACITY_MANAGEMENT_RUM-KMPR/KMPRUTL.m@ 794

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

initial load of FOIAVistA 6/30/08 version

File size: 4.2 KB
Line 
1KMPRUTL ;OAK/KAK/RAK - Resource Usage Monitor Utilities ;11/19/04 10:32
2 ;;2.0;CAPACITY MANAGEMENT - RUM;**1**;May 28, 2003
3 ;
4GRPHMSG ;-- graph message.
5 N TXT
6 S TXT(1)="This option displays data in a graphical format. Please make"
7 S TXT(2)="note that this output is intended for comparison/trends only,"
8 S TXT(3)="and should not be used for detailed analysis."
9 S TXT(1,"F")="!?9",TXT(2,"F")="!?9",TXT(3,"F")="!?9"
10 D EN^DDIOL(.TXT)
11 Q
12 ;
13ID(KMPRIEN) ;-- display - called from ^DD(8971.1,0,"ID","W")
14 ;-----------------------------------------------------------------------
15 ; KMPRIEN... Ien for file #8971.1 (RESOURCE USAGE MONITOR).
16 ;-----------------------------------------------------------------------
17 Q:'$G(KMPRIEN)
18 Q:'$D(^KMPR(8971.1,+KMPRIEN,0))
19 N DATA,TXT
20 S DATA=$G(^KMPR(8971.1,+KMPRIEN,0))
21 ; sent to cm national database.
22 S TXT(1)=$S($P(DATA,U,2):"sent",1:"not sent")
23 S TXT(1)=TXT(1)_$J(" ",10-$L(TXT(1)))
24 ; node.
25 S TXT(1)=TXT(1)_$P(DATA,U,3)
26 S TXT(1)=TXT(1)_$J(" ",22-$L(TXT(1)))
27 ; option.
28 I $P(DATA,U,4)]"" S TXT(1)=TXT(1)_"option: "_$P(DATA,U,4)
29 ; rpc.
30 E I $P(DATA,U,7)]"" S TXT(1)=TXT(1)_" rpc: "_$P(DATA,U,7)
31 S TXT(1,"F")="?16"
32 ; if protocol
33 I $P(DATA,U,5)'="" D
34 .S TXT(2)="protocol: "_$E($P(DATA,U,5),1,40) ;_" (protocol)"
35 .S TXT(2,"F")="!?"_$S($G(DDSDIW):40,1:42)
36 ; display TXT() array.
37 D EN^DDIOL(.TXT)
38 Q
39 ;
40NODEARRY(KMPRARRY) ;-- put nodes into array.
41 ;-----------------------------------------------------------------------
42 ; KMPRARRY.. Array to contain nodes in format:
43 ; KMPRARRY(NODENAME)=""
44 ;-----------------------------------------------------------------------
45 ;
46 K @KMPRARRY
47 ;
48 N NODE S NODE=""
49 F S NODE=$O(^KMPR(8971.1,"ANODE",NODE)) Q:NODE="" S @KMPRARRY@(NODE)=""
50 Q
51 ;
52RUMDATES(KMPRDATE) ;-- get RUM date ranges from file 8971.1
53 ;---------------------------------------------------------------------
54 ; KMPRDATE... Return value (access by reference) in format:
55 ; StartDate^EndDate^ExtStartDate^ExtEndDate
56 ; 2981101^2981104^Nov 1, 1998^Nov 4, 1998
57 ;---------------------------------------------------------------------
58 ;
59 S KMPRDATE=""
60 N END,START
61 ; determine start date from file 8971.1
62 S START=$O(^KMPR(8971.1,"B",0))
63 ; determine end date from file 8971.1
64 S END=$O(^KMPR(8971.1,"B","A"),-1)
65 D DATERNG^KMPRUTL1(.KMPRDATE,START,END)
66 ;
67 Q
68 ;
69VERSION() ;-- extrinsic - return current version
70 ;
71 Q $P($T(+2^KMPRUTL),";",3)_"^"_$P($T(+2^KMPRUTL),";",5)
72 ;
73ELEARRY(KMPRARRY) ;-- set elements data into KMPRARRY.
74 ;-----------------------------------------------------------------------
75 ; KMPRARRY... Array to contain elements data.
76 ; Format: ElementName^DataPiece
77 ; KMPRARRY(1)=CPU Time^1
78 ; KMPRARRY(2)=Elapsed Time^7
79 ; KMPRARRY(...)=...
80 ;-----------------------------------------------------------------------
81 ;
82 Q:$G(KMPRARRY)=""
83 ;
84 N DATA,I
85 F I=1:1 Q:$P($T(ELEMENTS+I),";",3)="" D
86 .S DATA=$T(ELEMENTS+I)
87 .S @KMPRARRY@(I)=$P(DATA,";",3)_"^"_$P(DATA,";",4)
88 Q
89 ;
90ELEMENT(KMPUVAR) ;-- select RUM data element.
91 ; Output Variable:
92 ; KMPUVAR = Number of Data Piece
93 ; = '^' if DTOUT or DUOUT
94 ; KMPUVAR(0) = Set of Code's Verbiage
95 ;
96 N DIR,DTOUT,DUOUT,I,X,Y
97 S KMPUVAR=""
98 S DIR(0)="SXO^"
99 F I=1:1 Q:$P($T(ELEMENTS+I),";",3)="" D
100 .S DIR(0)=DIR(0)_I_":"_$P($T(ELEMENTS+I),";",3)_";"
101 S DIR("A")="Enter Key Data Element for Searching RUM Data"
102 D ^DIR I $D(DTOUT)!$D(DUOUT)!(Y="") S KMPUVAR="^",KMPUVAR(0)="" Q
103 S KMPUVAR=$TR(Y,"12345678^","17562348^"),KMPUVAR(0)=Y(0)
104 Q
105 ;
106ELEMENTS ;-- ;;Element Name;data piece in file 8971.1
107 ;;CPU Time;1
108 ;;Elapsed Time;7
109 ;;M Commands;5
110 ;;GLO References;6
111 ;;DIO References;2
112 ;;BIO References;3
113 ;;Page Faults;4
114 ;;Occurrences;8
115 ;;
116PTCHINFO ; -- patch information: routine name ^ current version ^ current patch(es)
117 ;;KMPRBD01^2.0^**1**
118 ;;KMPRBD02^2.0^
119 ;;KMPRBD03^2.0^
120 ;;KMPRP1^2.0^**1**
121 ;;KMPRP2^2.0^**1**
122 ;;KMPRPG01^2.0^**1**
123 ;;KMPRPG02^2.0^**1**
124 ;;KMPRPN03^2.0^**1**
125 ;;KMPRPOST^2.0^**1**
126 ;;KMPRSS^2.0^**1**
127 ;;KMPRSSA^2.0^**1**
128 ;;KMPRSSB^2.0^**1**
129 ;;KMPRUTL^2.0^**1**
130 ;;KMPRUTL1^2.0^**1**
131 ;;KMPRUTL2^2.0^
132 ;;KMPRUTL3^2.0^
133 ;;%ZOSVKR^8.0^**90,94,107,122,143,186**
134 ;;
Note: See TracBrowser for help on using the repository browser.