I wanted to have similar information so I modified the
LSV$GETQ EXEC to record it. A very simple change, and
the information is saved in a file called
"listservlistname GETSTATS". Here is what I use...
/***********************************************************************
* *
* LSV$GETQ -- LISTSERV system, GET quota exit *
* *
* (c) Eric Thomas 1987,1988 <[log in to unmask]> *
* *
* This file was last updated on Saturday, March the 5th of 1988 *
* *
***********************************************************************/
/*
This exit receives control whenever LISTSERV processes a GET command,
be it from a postmaster or a "general" user. The first argument
indicates the command originator, total number of files previously
ordered today, total number of kilobytes of data previously ordered
today, file size in kilobytes, and fileid. Note that the numbers
supplied correspond to the files sent to the address that will receive
the current file in previous GET requests (usually, but not
necessarily, the command originator). That is, if the user hasn't
ordered any file today, the first two parameters will be zeroes (not 1
and file-size). The second argument, if present, denotes a GIVE
command and contains the address of the person who is to actually
receive the data. That is, the actual destination is Word(giveto
origin,1). The third argument is a free-format "user data", extracted
from the GETLOG file and defaulted to '' if the file destination was
not in the GETLOG file. This user data is reserved for the exclusive
use of this exit (see below).
This exit must return to LSVGET by means of an 'Exit' instruction of
the following form:
Exit rc userdata
'rc' is the return code. '0' indicates that the request is to be
accepted, anything else means that it should be denied. Note that in
the latter case, no error message will be sent to the originator. That
is, it is the exit's responsibility to send appropriate error messages
to the address listed in the 'origin' variable.
'userdata' is the new value of the user data string, which will be
stored back into the GETLOG file (regardless of the value of 'rc').
The maximum size of 'userdata' depends on the length of the
userid@node; for a 80-bytes userid@node, about 40 bytes of data are
available, which should be enough for most applications.
The default exit just compares the various parameters to the SYSVARS
thresholds MAXGET and MAXGETK, unconditionally letting postmasters and
GETWAIVE people through. Additionally, NADs are not subjected to the
'file size' test. Finally, the first GET request issued on any given
day may exceed the MAXGETK threshold. See the code for more details.
*/
/* Do NOT alter this first section */
Address COMMAND
Parse arg origin totf totk #blocks fn ft filelist,giveto,userdata
destination = Word(giveto origin,1) /* Actual destination */
'GLOBALV SELECT LISTSERV GET POSTMASTER MAXGET MAXGETK GETQWAIVE'
GETQWAIVE = GETQWAIVE postmaster
/* The following code is yours to configure */
/* GETQWAIVE as ORIGINATOR or DESTINATION bypasses the test */
If Find(GETQWAIVE,origin) ^== 0 |,
Find(GETQWAIVE,destination) ^== 0 Then Signal Ok
If totf ^< maxget Then Call Sorry 'too many files (more than' maxget') today. Y
If totf ^== 0 & totk+#blocks ^< maxgetk Then
If #blocks ^< maxgetk
Then If origin = destination
Then Call Sorry 'Sorry, the file you are attempting to order exceeds
Else Call Sorry 'Sorry, the file you are attempting to give exceeds t
Else Call Sorry 'too much data today (more than' maxgetk'Kb, counting the f
/* Otherwise it's ok */
Signal Ok
Ok:
/* The next two lines are for debugging purposes */
/* Call LSVTELL postmaster,'LSV$GETQ: Entering Ok subroutine' */
/* Call LSVTELL postmaster,'LSV$GETQ:' origin fn ft filelist */
Push date('O') Substr(time(),1,5) Substr(fn,1,8) Substr(ft,1,8) origin
'EXECIO 1 DISKW' filelist 'GETSTATS A'
Exit 0 userdata
Sorry:
Parse arg message,options
If Find(options,'NADOK') ^== 0 Then If LSVNAD(origin) Then Exit 0
If origin = destination
Then hdr = 'Sorry, you have ordered'
Else hdr = 'Sorry,' destination 'has been sent'
If Find(options,'NOHDR') == 0 Then message = hdr message
Call LSVLTELL origin,message
Exit 1 userdata
When:
mm = (1455-Time('M'))%15*15
If mm < 60 Then Return mm 'minutes'
hh = mm%60
mm = mm//60
If mm = 0 Then Return hh'h'
Return hh'h'mm
|