| I am not planning on making any enhancements to the current release
of the software. If problems are reported, then they will be
corrected, but all enhancements will be placed in the next version.
As far as an 'idler' which will cause ZAP to pause during periods
of low activity, I do not think that this is something that I want
to add, since this removes some security features as well. However,
the next version will contain time dependant rules so that you can
allow users to have longer idle limits during off-peak hours.
Keith Maconi
|
| Hi Keith,
Here's some BASIC code that provides a "ZapThrottle" capability as an
interim step until your next version of ZAP is released. Also, I'm
including a copy of my modified ZAPMAINT_DAILY.COM which handles the
"ZapThrottle" process too. (Thanks to Mike Bryant for the BASIC.)
Thanks, and have a Happy New Year!
Ron
60 REM ** BASIC/NODEBUG <programname>
70 REM ** LINK/NODEBUG <programname>,SYS$SYSTEM:SYS.STB/SEL
80 REM **
90 REM ** RUN/DETACH/INPUT=<data file name>/OUT=<out file name or NL:>-
91 REM ** /PROC=<process_name>/UIC=<uic of process to watch>
100 DECLARE LONG CONSTANT JPI$_STATE=774
110 external long sys$gw_ijobcnt
120 external integer sys$gw_ijoblim
130 INPUT "LOGIN THRESHOLD PERCENT ";THRESH
140 INPUT "PROCESS TO SUSPEND";PROCESS$
150 INPUT "CHECKING INTERVAL IN SECONDS";SLEEP_TIME
160 I=sys$gw_ijobcnt
170 I_LIM=sys$gw_ijoblim-1048576
180 I_PER=INT((I/I_LIM)*100)
200 IF I_PER<=THRESH THEN GOTO 260
210 CALL LIB$GETJPI(JPI$_STATE,,PROCESS$,,A$)
220 IF A$<>"SUSP" THEN GOTO 300
230 CALL SYS$RESUME(,PROCESS$)
250 GOTO 300
260 CALL LIB$GETJPI(JPI$_STATE,,PROCESS$,,A$)
270 IF LEFT(A$,3)="SUS" THEN GOTO 300
280 CALL SYS$SUSPND(,PROCESS$)
300 SLEEP SLEEP_TIME
310 GOTO 160
The input file I use is ZAP$DIR:ZAPTRAP.DAT; the variables are (1) user
threshold (currently set at 60%), and (2) its hibernate time between
interactive user checking (currently set at 3 minutes); the process name
is "Zap V3.8" (of course!).
$ VER_IN = F$VERIFY(0) ! Never print these commands.
$!---------------------------------------------------------------
$! Z A P M A I N T . C O M
$!---------------------------------------------------------------
$!
$! This command procedure performs nightly maintenance on ZAP,
$! the Idle Process Monitor/Killer, and resubmits itself.
$!
$! Edit-date Who Reason
$! --------- --- ------
$! 06/30/89 RBS Modify for ZapThrottle processing
$! 10/08/87 RBS Modify for SAHQ system
$!
$!---------------------------------------------------------------
$! Submit ZAPMAINT for tomorrow ...
$!
$ SUBMIT ZAP$DIR:ZAPMAINT_DAILY.COM/LOG=ZAP$DIR:ZAPMAINT.LOG -
/NOPRINT/AFTER="tomorrow"/QUE=SAHQ$DAILY
$!
$!---------------------------------------------------------------
$! Stop the "Zap V3.8" and "ZapThrottle" processes ...
$!
$ STOP "Zap V3.8"
$!
$ STOP "ZapThrottle"
$!
$!---------------------------------------------------------------
$! Restart the "Zap V3.8" and "ZapThrottle" processes ...
$!
$ @ZAP$DIR:ZAP
$!
$ RUN/DETACH ZAP$DIR:ZAPTRAP -
/PROCESS_NAME="ZapThrottle" -
/INPUT=ZAP$DIR:ZAPTRAP.DAT -
/OUTPUT=NL: -
/UIC=[1,4] -
/PRIORITY=4
$!
$ EXIT
...end...
|