1 |
fantasia |
1.1 |
#!/bin/bash
|
2 |
|
|
|
3 |
|
|
#Run with cron at the top of each hour with
|
4 |
|
|
#0 * * * * /nfshome0/fantasia/CMSSW_5_2_6_ONLINE/src/ErrorStream/runErrorStream.sh >& /dev/null
|
5 |
|
|
|
6 |
|
|
#back up report file
|
7 |
|
|
mv /tmp/fantasia/report.txt /tmp/fantasia/report.txt.old
|
8 |
|
|
|
9 |
|
|
cd ~/CMSSW_5_2_6_ONLINE/src/ErrorStream
|
10 |
|
|
./ErrorStreamProc.csh 0 0 0 100000 999999
|
11 |
|
|
|
12 |
|
|
#email list message
|
13 |
|
|
subject="Error Stream Report"
|
14 |
|
|
user="cory.fantasia@cern.ch"
|
15 |
|
|
|
16 |
|
|
if [ ! -e /tmp/fantasia/report.txt ]; then
|
17 |
|
|
echo "nothing in there"
|
18 |
|
|
echo "No new error stream files" >> /tmp/fantasia/report.txt
|
19 |
|
|
exit 0
|
20 |
|
|
fi
|
21 |
|
|
|
22 |
|
|
mail -s "${subject}" $user < /tmp/fantasia/report.txt
|
23 |
|
|
|