Monitoring System Operation
Example of a System Management Program
8–4
107365 Tandem Computers Incorporated
Figure 8-1. Monitoring System Status (Page 3 of 12)
== For CPU status, -1 = up and 0 = down
[#IF cpustatus |THEN|
#OUTPUT [type] Processor [cpucounter] is up.
|ELSE|
#OUTPUT [Tcr][type] Processor [cpucounter] &
is down.[Tce]
] == end if
#SET cpucounter [#COMPUTE cpuc 1]
] == end loop
#UNFRAME
] == end define
cpuupordown [#PROCESSORSTATUS]
#OUTPUT
== ---------------------------------------------------------
== Display the file size of OPRLOG and ESLOG
== ---------------------------------------------------------
#PUSH filename maxext size termout eof pri sec
#SET filename $SYSTEM.SYSTEM.OPRLOG
[#IF [#FILEINFO/EXISTENCE/[filename]] |THEN|
#SETMANY eof pri sec, [#FILEINFO/EOF,PRIMARY,SECONDARY/&
[filename]]
#SET maxext [#COMPUTE [#FILEINFO/MAXEXTENTS/[filename]] &
- 1]
#SET size [#COMPUTE ( eof*100 ) / (( pri + &
(maxext*sec )) * 2048 )]
[#IF termout AND (size = 100) |THEN|
#OUTPUT [rev]OPRLOG is [size] percent full.[end]
|ELSE|
#OUTPUT OPRLOG is [size] percent full.
] == end if
|ELSE| == oprlog does not exist.
] == end if
#SET filename $SYSTEM.SYSTEM.ESLOG
[#IF [#FILEINFO/EXISTENCE/[filename]] |THEN|
#SETMANY eof pri sec, [#FILEINFO/EOF,PRIMARY,SECONDARY/&
[filename]]
#SET maxext [#COMPUTE [#FILEINFO/MAXEXTENTS/[filename]] &
- 1]
#SET size [#COMPUTE ( eof*100 ) / (( pri + &
(maxext*sec )) * 2048 )]
#OUTPUT ESLOG is [size] percent full.
|ELSE| == eslog does not exist.
] == end if