-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
38685cc
commit 8357eab
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/sh | ||
|
||
# put a time limit on a command | ||
alarm() { perl -e 'alarm shift; exec @ARGV' "$@"; } | ||
|
||
# location of the output file | ||
OUTLOCATION=/crabprod/CSstoragePath/Monitor | ||
OUTFILE=$OUTLOCATION/monitor-anaops-`/bin/date +%F-Z%R -u`.txt | ||
|
||
|
||
cat >> $OUTFILE <<EOF | ||
======================================================= ANAOPS POOL ======================================================= | ||
EOF | ||
# run analysis of analysis ops pool, with a time limit of 300s. | ||
alarm 300 /home/letts/scripts/condor_check glidein-collector-2.t2.ucsd.edu >> $OUTFILE | ||
rc=$? | ||
|
||
|
||
|
||
cat >> $OUTFILE <<EOF | ||
======================================================= GLOBAL POOL ======================================================= | ||
EOF | ||
# run analysis of global pool, with a time limit of 300s. | ||
alarm 300 /home/letts/scripts/condor_check vocms097.cern.ch short >> $OUTFILE | ||
|
||
cat >> $OUTFILE <<EOF | ||
===================================================== PRODUCTION POOL ===================================================== | ||
EOF | ||
alarm 300 /home/letts/scripts/condor_check vocms97.cern.ch short >> $OUTFILE | ||
|
||
|
||
# if everything ran correctly, then update the latest file: | ||
if [ $rc -eq 0 ] ; then | ||
LINKNAME=$OUTLOCATION/latest.txt | ||
rm $LINKNAME | ||
ln -s $OUTFILE $LINKNAME | ||
fi | ||
|
||
exit 0 |