KMPRSS ;OAK/RAK - Resource Usage Monitor Status ;1/30/13 08:31
;;2.0;CAPACITY MANAGEMENT - RUM;**1,2**;May 28, 2003;Build 12
;
STAT ;--display rum environment
;
D DISPLAY^KMPDSS1("R^RUM")
;
Q
;
START ; Start Resource Usage Monitor collection
N CHECK,DA,DIE,DIR,DR,X,Y
; check environment
D ENVCHECK^KMPRUTL1(.CHECK,1)
; if RUM does not support this operating system then quit.
I (+CHECK)=100 W !! D ENVOUTPT^KMPRUTL1(CHECK,1,1) H 1 Q
I +$G(^%ZTSCH("LOGRSRC")) W !!,?10,"The Resource Usage Monitor is already running.",! H 1 Q
W ! K DIR S DIR(0)="Y",DIR("B")="YES"
S DIR("?")="Answer YES to start collecting Resource Usage Monitor data"
S DIR("A")="Do you want to start Resource Usage Monitor collection"
D ^DIR Q:$D(DTOUT)!$D(DUOUT)
I Y D
.S DIE=8989.3,DA=1,DR="300///YES" D ^DIE
.W !!,?10,"Resource Usage Monitor collection is started.",!
.D ENVCHECK^KMPRUTL1(.CHECK,1)
.; if background driver not scheduled to run then start it up
.D:(+CHECK=200) QUEBKG^KMPRUTL1
E W !!,?10,"Resource Usage Monitor collection is NOT started.",!
H 1
Q
;
STOP ; Stop Resource Usage Monitor collection
N DA,DIE,DIR,DR,DTOUT,DUOUT,X,Y
I '+$G(^%ZTSCH("LOGRSRC")) W !!,?10,"The Resource Usage Monitor is already stopped.",! H 1 Q
W ! K DIR S DIR(0)="Y",DIR("B")="YES"
S DIR("?")="Answer YES to stop collecting Resource Usage Monitor data"
S DIR("A")="Do you want to stop Resource Usage Monitor collection"
D ^DIR Q:$D(DTOUT)!$D(DUOUT)
I Y D
.S DIE=8989.3,DA=1,DR="300///NO" D ^DIE
.W !!,?10,"Resource Usage Monitor collection is stopped.",!
E W !!,?10,"Resource Usage Monitor collection is NOT stopped.",!
H 1
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HKMPRSS 1676 printed Nov 22, 2024@16:51:56 Page 2
+1 ;;2.0;CAPACITY MANAGEMENT - RUM;**1,2**;May 28, 2003;Build 12
+2 ;
STAT ;--display rum environment
+1 ;
+2 DO DISPLAY^KMPDSS1("R^RUM")
+3 ;
+4 QUIT
+5 ;
START ; Start Resource Usage Monitor collection
+1 NEW CHECK,DA,DIE,DIR,DR,X,Y
+2 ; check environment
+3 DO ENVCHECK^KMPRUTL1(.CHECK,1)
+4 ; if RUM does not support this operating system then quit.
+5 IF (+CHECK)=100
WRITE !!
DO ENVOUTPT^KMPRUTL1(CHECK,1,1)
HANG 1
QUIT
+6 IF +$GET(^%ZTSCH("LOGRSRC"))
WRITE !!,?10,"The Resource Usage Monitor is already running.",!
HANG 1
QUIT
+7 WRITE !
KILL DIR
SET DIR(0)="Y"
SET DIR("B")="YES"
+8 SET DIR("?")="Answer YES to start collecting Resource Usage Monitor data"
+9 SET DIR("A")="Do you want to start Resource Usage Monitor collection"
+10 DO ^DIR
if $DATA(DTOUT)!$DATA(DUOUT)
QUIT
+11 IF Y
Begin DoDot:1
+12 SET DIE=8989.3
SET DA=1
SET DR="300///YES"
DO ^DIE
+13 WRITE !!,?10,"Resource Usage Monitor collection is started.",!
+14 DO ENVCHECK^KMPRUTL1(.CHECK,1)
+15 ; if background driver not scheduled to run then start it up
+16 if (+CHECK=200)
DO QUEBKG^KMPRUTL1
End DoDot:1
+17 IF '$TEST
WRITE !!,?10,"Resource Usage Monitor collection is NOT started.",!
+18 HANG 1
+19 QUIT
+20 ;
STOP ; Stop Resource Usage Monitor collection
+1 NEW DA,DIE,DIR,DR,DTOUT,DUOUT,X,Y
+2 IF '+$GET(^%ZTSCH("LOGRSRC"))
WRITE !!,?10,"The Resource Usage Monitor is already stopped.",!
HANG 1
QUIT
+3 WRITE !
KILL DIR
SET DIR(0)="Y"
SET DIR("B")="YES"
+4 SET DIR("?")="Answer YES to stop collecting Resource Usage Monitor data"
+5 SET DIR("A")="Do you want to stop Resource Usage Monitor collection"
+6 DO ^DIR
if $DATA(DTOUT)!$DATA(DUOUT)
QUIT
+7 IF Y
Begin DoDot:1
+8 SET DIE=8989.3
SET DA=1
SET DR="300///NO"
DO ^DIE
+9 WRITE !!,?10,"Resource Usage Monitor collection is stopped.",!
End DoDot:1
+10 IF '$TEST
WRITE !!,?10,"Resource Usage Monitor collection is NOT stopped.",!
+11 HANG 1
+12 QUIT