#!/bin/sh

cd /var/www/html/stats

name='Server';  stat=$(cat ./comp_state.log)
(echo $name $stat) > sum_states.log

rm ./comp_state_as.log
wget -bq http://192.168.224.26/stats/comp_state_as.log
sleep 1
name='Allsky'; stat=$(cat ./comp_state_as.log)
(echo $name $stat) >> sum_states.log

rm ./comp_state_g1.log
wget -bq http://192.168.224.208/stats/comp_state_g1.log
sleep 1
name='Guppy1'; stat=$(cat ./comp_state_g1.log)
(echo $name $stat) >> sum_states.log


rm ./comp_state_g2.log
wget -bq http://192.168.224.27/stats/comp_state_g2.log
sleep 1           
name='Guppy2'; stat=$(cat ./comp_state_g2.log)
(echo $name $stat) >> sum_states.log

rm ./comp_state_gc.log
wget -bq http://192.168.224.207/stats/comp_state_gc.log
sleep 1
name='GuppyC'; stat=$(cat ./comp_state_gc.log)
(echo $name $stat) >> sum_states.log

rm ./comp_state_TW.log
wget -bq http://192.168.224.128/stats/comp_state_TW.log
sleep 1
name='GC780tw'; stat=$(cat ./comp_state_TW.log)
(echo $name $stat) >> sum_states.log

