author | wenzelm |
Wed, 28 Oct 2009 22:04:57 +0100 | |
changeset 33291 | 93f0238151f6 |
parent 31582 | 4753c317d5c1 |
child 33433 | c0648609f5ba |
permissions | -rw-r--r-- |
31310 | 1 |
# -*- shell-script -*- :mode=shellscript: |
31582 | 2 |
# |
22410
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 |
29926 | 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 blanchet@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:
24782
diff
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:
28539
diff
changeset
|
25 |
DISTPREFIX=$HOME/isadist |
28539
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents:
24782
diff
changeset
|
26 |
|
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents:
24782
diff
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:
24782
diff
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:
24782
diff
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:
24782
diff
changeset
|
30 |
# any more. |
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents:
24782
diff
changeset
|
31 |
function log() |
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents:
24782
diff
changeset
|
32 |
{ |
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents:
24782
diff
changeset
|
33 |
MSG="$1" |
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents:
24782
diff
changeset
|
34 |
TIMESTAMP="$(date)" |
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents:
24782
diff
changeset
|
35 |
echo "[$TIMESTAMP $HOSTNAME $PRG]: $MSG" | ssh $LOGSERVER "cat >> $MASTERLOG" |
28567
3caee0cd91d8
change DISTPREFIX to not use yet another filesystem
kleing
parents:
28539
diff
changeset
|
36 |
} |