Monitoring System Operation
Example of a System Management Program
8–12
107365 Tandem Computers Incorporated
Figure 8-1. Monitoring System Status (Page 11 of 12)
== ---------------------------------------------------------
== Check the status of other devices
== ---------------------------------------------------------
#PUSH puplistdev scanline state device otherdevs
#OUTPUT Checking status of other devices ...
PUP /OUTV puplistdev/ LISTDEV
#EXTRACTV puplistdev scanline == headings
#EXTRACTV puplistdev scanline == blank
#EXTRACTV puplistdev scanline == $0
[#IF [#MATCH OFF [#CHARGET scanline 18 FOR 3] ]
|THEN| #OUTPUT $0 logging is OFF.
#OUTPUT
] == end if
#SET otherdevs -1
[#LOOP |WHILE| NOT [#EMPTYV puplistdev] | DO |
#EXTRACTV puplistdev scanline
#SET device [#CHARGET scanline 65 FOR 4]
== the #IF statement will skip:
== lines with no state (device is OK)
== lines with no device number (-B backups)
== lines with type 3 (disk, handled in above code)
== lines without a $ in device name (page banners)
#SET state [#CHARGET scanline 18 FOR 1]
[#IF NOT [#EMPTYV state] AND
NOT [#EMPTYV device] AND
NOT [#MATCH 3 [device]] AND
[#MATCH $ [#CHARGET scanline 6 FOR 1]]
|THEN|
[#IF otherdevs |THEN|
#SET otherdevs 0
#OUTPUT [Tcr]Check the following devices:[Tce]
] == end if