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/XUSTAT.m@ 1437

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

initial load of WorldVistAEHR

File size: 2.7 KB
RevLine 
[613]1XUSTAT ;SF/RWF - User/CPU stats from sign-on log ;01/13/99 08:02
2 ;;8.0;KERNEL;**111**;Jul 10, 1995
3 K ^TMP($J),XUSS,DIR S U="^" D NOW^%DTC S DT=X,XUSS=0
4SORT ;
5 S DIR(0)="SO^D:Device;S:Service/Section;U:User;V:Volume set",DIR("A")="Sort method",DIR("?")="Enter either 'D', 'S', 'U', or 'V' to indicate the report breakdown." D ^DIR G:$D(DIRUT) END S XUSORT=X,XUSNM=Y(0) K DIR
6 S DIR(0)="SO^T:Taskman only;U:User only;B:Both",DIR("A")="Entry types" D ^DIR G:$D(DIRUT) END S XUSTSK=Y K DIR
7 S DIR("A")="All "_XUSNM_"s",DIR(0)="Y",DIR("B")="Y",DIR("?")="Enter either 'Y' or 'N'"
8 S DIR("?",1)="You may run this report for all "_XUSNM_"s, or selected ones only.",DIR("?",2)="Note it will not reduce the report processing time to select ",DIR("?",3)="specific "_XUSNM_"s."
9 D ^DIR K DIR G:$D(DIRUT) END G:Y=1 HRDA
10SPSORT ;
11 S DIC(0)="AEQMZ",DIC=$S(XUSORT="U":200,XUSORT="S":49,XUSORT="D":3.5,1:0),DIC("A")=$S(XUSORT="U":"Enter user name: ",XUSORT="S":"Enter Service/Section name: ",1:"Enter Device name: ")
12 I DIC F XUI=1:1 D ^DIC Q:Y<0 S:XUSORT="U" ^TMP($J,0,$P(Y(0),U,1))=$P(Y,U,1) S XUSS($P(Y,U,1))="",XUSS=XUSS+1
13 K DIC
14 I XUSORT="V" S DIC="^XTV(8989.3,1,4,",DIC(0)="AEMQ" F XUI=1:1 D ^DIC Q:$D(DUOUT)!(Y'>0) S XUSS($P(Y,U,2))="",XUSS=XUSS+1 W " OK, any others?"
15 ;
16HRDA S DIR(0)="S^H:Hourly;D:Daily",DIR("A")="Time interval",DIR("B")="D",DIR("?")="Enter either 'H' or 'D' to indicate whether you want to track by hour or day." D ^DIR K DIR G:$D(DIRUT) END S XUDH=Y
17 ;
18DATE S DIR(0)="D^:"_DT_":EX",DIR("B")="T-7" S:XUDH="H" DIR(0)=DIR(0)_"R",DIR("B")="T-1@0001" S DIR("A")="Enter a start date" D ^DIR K DIR G:$D(DIRUT) END S XUST=Y
19 ;
20TIMINT S DIR("A")="Enter a time interval in "_$S(XUDH="H":"hours (not to exceed 24)",1:"days"),DIR(0)="N;1:"_$S(XUDH="H":24,1:999),DIR("B")=$S(XUDH="H":24,1:7)
21 S DIR("?")="Specify the number of "_$S(XUDH="H":"Hours",1:"days")_" you wish to track."
22 D ^DIR K DIR G:$D(DIRUT) END S XUINT=X
23 I XUDH="D" S X1=XUST,X2=X D C^%DTC S XUEN=X
24 I XUDH="H" I XUINT>24 W !,*7,"Your time interval cannot exceed 24 hours !!" S XUINT=0 G TIMINT
25 I XUDH="H" S XUEN=XUST+(X*.01) S XUI=$P(XUEN,".",2),XUI=XUI_$E("000",1,4-$L(XUI)) I XUI>2400 S X1=$P(XUST,".",1),X2=1 D C^%DTC S XUEN=X+(XUI-2400*.0001)
26 S %ZIS="Q" D ^%ZIS G:POP END
27QUE I '$D(IO("Q")) G GO
28 F I="XUSS*","XUSORT","XUST","XUEN","XUDH","XUSTSK","^TMP($J,0," S ZTSAVE(I)=""
29 S ZTRTN="XUSTAT1" D ^%ZTLOAD G END
30GO K DIR,DIC,Y W !!,"Building .....",*7 G ^XUSTAT1
31END K DIC,DIR,^TMP($J),XUST,XUEN,XUDH,X,Y,X1,X2,XUSS,XUI,XUINT,XUSNM,XUSORT,ZTSAVE
32 K %H,D,DIRUT,XQM,XQPSM,XQTY,Y,Z,%,%T,XU1,XU2,XUDATE,XUDH,XUDT,XUDUZ,XUEN,XUEQ,XUHDR,XUI,XUINT,XULI,XUNAME,XUNODT,XUNOSER,XUOFF,XUON,XUPA,XUSER,XUSNM,XUSORT
33 K XUSS,XUST,XUTIME,XUTREC,XUTTIME,XUTUSER,XUVAL,XUPA,XUCPU,XUDEV,XUNAME,XUREC,XUT1
34 D ^%ZISC Q
Note: See TracBrowser for help on using the repository browser.