#!/bin/tcsh -f

#
# read arguments
#
set SRV=$1
set IPADDR=$2

#
# exe path and options
#

set TS = `date`
tbit -m 512 -t InitWin $IPADDR > tmp 
set tbitstat=$status
#
# if okay, store results 
#
echo -n $tbitstat $TS $SRV $IPADDR " "
set RES="-"
if ($tbitstat == 0) then
	set RES = `tail -1 tmp | sed "s/\#//g" | sed "s/=/ /g"`
endif
echo $RES
echo "$tbitstat $TS $SRV $IPADDR $RES" >> MASTERLOG
