author | wenzelm |
Sat, 15 Feb 2014 18:28:18 +0100 | |
changeset 55505 | 2a1ca7f6607b |
parent 48157 | 303a7384cffd |
child 58440 | 07505e95db40 |
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 |
38250 | 14 |
MAILTO="\ |
15 |
kleing@cse.unsw.edu.au \ |
|
16 |
nipkow@in.tum.de \ |
|
17 |
berghofe@in.tum.de \ |
|
18 |
lp15@cam.ac.uk \ |
|
19 |
makarius@sketis.net \ |
|
20 |
blanchet@in.tum.de \ |
|
21 |
boehmes@in.tum.de \ |
|
22 |
bulwahn@in.tum.de \ |
|
23 |
hoelzl@in.tum.de \ |
|
24 |
krauss@in.tum.de \ |
|
47103 | 25 |
noschinl@in.tum.de \ |
47309 | 26 |
kuncar@in.tum.de \ |
27 |
ns441@cam.ac.uk" |
|
22410
da313b67a04d
moved all isatest/cron job related files to own directory
kleing
parents:
diff
changeset
|
28 |
|
da313b67a04d
moved all isatest/cron job related files to own directory
kleing
parents:
diff
changeset
|
29 |
LOGPREFIX=$HOME/log |
da313b67a04d
moved all isatest/cron job related files to own directory
kleing
parents:
diff
changeset
|
30 |
MASTERLOG=$LOGPREFIX/isatest.log |
48157
303a7384cffd
moved crontab to lxbroy2, one of the newer server machines;
wenzelm
parents:
48147
diff
changeset
|
31 |
LOGSERVER=lxbroy2.informatik.tu-muenchen.de |
22410
da313b67a04d
moved all isatest/cron job related files to own directory
kleing
parents:
diff
changeset
|
32 |
|
da313b67a04d
moved all isatest/cron job related files to own directory
kleing
parents:
diff
changeset
|
33 |
ERRORDIR=$HOME/var |
da313b67a04d
moved all isatest/cron job related files to own directory
kleing
parents:
diff
changeset
|
34 |
ERRORLOG=$ERRORDIR/error.log |
da313b67a04d
moved all isatest/cron job related files to own directory
kleing
parents:
diff
changeset
|
35 |
|
da313b67a04d
moved all isatest/cron job related files to own directory
kleing
parents:
diff
changeset
|
36 |
RUNNING=$HOME/var/running |
da313b67a04d
moved all isatest/cron job related files to own directory
kleing
parents:
diff
changeset
|
37 |
|
28567
3caee0cd91d8
change DISTPREFIX to not use yet another filesystem
kleing
parents:
28539
diff
changeset
|
38 |
DISTPREFIX=$HOME/isadist |
28539
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents:
24782
diff
changeset
|
39 |
|
45908
143d2514347f
enforce short hostname on all platforms (especially macbroy2);
wenzelm
parents:
45253
diff
changeset
|
40 |
HOSTNAME="$(hostname -s)" |
143d2514347f
enforce short hostname on all platforms (especially macbroy2);
wenzelm
parents:
45253
diff
changeset
|
41 |
|
28539
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents:
24782
diff
changeset
|
42 |
# 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
|
43 |
# 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
|
44 |
# 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
|
45 |
# any more. |
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents:
24782
diff
changeset
|
46 |
function log() |
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents:
24782
diff
changeset
|
47 |
{ |
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents:
24782
diff
changeset
|
48 |
MSG="$1" |
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents:
24782
diff
changeset
|
49 |
TIMESTAMP="$(date)" |
bdb308737bfd
do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents:
24782
diff
changeset
|
50 |
echo "[$TIMESTAMP $HOSTNAME $PRG]: $MSG" | ssh $LOGSERVER "cat >> $MASTERLOG" |
28567
3caee0cd91d8
change DISTPREFIX to not use yet another filesystem
kleing
parents:
28539
diff
changeset
|
51 |
} |