-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes in scripts and acronjobs to read from scratch0/MonitoringScripts and follow github folder structure. All changes tested and running.
- Loading branch information
John P. Artieda
committed
Jun 6, 2014
1 parent
ac776a2
commit 7c50d8f
Showing
15 changed files
with
81 additions
and
107 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
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 |
---|---|---|
@@ -1,33 +1,33 @@ | ||
#!/bin/bash | ||
clear | ||
location="/afs/cern.ch/user/j/jartieda/MonitoringScripts/Pledges_View_SSB/prod_cores" | ||
location="/afs/cern.ch/user/c/cmst1/scratch0/MonitoringScripts/Pledges_View_SSB/prod_cores" | ||
outputdir="/afs/cern.ch/user/c/cmst1/www/SST" | ||
cd $location | ||
# Email if things are running slowly | ||
if [ -f scriptRunning.run ]; | ||
then | ||
echo "run_prodcores.sh is already running. Will send an email to the admin." | ||
# script to send simple email | ||
# email subject | ||
SUBJECT="[Prod[Cores]] load Prod[Cores]" | ||
# Email To ? | ||
EMAIL="[email protected], [email protected]" | ||
# Email text/message | ||
if [ -f emailmessage.txt ]; | ||
then | ||
rm emailmessage.txt | ||
fi | ||
touch emailmessage.txt | ||
EMAILMESSAGE="/tmp/emailmessage.txt" | ||
echo "run_prodcores.sh is running to slowly." | ||
# send an email using /bin/mail | ||
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE | ||
|
||
echo "run_prodcores.sh is already running. Will send an email to the admin." | ||
# script to send simple email | ||
# email subject | ||
SUBJECT="Prod[Cores] running slowly" | ||
# Email To ? | ||
EMAIL="[email protected]" | ||
# Email text/message | ||
if [ -f emailmessage.txt ]; | ||
then | ||
rm emailmessage.txt | ||
fi | ||
touch emailmessage.txt | ||
EMAILMESSAGE="/tmp/emailmessage.txt" | ||
echo "run_prodcores.sh is stuck!!"> $EMAILMESSAGE | ||
echo $location >>$EMAILMESSAGE | ||
# send an email using /bin/mail | ||
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE | ||
else | ||
echo "bash run_prodcores.sh succesfully" | ||
touch scriptRunning.run | ||
echo "bash run_prodcores.sh started succesfully" | ||
touch scriptRunning.run | ||
fi | ||
|
||
|
||
#Run the script | ||
txt="prod" | ||
echo "python prodcores.py" | ||
|
@@ -37,7 +37,7 @@ problem="$?" | |
echo "problem: $problem" | ||
echo "The files were created succesfully." | ||
|
||
cp $txt".txt" /afs/cern.ch/user/c/cmst1/www/SST | ||
cp $txt".json" /afs/cern.ch/user/c/cmst1/www/SST | ||
cp $txt".txt" $outputdir | ||
cp $txt".json" $outputdir | ||
|
||
rm scriptRunning.run | ||
rm scriptRunning.run |
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
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
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
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
#!/bin/bash | ||
|
||
cd /afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard | ||
location="/afs/cern.ch/user/c/cmst1/scratch0/MonitoringScripts/SR_View_SSB/WRControl" | ||
outputdir="/afs/cern.ch/user/c/cmst1/www/WFMon/" | ||
cd $location | ||
|
||
echo "exporting KEY and CERT" | ||
|
||
|
@@ -15,7 +17,7 @@ then | |
echo "run_WaitingRoom_Sites.sh is already running. Will send an email to the admin." | ||
# script to send simple email | ||
# email subject | ||
SUBJECT="[MonitoringScripts] WRControl running slow" | ||
SUBJECT="[MonitoringScripts] WRControl running slowly." | ||
# Email To ? | ||
EMAIL="[email protected]" | ||
# Email text/message | ||
|
@@ -25,13 +27,13 @@ then | |
fi | ||
touch emailmessage.txt | ||
EMAILMESSAGE="/tmp/emailmessage.txt" | ||
echo "run_WaitingRoom_Sites.sh is running to slowly. See: /afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard/"> $EMAILMESSAGE | ||
echo "/afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard/" >>$EMAILMESSAGE | ||
echo "run_WaitingRoom_Sites.sh is running slowly." > $EMAILMESSAGE | ||
echo $location >> $EMAILMESSAGE | ||
# send an email using /bin/mail | ||
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE | ||
|
||
else | ||
echo "bash run_WaitingRoom_Sites.sh succesfully" | ||
echo "bash run_WaitingRoom_Sites.sh started succesfully" | ||
touch scriptRunning.run | ||
fi | ||
|
||
|
@@ -45,6 +47,6 @@ cat sites_WaitingRoom.log | |
problem="$?" | ||
echo "problem: $problem" | ||
|
||
cp $txt /afs/cern.ch/user/c/cmst1/www/WFMon/ | ||
echo "WaitingRoom_Sites.txt copied to: /afs/cern.ch/user/c/cmst1/www/WFMon/ " | ||
cp $txt $outputdir | ||
echo "WaitingRoom_Sites.txt copied to: " $outputdir | ||
rm scriptRunning.run |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
cd /afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard | ||
cd /afs/cern.ch/user/c/cmst1/scratch0/MonitoringScripts/SR_View_SSB/WRControl | ||
source run_WaitingRoom_Sites.sh |
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
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 |
---|---|---|
@@ -1,23 +1,15 @@ | ||
#!/bin/sh | ||
# | ||
# Sten Luyckx | ||
# Script in acrontab t1 | ||
# 5,20,35,50 * * * * lxplus ssh vocms202 /afs/cern.ch/user/c/cmst1/scratch0/SiteReadiness_Dashboard/run_badSites_SiteReadiness.sh &> /dev/null | ||
# Green red if : site readiness percentage is bigger or smaller than 60 % for both the last week as in the last 3 months | ||
# Script for Dashboard metric 152: SiteReadiness 1W&3M (>60%) | ||
# outputfile BadSites_SiteReadiness.txt | ||
# outputdir /afs/cern.ch/user/c/cmst1/www/WFMon/ | ||
|
||
|
||
cd /afs/cern.ch/user/c/cmst1/scratch0/SiteReadiness_Dashboard | ||
location="/afs/cern.ch/user/c/cmst1/scratch0/MonitoringScripts/SR_View_SSB/WRCriteria/" | ||
outputdir="/afs/cern.ch/user/c/cmst1/www/WFMon/" | ||
cd $location | ||
|
||
# Email if things are running slowly | ||
if [ -f scriptRunning.run ]; | ||
then | ||
echo "bash run_badSites_SiteReadiness.sh is already running. Will send an email to the admin." | ||
# script to send simple email | ||
# email subject | ||
SUBJECT="[MonitoringScripts] WRCriteria is running slow" | ||
SUBJECT="[MonitoringScripts] WRCriteria is running slowly" | ||
# Email To ? | ||
EMAIL="[email protected]" | ||
# Email text/message | ||
|
@@ -27,8 +19,8 @@ then | |
fi | ||
touch emailmessage.txt | ||
EMAILMESSAGE="/tmp/emailmessage.txt" | ||
echo "Run_badSites_SiteReadiness.sh is running to slowly. See: /afs/cern.ch/user/c/cmst1/scratch0/SiteReadiness_Dashboard"> $EMAILMESSAGE | ||
echo "/afs/cern.ch/user/c/cmst1/scratch0/SiteReadiness_Dashboard" >>$EMAILMESSAGE | ||
echo "Run_badSites_SiteReadiness.sh is running slowly."> $EMAILMESSAGE | ||
echo $location >>$EMAILMESSAGE | ||
# send an email using /bin/mail | ||
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE | ||
|
||
|
@@ -46,6 +38,6 @@ python badsites_SiteReadiness.py $txt &> badSites_SiteReadiness.log | |
problem="$?" | ||
echo "problem: $problem" | ||
|
||
cp $txt /afs/cern.ch/user/c/cmst1/www/WFMon/ | ||
echo "BadSites_SiteReadiness.txt copied to: /afs/cern.ch/user/c/cmst1/www/WFMon/ " | ||
cp $txt $outputdir | ||
echo "BadSites_SiteReadiness.txt copied to: " $outputdir | ||
rm scriptRunning.run |
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
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 |
---|---|---|
@@ -1,23 +1,14 @@ | ||
#!/bin/bash | ||
# Script in acrontab t1 | ||
# 5,20,35,50 * * * * lxplus ssh vocms202 /afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard/Waitingroom_SummedMetric/run_WaitingRoom_Sites.sh &> /dev/null | ||
# Script for Dashboard metric 154, 155, 156 | ||
# outputfile WaitingRoom_1MonthSum.txt | ||
# outputfile WaitingRoom_2MonthSum.txt | ||
# outputfile WaitingRoom_3MonthSum.txt | ||
# this script read all of data from http://dashb-ssb.cern.ch/dashboard/ according to column, dateFrom, dateTo, sites and it calculates How many days Sites are in WaitingRoom as last 1 month, last 2 months, last 3 months. | ||
clear | ||
#fixing access | ||
#source /afs/cern.ch/project/gd/LCG-share/new_3.2/etc/profile.d/grid_env.sh | ||
#voms-proxy-init -voms cms | ||
# Email if things are running slowly | ||
location="/afs/cern.ch/user/c/cmst1/scratch0/MonitoringScripts/SR_View_SSB/WRDays/" | ||
outputdir="afs/cern.ch/user/c/cmst1/www/WFMon/" | ||
cd $location | ||
|
||
if [ -f scriptRunning.run ]; | ||
then | ||
echo "run_WaitingRoom_SumMetrics.sh is already running. Will send an email to the admin." | ||
# script to send simple email | ||
# email subject | ||
SUBJECT="[MonitoringScripts] WRDays running slow" | ||
SUBJECT="[MonitoringScripts] WRDays running slowly" | ||
# Email To ? | ||
EMAIL="[email protected]" | ||
# Email text/message | ||
|
@@ -27,26 +18,25 @@ then | |
fi | ||
touch emailmessage.txt | ||
EMAILMESSAGE="/tmp/emailmessage.txt" | ||
echo "run_WaitingRoom_SumMetrics.sh is running to slowly. See: /afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard/Waitingroom_SummedMetric/"> $EMAILMESSAGE | ||
echo "/afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard/Waitingroom_SummedMetric/" >>$EMAILMESSAGE | ||
echo "run_WaitingRoom_SumMetrics.sh is running slowly."> $EMAILMESSAGE | ||
echo $location >>$EMAILMESSAGE | ||
# send an email using /bin/mail | ||
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE | ||
|
||
else | ||
echo "bash run_WaitingRoom_SumMetrics.sh succesfully" | ||
echo "bash run_WaitingRoom_SumMetrics.sh started succesfully" | ||
touch scriptRunning.run | ||
fi | ||
|
||
|
||
#Run the script | ||
txt="WaitingRoom_" #postfix in code itself | ||
echo "python waitingRoom_SummedMetrics.py $txt1" | ||
python /afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard/Waitingroom_SummedMetric/waitingRoom_SummedMetrics.py $txt &> /afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard/Waitingroom_SummedMetric/sites_WaitingRoom_SummedMetrics.log | ||
#cat sites_WaitingRoom_SummedMetrics.log | ||
python waitingRoom_SummedMetrics.py $txt &> sites_WaitingRoom_SummedMetrics.log | ||
|
||
problem="$?" | ||
echo "problem: $problem" | ||
|
||
cp "/afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard/Waitingroom_SummedMetric/"$txt*.txt /afs/cern.ch/user/c/cmst1/www/WFMon/ | ||
echo "WaitingRoom_XMonthSum.txt files copied to: /afs/cern.ch/user/c/cmst1/www/WFMon/ " | ||
rm scriptRunning.run | ||
cp $txt*.txt $outputdir | ||
echo "WaitingRoom_XMonthSum.txt files copied to: " $outputdir | ||
rm scriptRunning.run |
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
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 |
---|---|---|
@@ -1,21 +1,18 @@ | ||
#!/bin/sh | ||
# before copying files please do a git pull at: | ||
base="/afs/cern.ch/user/j/jartieda/MonitoringScripts/" | ||
cd $base | ||
location="/afs/cern.ch/user/c/cmst1/scratch0/MonitoringScripts/SR_View_SSB" | ||
cd $location | ||
git pull | ||
|
||
location=$base"SR_View_SSB/" | ||
|
||
#ActiveSites | ||
# Already in the right location: $location/ActiveSites/ | ||
|
||
#WRControl | ||
cp -a $location/WRControl/. /afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard/ | ||
#cp -a $location/WRControl/. /afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard/ | ||
|
||
#WRCriteria | ||
cp -a $location/WRCriteria/. /afs/cern.ch/user/c/cmst1/scratch0/SiteReadiness_Dashboard/ | ||
#cp -a $location/WRCriteria/. /afs/cern.ch/user/c/cmst1/scratch0/SiteReadiness_Dashboard/ | ||
|
||
#WRDays | ||
cp -a $location/WRDays/. /afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard/Waitingroom_SummedMetric/ | ||
#cp -a $location/WRDays/. /afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard/Waitingroom_SummedMetric/ | ||
|
||
echo "*** All copies completed ***" | ||
#echo "*** All copies completed ***" |
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
Oops, something went wrong.