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

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

initial load of WorldVistAEHR

File size: 5.3 KB
Line 
1%ZOSV2 ; SFISC/JC - Capacity Mgmt - Performance Data ;06/27/96 10:17
2 ;;8.0;KERNEL;**35**;JUL 03, 1995
3DB ;Collect volume set information for this environment
4START D VSET^%VOLDEF I '%SMSTART G DONE
5S0 S ALL=1,ANS="Y"
6 S A=$ZC(%VIEWBUFFER,1)
7 S VSNUM="",VOLNUM="",GRTOT=0
8S1 S VSNUM=$O(%VOL(VSNUM)),BLK0=0 G:VSNUM="" S3
9S2 S VOLNUM=$O(%VOL(VSNUM,VOLNUM)) G:VOLNUM="" S1
10 I VOLNUM="BIJ" G S2
11 S DDU=$P(%VOL(VSNUM,VOLNUM),"^"),MPS=$P(%VOL(VSNUM,VOLNUM),"^",2),STRNO="S"_VSNUM
12 D DISK S BLK0=BLK0+(MPS*400) G S2
13 ;
14S3 ;
15DONE K QUES,DTAB,D,TYY,UU,DDU,YES,ALL,Y,BLK0,GRTOT
16 K PREV,MPS,M0,MP0,CT,MBLK,AVAIL,TYP,USE,OLDAVAIL,OLDUSE
17 K %ISAV,%NULL,TAV,TYPES
18EXIT Q
19 ;
20DISK ; Set up XUCM ARRAY
21 S TAV=0,CNT=1+$G(CNT)
22 S XUCM(CNT)=VOLNUM_"^"_DDU_"^"
23 D GETSTAT^%VOLTAB I '%RDACC Q
24 S PREV=100 F M0=0:1:MPS S MBLK=M0*400+399+BLK0 D MAPGET
25 S XUCM(CNT)=XUCM(CNT)_TAV_"^"_(MPS*400)
26 ;
27MAPGET ;
28 I M0=MPS Q
29 S AVAIL=0,$ZE="ERR" V MBLK:STRNO S $ZE="" G NOERR
30ERR S $ZE="",TYP=100 G TYPCHK
31NOERR I $V(1006,0,2)=65535&($V(1012,0,2)=32769) G OK
32NOTOK S TYP=100 G TYPCHK
33OK I $V(1008,0,2)=56173 S USE="* SPOOL *",TYP=4 G TYPCHK
34 I $V(1008,0,2)+$V(1010,0,2)'=65535 G NOTOK
35 S AVAIL=$V(1022,0,2) G SPECL:$V(1008,0,2)'=21845
36 I AVAIL=399 S TYP=1 G TYPCHK
37 I AVAIL=398,M0=0 S TYP=100 G TYPCHK
38 S TYP=100 S:AVAIL=0 TYP=5 G TYPCHK
39SPECL I AVAIL S AVAIL=0,TYP=100 G TYPCHK
40 I $V(1008,0,2)=13107 S TYP=3 G TYPCHK
41 I $V(1008,0,2)=43690 S TYP=2 G TYPCHK
42 G NOTOK
43 ;
44TYPCHK S TAV=TAV+AVAIL I TYP=100 G NEWTYP
45 I TYP=PREV S CT=CT+1 Q
46 S MP0=M0,CT=0,OLDAVAIL=AVAIL
47NEWTYP S PREV=TYP
48 Q
49RTHSTOP ;(TASKMAN-RUN IN MGR@0001) STOP RTHIST/MOVE OUT DATA/PURGE RTH
50 Q:$$OS<6.1
51 N I,J,K,L,M,N,O,P,Q,R,X,C,S D INIT^%VOLDEF,GETGRP^%SYSROU
52 ;I '$D(^["MGR"]RTH(SCSNODE)),$V(%SMSTART)\32#2'=1 G RTH
53 S RTNODE="" F S RTNODE=$O(^["MGR"]RTH(RTNODE)) Q:RTNODE="" D
54 .S ^["MGR"]RTH(RTNODE)=0
55 .S ^%ZRTL("RTH",RTNODE)=0,C=0
56 .S SUB=0,U="^" F S SUB=$O(^["MGR"]RTH(RTNODE,SUB)) Q:SUB<1 D
57 ..Q:$G(^["MGR"]RTH(RTNODE,SUB,"LABEL"))'["VPM"
58 ..Q:'$D(^["MGR"]RTH(RTNODE,SUB,"STIME")) S %H=^("STIME") D YX^%DTC S S=$P(^["MGR"]RTH(RTNODE,SUB,"ETIME"),",",1)-$P(^("STIME"),",",1)*86400+$P(^("ETIME"),",",2)-$P(^("STIME"),",",2)
59 ..S I=$G(^["MGR"]RTH(RTNODE,SUB,"ROUREF")) I I S I=I*10/S+.5\1/10
60 ..S J=$G(^["MGR"]RTH(RTNODE,SUB,"MAPROU")) I J S J=J*10/S+.5\1/10
61 ..S K=$G(^["MGR"]RTH(RTNODE,SUB,"Global Gets")) I K S K=K*10/S+.5\1/10
62 ..S L=$G(^["MGR"]RTH(RTNODE,SUB,"Global Sets")) I L S L=L*10/S+.5\1/10
63 ..S M=$G(^["MGR"]RTH(RTNODE,SUB,"Global Kills")) I M S M=M*10/S+.5\1/10
64 ..S N=$G(^["MGR"]RTH(RTNODE,SUB,"Logical Reads")) I N S N=N*10/S+.5\1/10
65 ..S O=$G(^["MGR"]RTH(RTNODE,SUB,"Logical Writes")) I O S O=O*10/S+.5\1/10
66 ..S P=$G(^["MGR"]RTH(RTNODE,SUB,"Physical Reads")) I P S P=P*10/S+.5\1/10
67 ..S Q=$G(^["MGR"]RTH(RTNODE,SUB,"Physical Writes")) I Q S Q=Q*10/S+.5\1/10
68 ..S Z="",R=0 F S Z=$O(^["MGR"]RTH(RTNODE,SUB,"DDP",Z)) Q:Z="" S R=R+$G(^(Z,"XMTS"))
69 ..I R S R=R*10/S+.5\1/10
70 ..S C=1+C,^%ZRTL("RTH",RTNODE,C)=RTNODE_U_SUB_U_$TR(Y,":")_U_S_U_I_U_J_U_K_U_L_U_M_U_N_U_O_U_P_U_Q_U_R
71 ..I $D(^["MGR"]RTH(RTNODE,SUB,"PMF-R","TTYGLOREF")) D
72 ...S ^%ZRTL("RTH",RTNODE,"RT",SUB,0)=^["MGR"]RTH(RTNODE,SUB,"STIME")
73 ...S X=0 F S X=$O(^["MGR"]RTH(RTNODE,SUB,"PMF-R","TTYGLOREF",X)) Q:X<1 S Y=^(X),^%ZRTL("RTH",RTNODE,"RT",SUB,X)=Y
74 .S ^%ZRTL("RTH",RTNODE)=1
75 Q
76RTH ;(TASKMAN) INITIATE NEW RTHIST DATA COLLECTIONS FOR THE DAY
77 Q:$$OS<6.1
78 D INIT^%VOLDEF,GETGRP^%SYSROU
79 S LOOP=0
80LOOP ;WAIT UNTIL LAST SESSION COMPLETES
81 I LOOP>90 S $ZE="Timed Out Starting RTHIST" D ^%ZTER Q
82 I $V(%SMSTART)\32#2=1 S LOOP=LOOP+1 H 60 G LOOP
83 K ^["MGR"]RTH(SCSNODE) S ^["MGR"]RTH(SCSNODE)=0
84 S TIMS=24,TIM=10,TIMI=50
85 S X="NOW",%DT="T" D ^%DT D DD^%DT S NOW=Y
86 S SUB=0 F I=1:1 Q:$O(^["MGR"]RTH(SCSNODE,SUB))="" S SUB=$O(^(SUB))
87 S WHEN=$P($ZH,",",3),LAB="VPM SESSION-"_NOW
88 I $$OS>6.1 S CONF=$ZC(%VERSION,"INTERNAL")
89 E S CONF=$ZV
90 S CONF=CONF_","_^[LIB]SYS(-1,SCSNODE,"RUNNING")
91 S SZ=^[LIB]SYS(^("RUNNING"),"RTHIST","BUFFERS")*512
92 S RTHOPT="/MANAGER/UCI=MGR/NORMS_ROU/NORMS_LIB/SYM=50000/SOU=20000"
93 S X=$$CVDAT^RTHIST(WHEN),$ZT="TRAP^%ZOSV2"
94 J START^RTHIST1(SZ,TIM,TIMS,TIMI,X,SUB,CONF,LAB,SCSNODE):(ERROR="VPM$RTHIST.LOG":OPTIONS=RTHOPT:NAME="VPM_RTHIST_"_GRP)
95 I $D(ZTQUEUED) S ZTREQ="@"
96 Q
97TRAP ;Give process time to die off
98 I $ZE["SYSTEM-F-DUPLNAM" S RETRY=$G(RETRY)+1
99 I RETRY'>90 H 60 G RTH
100 K RETRY
101 Q
102RT ;
103 N NODE,RUN,ET,CNT,ZCT,STIM,X
104 Q:^%ZOSF("OS")'["DSM"
105 W " Node",?7,"Run",?24,"Label",?48,"Start",?57,"ET",?61,"Count",?70,"RT",!
106 S (NODE,RUN)=0 F S NODE=$O(^["MGR"]RTH(NODE)) Q:NODE="" D
107 . F S RUN=$O(^["MGR"]RTH(NODE,RUN)) Q:RUN="" D
108 . . S (ET,CNT,ZCT)=0
109 . . F I=1:1:34 S X=^["MGR"]RTH(NODE,RUN,"PMF-R","TTYGLOREF",I) D
110 . . . S ET=ET+$P(X,";",2),Y=$P(X,";",3),ZCT=ZCT+Y
111 . . . F J=1:1:12 S CNT=CNT+$P(Y,",",J)
112 . . I $$OS<6.5 S ET=ET+(.3*ZCT)+(.5*(CNT-ZCT))
113 . . I $$OS'<6.5 S ET=ET/100+(.005*CNT)
114 . . S X=$P(^["MGR"]RTH(NODE,RUN,"STIME"),",",2)
115 . . S H=X\3600,M=X#3600\60,S=X#3600#60
116 . . S STIM=$J(H,2)_":"_$S($L(M)<2:0_M,1:M)_":"_$S($L(S)<2:0_S,1:S)
117 . . W NODE,?7,$J(RUN,3),?13,$E(^["MGR"]RTH(NODE,RUN,"LABEL"),1,30),?45,STIM,?55,$J($P(^("ETIME"),",",2)-$P(^("STIME"),",",2),4),?60,$J(CNT,6),?69 W:CNT $J(ET/CNT,4,2)
118 . . W !
119 Q
120TRNLNM(%) ;TRANSLATE A VAX LOGICAL
121 I ^%ZOSF("OS")'["VAX" Q ""
122 I $$OS>6.1 Q $ZC(%TRNLNM,%)
123 E Q $ZC(%TRNLOG,%)
124OS() ;
125 Q $P($ZV," V",2)
126PRV() ;current privs
127 Q $&ZLIB.%GETJPI("","CURPRIV")
Note: See TracBrowser for help on using the repository browser.