Monitoring System Operation
Example of a System Management Program
107365 Tandem Computers Incorporated
8–3
Figure 8-1. Monitoring System Status (Page 2 of 12)
== ---------------------------------------------------------
== Display general system information
== ---------------------------------------------------------
#PUSH release version
#OUTPUT
#OUTPUT status for [#MYSYSTEM]
#OUTPUT [_CONTIME_TO_TEXT_DATE [#CONTIME [#TIMESTAMP]]]
#SETMANY release version , [#TOSVERSION]
[#IF [#MATCH [release] L ] |THEN| #SET release B ]
[#IF [#MATCH [release] M ] |THEN| #SET release C ]
#OUTPUT OPSYS: [release][version]
#OUTPUT SYSnn: &
[#FILEINFO/SUBVOL/[#PROCESSINFO/PROGRAMFILE/0,0]]
#POP release
#OUTPUT
== ---------------------------------------------------------
== Display whether configured processors
== are up or down, generalized to run on all systems.
== ---------------------------------------------------------
[#DEF cpuupordown ROUTINE |BODY|
#FRAME
#PUSH cpucounter cpustatus maxcpus type
#SET cpucounter 0
SINK [#ARGUMENT /TEXT maxcpus/ NUMBER] == cpu count
[#LOOP |WHILE| cpucounter < maxcpus |DO|
SINK [#ARGUMENT /TEXT cpustatus/ NUMBER]
[#CASE [#PROCESSORTYPE [cpucounter]]
| -2 | #SET type Unknown type
| -1 | #SET type Nonexistent
| 0 | #SET type TNS1
| 1 | #SET type TNS2
| 2 | #SET type TXP
| 3 | #SET type VLX
| 4 | #SET type CLX
| 5 | #SET type CYCLONE
] == end of CASE