ipscan

ipscan
IPSCAN counts the number of files caught in certain queues and displays these
and the totals for the last 2 scans. The first 5 files in that queue are also
displayed.
Parameter file tables/sys/SCAN is used to define which queues in spool to
monitor. Optionally two levels can be adjusted to give a total where a warning
is triggered and one where an error is triggered. In either case a message is
displayed and the program beeps. A script file can also be optionally started.
The syntax of the SCAN Parameter file is :
; comment
banner:\r\n--QUEUE----TOTALS-this-last-before
defwarn:"** Warning total exceeded **"
deferror:"** Error total exceeded **"
Where ..
banner: Heading or banner printed at the top of the screen
endpage: End of page printed at the bottom
default-warning:
or defwarn: Warning message
default-warning:
or deferror: Error message
default-delay:2
or defdelay:2 only log the error (or run script) after the 2nd scan
For each queue, the syntax is (each on a new line) :
; just scan 2brouted
queue:2brouted
; for 2go, BEEP if more than 20 files and run script if over 50
queue:2go warn:20:BEEP error:50:/fip/local/move2go
queue:woops error:1:"/fip/local/move2go \$h:\$n:\$b"
; if the queue is NOT under /fip/spool, start with a '/'
queue:/data1/fpo/opi/rubbish
The subkeywords for 'queue' are (all optional)
warn:(number of file):(optional script)
Use this total to flag a warning and (optionally) run a script
error:(number of file):(optional script)
Use this total to flag an error and (optionally) run a script
log:
If the number of files exceeds the error total, write an error to the Fip
ALL log.
delay:(positive number)
Only log/run script after the nth scan has passed
You can ignore the names of certain files and/or sub-queues with the ignore:
parameter. These take effect for ALL queues. By default, if a sub-queue called
'.rsrc' or begins 'Desktop' are ignored. 3 ignores are permitted.
ignore:NetworkTrash
ignore:G1SI05
Normally BEEP will do everytime the queue is over its total but the script is
ONLY run once. To run this script every cycle if timed out rather than
(default) on transition only - ie when times out and when recovers - use the
'everytime:' parameter on a line on its own.
everytime:
You can send the results of the scan to a Fip destination for further
processing using the 'file:(destination)' parameter where destination is a
valid DU in the USERS file. 'extra-fiphdr: (FipSeq) can be added to fill any
non-standard fields.
file:statussys
extra-fiphdr:#SZ:hosta,hostb#XZ:
If using the -d Daemon flag, the columns are automatically 'html-ified' with
<tr><td> etc
In this case, use something like :
; Column headings
banner:<table>\n<tr>\n<td><td
colspan=8>Number\sof\sFiles</tr>\n<tr>\n<td>Directory
Name</tr>\n
endpage:</table>
; name of output file - if there is NO -N input switch
newname: (FipSeq)
; run a script every cycle
script: (name of script in FipSeq)
Input flags are :
-1 : single run then stop default: continuous
(see also -N for output filename)
or
-b : do NOT beep on warning/error default: beep
-c : No of Columns - ie last totals - default: 8 (was 3)
maximum is 60
-d : daemon/service flag. Run in background to default: no
generate show files for IPSVCE.
If there is no -N, this leaves the file in x/SCAN.(name of parameter file)
forced uppercase.
It also ignores any screen formatting.
-f : name of parameter file in tables/sys default: SCAN
-f and -z are the same
-l : no of files to display per queue default: 5
-N : output file name in FipSeq default: name of parameter file
-o : output folder
default: /fip/spool/2go for file:destination
Note this is only used if there is a 'file' parameter
default: /fip/x for -d
default: none for normal running as the file is displayed and not saved to
disk
-O : Start scan on this number of seconds off the minute. default:26
-Q : show script errors for error and warn default:ignore them
-t : intervals between checks default: 60 secs
-z : name of parameter file in tables/sys default: SCAN
-f and -z are the same
-v : print version no and exit.
If 'ipscan' is being started by 'local/rc.fip' on reboot there is every chance
there will be no shell and no environment set - and in particular, no PATH. So
the full pathname of the script must be specified in the parameter file.
Use double quotes around any script which needs added parameters or has spaces
or other metacharaters in the name.
Version Control
;12w6 17feb98 added daemon and 'everytime'
;a 28apr98 WINNT inputs now work
;b/c 15apr99 minor mods
;d 07dec99 upped no of queues to 100
;e/f 22dec99 upped maximum directory name to 35 characters
;g/h 14may01 clr/clear for WINNT
;j 05oct01 added -c for NoOfColumns
;k/m 22oct01 allow programs/scripts to be in FipSeq plus bugette in counting
;n 15feb02 cleanup HTML version
;o 12apr02 added log:
;p 25apr03 small bugette in everytime
;q 01mar04 upped no of queues to 300
;r added dest and extrafiphdr
;s 07apr05 added endpage and put banner back in Daemon
;t 06apr06 file:dest used to work ONLY with -d daemon
;u-w5 7jun07 OK and scripts and delay ;3 added -Q NOTquiet for scripts ;4
21may12 -O added
;w6 15nov16 added newname -N and script
(copyright) 2017 and previous years FingerPost Ltd.