| author | wenzelm | 
| Sun, 16 Nov 2008 22:12:44 +0100 | |
| changeset 28817 | c8cc94a470d4 | 
| parent 28567 | 3caee0cd91d8 | 
| child 29926 | 7dac794eec91 | 
| permissions | -rw-r--r-- | 
| 22410 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 1 | # -*- shell-script -*- | 
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 2 | # $Id$ | 
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 3 | # Author: Gerwin Klein, NICTA | 
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 4 | # | 
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 5 | # DESCRIPTION: common settings for the isatest-* scripts | 
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 6 | |
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 7 | # source bashrc, we're called by cron | 
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 8 | . ~/.bashrc | 
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 9 | |
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 10 | # canoncical home for all platforms | 
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 11 | HOME=/home/isatest | 
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 12 | |
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 13 | ## send email on failure to | 
| 24782 | 14 | MAILTO="kleing@cse.unsw.edu.au nipkow@in.tum.de berghofe@in.tum.de schirmer@in.tum.de lp15@cam.ac.uk makarius@sketis.net haftmann@in.tum.de krauss@in.tum.de" | 
| 22410 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 15 | |
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 16 | LOGPREFIX=$HOME/log | 
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 17 | MASTERLOG=$LOGPREFIX/isatest.log | 
| 28539 
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
 kleing parents: 
24782diff
changeset | 18 | LOGSERVER=macbroy23.informatik.tu-muenchen.de | 
| 22410 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 19 | |
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 20 | ERRORDIR=$HOME/var | 
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 21 | ERRORLOG=$ERRORDIR/error.log | 
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 22 | |
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 23 | RUNNING=$HOME/var/running | 
| 
da313b67a04d
moved all isatest/cron job related files to own directory
 kleing parents: diff
changeset | 24 | |
| 28567 
3caee0cd91d8
change DISTPREFIX to not use yet another filesystem
 kleing parents: 
28539diff
changeset | 25 | DISTPREFIX=$HOME/isadist | 
| 28539 
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
 kleing parents: 
24782diff
changeset | 26 | |
| 
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
 kleing parents: 
24782diff
changeset | 27 | # this function avoids NFS inconsistencies with multiple writers by | 
| 
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
 kleing parents: 
24782diff
changeset | 28 | # sshing to one central machine and writing locally. There is stil a | 
| 
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
 kleing parents: 
24782diff
changeset | 29 | # race condition, but at least it should not corrupt a whole set of entries | 
| 
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
 kleing parents: 
24782diff
changeset | 30 | # any more. | 
| 
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
 kleing parents: 
24782diff
changeset | 31 | function log() | 
| 
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
 kleing parents: 
24782diff
changeset | 32 | {
 | 
| 
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
 kleing parents: 
24782diff
changeset | 33 | MSG="$1" | 
| 
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
 kleing parents: 
24782diff
changeset | 34 | TIMESTAMP="$(date)" | 
| 
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
 kleing parents: 
24782diff
changeset | 35 | echo "[$TIMESTAMP $HOSTNAME $PRG]: $MSG" | ssh $LOGSERVER "cat >> $MASTERLOG" | 
| 28567 
3caee0cd91d8
change DISTPREFIX to not use yet another filesystem
 kleing parents: 
28539diff
changeset | 36 | } |