Monitoring System Operation
Example of a System Management Program
107365 Tandem Computers Incorporated
8–7
Figure 8-1. Monitoring System Status (Page 6 of 12)
] == end def
#OUTPUT
== ---------------------------------------------------------
== Report on databases.
== (Insert database files that you want to monitor.)
== The format is: filename AcceptableIndexlevelNumber
== Example: LVL $SYSTEM.SYSTEM.USERID 1
== ---------------------------------------------------------
== ---------------------------------------------------------
== Display Spoolcom information
== ---------------------------------------------------------
#PUSH deverror spoolout line collector state size device
#PUSH errornum
#SET deverror 0
#OUTPUT
#OUTPUT SPOOLCOM information:
SPOOLCOM /OUTV spoolout/ ; COLLECT ; DEV
#EXTRACTV spoolout line == banner
#EXTRACTV spoolout line == blank line
#EXTRACTV spoolout line == first collector
[#LOOP |WHILE| NOT [#EMPTY [line]] |DO|
#SETMANY collector state, [line]
#SET size [#CHARGET line 74 FOR 2]
[#IF (size > 90) |THEN|
#OUTPUT /hold/ [Tcr]collector [collector] is [state]
#OUTPUT ~_AND is [size] percent full.[Tce]
] == end if
#EXTRACTV spoolout line == get next collector
] == end loop
#OUTPUT Checking devices ...
#EXTRACTV spoolout line == banner with device state etc.
#EXTRACTV spoolout line == first device
[#LOOP |WHILE| NOT [#EMPTYV line] |DO|
#SETMANY device state errornum, [#CHARGET line 1 FOR &
50]
[#IF NOT [#MATCH WAITING [state]] AND NOT [#MATCH JOB* &
[state]] |THEN|
#OUTPUT /HOLD/ [Tcr]device [device]
#OUTPUT /COLUMN 25/ is [state] [errornum][Tce]
#SET deverror -1
] == end if
#EXTRACTV spoolout line == get next device
] == end loop