#! /bin/sh # status - A CGI shell script that presents the current status of the TM-2 TM2=/jayar/e0/tm2 BIN=$TM2/bin TM2_SERVER=stars.eecg export TM2_SERVER nslots=`$BIN/tm2 getnslots` ncols=`expr $nslots + 1` cat < Transmogrifier 2 Status monitor !! slot="0" while test $slot != $nslots do status="$status `$BIN/tm2 getstatus $slot`" echo "" slot=`expr $slot + 1` done cat <<'!!' !! for i in "Housekeeping Programmed" "Logic FPGAS Programmed" "Clock Started" \ "Icubes Enabled" "Logic FPGAs Enabled" "Clock Drivers Enabled" do echo "" echo "" set $status status= slot="0" while test $slot != $nslots do echo "" status="$status `expr $1 : '.\(.*\)'`" slot=`expr $slot + 1` shift done echo "" done cat <<'!!'
TM-2 status monitor
!! $BIN/tm2 getdesigndir cat <
Loaded: !! $BIN/tm2 getdesigndate cat <
!! $BIN/tm2 getstatus1 cat <
!! $BIN/tm2 getstatus2 cat <<'!!'
#$slot
$i" bit=`expr $1 : '\(.\)'` if test $bit = "1"; then echo '' else echo '' fi echo "
!!