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

KMPDSSR.m

Go to the documentation of this file.
  1. KMPDSSR ;OAK/RAK - Resource Usage Monitor Status ;2/14/05 13:50
  1. ;;3.0;KMPD;;Jan 22, 2009;Build 42
  1. ;
  1. FORMAT(KMPRLN) ;-format text for display
  1. ;-----------------------------------------------------------------------------
  1. ; KMPRLN.... return number of lines - called by referrence
  1. ;-----------------------------------------------------------------------------
  1. ;
  1. N CHECK,LN,VERSION S LN=0 K TMP
  1. ;
  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. ;
  1. ; if no kmprutl routine
  1. S X="KMPRUTL" X ^%ZOSF("TEST") I '$T D Q
  1. .S LN=LN+1
  1. .D SET^VALM10(LN,"The CAPACITY MANAGEMENT - RUM package is not installed!")
  1. ;
  1. ; option data
  1. D OPT^KMPDSSD("KMPR BACKGROUND DRIVER")
  1. ;
  1. ; background data
  1. D BKGRND
  1. ;
  1. ; file data
  1. D FILES
  1. ;
  1. ; routine version check
  1. D ROUCHK^KMPDSSD1("R")
  1. ;
  1. ; node/cpu data
  1. D CPU^KMPDSSD1
  1. ;
  1. ; mail group members
  1. D MGRP^KMPDSSD1
  1. ;
  1. ; legend
  1. D LEGEND
  1. ;
  1. S KMPRLN=LN
  1. ;
  1. Q
  1. ;
  1. BKGRND ; rum background info
  1. ;
  1. N DATA,DELTA,ENDT,I,STAT,STDT,Z
  1. ;
  1. S LN=LN+1
  1. D SET^VALM10(LN,"")
  1. S LN=LN+1
  1. D SET^VALM10(LN," Temporary collection global..")
  1. S LN=LN+1
  1. D SET^VALM10(LN," ^KMPTMP(""KMPR"").............. "_$S('$D(^KMPTMP("KMPR")):"NOT ",1:"")_"Present")
  1. S LN=LN+1
  1. D SET^VALM10(LN,"")
  1. ;
  1. D PARAMS^KMPDUT("DATA") Q:'$D(DATA)
  1. S DATA(2)=$G(DATA(2))
  1. S STDT=$P(DATA(2),U,5),ENDT=$P(DATA(2),U,6),DELTA=$P(DATA(2),U,7)
  1. S:$E(DELTA)=" " $E(DELTA)="0"
  1. S LN=LN+1
  1. D SET^VALM10(LN,"")
  1. S LN=LN+1
  1. D SET^VALM10(LN," RUM Dly Bckgrnd Last Start... "_$$FMTE^XLFDT(STDT))
  1. S LN=LN+1
  1. D SET^VALM10(LN," RUM Dly Bckgrnd Last Stop.... "_$$FMTE^XLFDT(ENDT))
  1. S LN=LN+1
  1. D SET^VALM10(LN," RUM Dly Bkgrnd Total Time.... "_DELTA)
  1. S LN=LN+1
  1. D SET^VALM10(LN,"")
  1. S LN=LN+1
  1. S STDT=$P(DATA(2),U,8),ENDT=$P(DATA(2),U,9),DELTA=$P(DATA(2),U,10)
  1. S:$E(DELTA)=" " $E(DELTA)="0"
  1. D SET^VALM10(LN," RUM Wkly Backgrnd Last Start. "_$$FMTE^XLFDT(STDT))
  1. S LN=LN+1
  1. D SET^VALM10(LN," RUM Wkly Bckgrnd Last Stop... "_$$FMTE^XLFDT(ENDT))
  1. S LN=LN+1
  1. D SET^VALM10(LN," RUM Wkly Bckgrnd Total Time.. "_DELTA)
  1. S LN=LN+1
  1. D SET^VALM10(LN," RUM Purge Data After......... "_$P(DATA(2),U,11)_" weeks")
  1. D TRANSTO^KMPDUTL7(1,2,.Z)
  1. I '$D(Z) D SET^VALM10(LN," RUM Transmit Data to......... <>") S LN=LN+1
  1. E D
  1. .S I=$O(Z("")) I I'="" S LN=LN+1 D SET^VALM10(LN," RUM Transmit Data to......... "_I)
  1. .F S I=$O(Z(I)) Q:I="" S LN=LN+1 D SET^VALM10(LN,$J(" ",33)_I)
  1. S LN=LN+1
  1. D SET^VALM10(LN,"")
  1. ;
  1. Q
  1. ;
  1. FILES ;-- file data
  1. ;
  1. N TEXT,X
  1. ;
  1. S LN=LN+1
  1. D SET^VALM10(LN,$J(" ",35)_" # of Oldest Recent")
  1. S LN=LN+1
  1. D SET^VALM10(LN," File"_$J(" ",28)_"Entries Date Date")
  1. S LN=LN+1
  1. D SET^VALM10(LN," ------------------------- ------- ------- -------")
  1. ; file name
  1. S TEXT=" 8971.1-"_$P($G(^DIC(8971.1,0)),U)
  1. ; number of entries
  1. S TEXT=TEXT_$J(" ",35-$L(TEXT))_$J($FN($P($G(^KMPR(8971.1,0)),U,4),",",0),7)
  1. ; oldest date
  1. S X=$$FMTE^XLFDT(+$O(^KMPR(8971.1,"B",0)),2)
  1. S X=$S(X=0:"---",1:X)
  1. S TEXT=TEXT_$J(" ",45-$L(TEXT))_X
  1. ; current date
  1. S X=$$FMTE^XLFDT(+$O(^KMPR(8971.1,"B","A"),-1),2)
  1. S X=$S(X=0:"---",1:X)
  1. S TEXT=TEXT_$J(" ",55-$L(TEXT))_X
  1. S LN=LN+1
  1. D SET^VALM10(LN,TEXT)
  1. ;
  1. Q
  1. ;
  1. LEGEND ;-- display legend
  1. ;
  1. S LN=LN+1 D SET^VALM10(LN,"")
  1. S LN=LN+1 D SET^VALM10(LN,"")
  1. S LN=LN+1
  1. D SET^VALM10(LN," RUM = Resource Usage Monitor")
  1. ;
  1. Q