Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: KMPRSS

KMPRSS.m

Go to the documentation of this file.
  1. KMPRSS ;SFISC/KAK/RAK - Resource Usage Monitor Status ;3/28/00 08:55
  1. ;;1.0;CAPACITY MANAGEMENT - RUM;**1,2**;Dec 09, 1998
  1. ;
  1. STAT ; Status of Resource Usage Monitor collection
  1. N CHECK,KMPRX,X,Y
  1. ; check environment
  1. D ENVCHECK^KMPRUTL1(.CHECK,1)
  1. ; if RUM turned on but background job not queued ask user if they want
  1. ; to queue it at this time.
  1. D:(+CHECK)=200 ENVCHECK^KMPRUTL1(.CHECK)
  1. W @IOF,!!,?25,"Resource Usage Monitor Status"
  1. S X="Version "_$P($$VERSION^KMPRUTL,U)
  1. W !,?(80-$L(X)\2),X,!
  1. ; patches
  1. S X=$P($$VERSION^KMPRUTL,U,2)
  1. W:X]"" ?(80-$L(X)\2),X,!
  1. W !,?5,"The Resource Usage Monitor is currently "
  1. I +$G(^%ZTSCH("LOGRSRC")) W "running."
  1. E W "stopped."
  1. W !
  1. I '$D(^DIC(19,"B","KMPR BACKGROUND DRIVER")) D
  1. .W !," The 'RUM Background Driver' option [KMPR BACKGROUND DRIVER] is missing !",*7,!
  1. E D
  1. .S KMPRX=$O(^DIC(19,"B","KMPR BACKGROUND DRIVER",0))
  1. .S KMPRX=+$O(^DIC(19.2,"B",KMPRX,0))
  1. .I 'KMPRX W !?5,"The 'RUM Background Driver' [KMPR BACKGROUND DRIVER] is not scheduled",!?5,"to run!",! Q
  1. .S KMPRX=$G(^DIC(19.2,KMPRX,0))
  1. .S $P(KMPRX,U,2)=$$FMTE^XLFDT($P(KMPRX,U,2))
  1. .W !,?5,"The 'RUM Background Driver' [KMPR BACKGROUND DRIVER]"
  1. .W !?5,"is QUEUED TO RUN AT ",$P(KMPRX,U,2)
  1. .W !,?5,"with a RESCHEDULING FREQUENCY of '",$P(KMPRX,U,6),"'."
  1. W !!,?5,"The temporary collection global (i.e., 'XTMP(""KMPR"")') is",$S('$D(^XTMP("KMPR")):" not",1:"")," present",!,?5,"on your system.",!
  1. W !!,"Press <RETURN> to continue: " R X:DTIME
  1. ;
  1. Q
  1. ;
  1. START ; Start Resource Usage Monitor collection
  1. N CHECK
  1. ; check environment
  1. D ENVCHECK^KMPRUTL1(.CHECK,1)
  1. ; if RUM does not support this operating system then quit.
  1. I (+CHECK)=100 W !! D ENVOUTPT^KMPRUTL1(CHECK,1,1) H 1 Q
  1. I +$G(^%ZTSCH("LOGRSRC")) W !!,?10,"The Resource Usage Monitor is already running.",! H 1 Q
  1. W ! K DIR S DIR(0)="Y",DIR("B")="YES"
  1. S DIR("?")="Answer YES to start collecting Resource Usage Monitor data"
  1. S DIR("A")="Do you want to start Resource Usage Monitor collection"
  1. D ^DIR G:$D(DTOUT)!$D(DUOUT) END
  1. I Y D
  1. .S DIE=8989.3,DA=1,DR="300///YES" D ^DIE
  1. .W !!,?10,"Resource Usage Monitor collection is started.",!
  1. .D ENVCHECK^KMPRUTL1(.CHECK,1)
  1. .; if background driver not scheduled to run then start it up
  1. .D:(+CHECK=200) QUEBKG^KMPRUTL1
  1. E W !!,?10,"Resource Usage Monitor collection is NOT started.",!
  1. H 1 G END
  1. ;
  1. STOP ; Stop Resource Usage Monitor collection
  1. I '+$G(^%ZTSCH("LOGRSRC")) W !!,?10,"The Resource Usage Monitor is already stopped.",! H 1 Q
  1. W ! K DIR S DIR(0)="Y",DIR("B")="YES"
  1. S DIR("?")="Answer YES to stop collecting Resource Usage Monitor data"
  1. S DIR("A")="Do you want to stop Resource Usage Monitor collection"
  1. D ^DIR G:$D(DTOUT)!$D(DUOUT) END
  1. I Y D
  1. .S DIE=8989.3,DA=1,DR="300///NO" D ^DIE
  1. .W !!,?10,"Resource Usage Monitor collection is stopped.",!
  1. E W !!,?10,"Resource Usage Monitor collection is NOT stopped.",!
  1. H 1
  1. ;
  1. END ;
  1. K DA,DIE,DIR,DR,DTOUT,DUOUT,X,Y
  1. Q