Admin/isatest/isatest-settings
author kleing
Thu, 09 Oct 2008 09:18:32 +0200
changeset 28539 bdb308737bfd
parent 24782 38e5c05ef741
child 28567 3caee0cd91d8
permissions -rw-r--r--
do logging to MASTERLOG centrally (avoid multiple writers over NFS as this tends to corrupt the log file if not mounted with -sync option which apparently is not the default any more).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
38e5c05ef741 switch notification email back on
isatest
parents: 24781
diff changeset
    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: 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
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    25
DISTPREFIX=$HOME/tmp/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"
bdb308737bfd do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents: 24782
diff changeset
    36
}