Skip to content

Commit 7c50d8f

Browse files
author
John P. Artieda
committed
Merge branch 'test-john'
Changes in scripts and acronjobs to read from scratch0/MonitoringScripts and follow github folder structure. All changes tested and running.
1 parent ac776a2 commit 7c50d8f

File tree

15 files changed

+81
-107
lines changed

15 files changed

+81
-107
lines changed

Pledges_View_SSB/prod_cores/Readme.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ output file prod.txt
66
web https://cmst1.web.cern.ch/CMST1/SST/prod.txt
77

88
—-
9-
Script in acrontab jartieda
10-
*/05 * * * * lxplus /afs/cern.ch/user/j/jartieda/MonitoringScripts/Pledges_View_SSB/prod_cores/run_prodcores.sh &> /dev/null
9+
Script in acrontab cmst1
10+
*/05 * * * * lxplus /afs/cern.ch/user/c/cmst1/scratch0/MonitoringScripts/Pledges_View_SSB/prod_cores/run_prodcores.sh &> /dev/null
Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
#!/bin/bash
22
clear
3-
location="/afs/cern.ch/user/j/jartieda/MonitoringScripts/Pledges_View_SSB/prod_cores"
3+
location="/afs/cern.ch/user/c/cmst1/scratch0/MonitoringScripts/Pledges_View_SSB/prod_cores"
4+
outputdir="/afs/cern.ch/user/c/cmst1/www/SST"
45
cd $location
56
# Email if things are running slowly
67
if [ -f scriptRunning.run ];
78
then
8-
echo "run_prodcores.sh is already running. Will send an email to the admin."
9-
# script to send simple email
10-
# email subject
11-
SUBJECT="[Prod[Cores]] load Prod[Cores]"
12-
# Email To ?
13-
14-
# Email text/message
15-
if [ -f emailmessage.txt ];
16-
then
17-
rm emailmessage.txt
18-
fi
19-
touch emailmessage.txt
20-
EMAILMESSAGE="/tmp/emailmessage.txt"
21-
echo "run_prodcores.sh is running to slowly."
22-
# send an email using /bin/mail
23-
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
24-
9+
echo "run_prodcores.sh is already running. Will send an email to the admin."
10+
# script to send simple email
11+
# email subject
12+
SUBJECT="Prod[Cores] running slowly"
13+
# Email To ?
14+
15+
# Email text/message
16+
if [ -f emailmessage.txt ];
17+
then
18+
rm emailmessage.txt
19+
fi
20+
touch emailmessage.txt
21+
EMAILMESSAGE="/tmp/emailmessage.txt"
22+
echo "run_prodcores.sh is stuck!!"> $EMAILMESSAGE
23+
echo $location >>$EMAILMESSAGE
24+
# send an email using /bin/mail
25+
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
2526
else
26-
echo "bash run_prodcores.sh succesfully"
27-
touch scriptRunning.run
27+
echo "bash run_prodcores.sh started succesfully"
28+
touch scriptRunning.run
2829
fi
2930

30-
3131
#Run the script
3232
txt="prod"
3333
echo "python prodcores.py"
@@ -37,7 +37,7 @@ problem="$?"
3737
echo "problem: $problem"
3838
echo "The files were created succesfully."
3939

40-
cp $txt".txt" /afs/cern.ch/user/c/cmst1/www/SST
41-
cp $txt".json" /afs/cern.ch/user/c/cmst1/www/SST
40+
cp $txt".txt" $outputdir
41+
cp $txt".json" $outputdir
4242

43-
rm scriptRunning.run
43+
rm scriptRunning.run

SR_View_SSB/ActiveSites/Readme.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ Active Sites: SR >=60% last 1 week OR last 3 months
1313
Any site that is not in this list will be automatically moved to the Waiting Room.
1414

1515
--- INFO ---
16-
# acronjob in acrontab jartieda
16+
# acronjob in acrontab cmst1
1717
# 00 08 * * 1 => Every monday at 8AM
18-
# 00 08 * * 1 lxplus /afs/cern.ch/user/j/jartieda/MonitoringScripts/SR_View_SSB/ActiveSites/sActiveSites.sh &> /dev/null
18+
# 00 08 * * 1 lxplus /afs/cern.ch/user/c/cmst1/scratch0/MonitoringScripts/SR_View_SSB/ActiveSites/sActiveSites.sh &> /dev/null
1919

2020
Script name:
2121
sActiveSites.sh
2222

2323
Script Location:
24-
/afs/cern.ch/user/j/jartieda/MonitoringScripts/SR_View_SSB/ActiveSites/
24+
/afs/cern.ch/user/c/cmst1/scratch0/MonitoringScripts/SR_View_SSB/ActiveSites
2525

2626
Github repository:
2727
https://github.com/CMSCompOps/MonitoringScripts/SR_View_SSB/ActiveSites/

SR_View_SSB/ActiveSites/sActiveSites.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
# Script and files location
4-
location="/afs/cern.ch/user/j/jartieda/MonitoringScripts/SR_View_SSB/ActiveSites"
4+
location="/afs/cern.ch/user/c/cmst1/scratch0/MonitoringScripts/SR_View_SSB/ActiveSites"
55
githublocation="https://raw.github.com/CMSCompOps/MonitoringScripts/master/SR_View_SSB/ActiveSites/"
66
outFile="./WasCommissionedT2ForSiteMonitor.txt"
77
ssbfeed="/afs/cern.ch/cms/LCG/SiteComm/T2WaitingList/WasCommissionedT2ForSiteMonitor.txt"
@@ -31,7 +31,7 @@ then
3131
# send an email using /bin/mail
3232
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
3333
else
34-
echo "* previous bash sActiveSites.sh run succesfully"
34+
echo "* previous bash sActiveSites.sh ran succesfully"
3535
touch scriptRunning.run
3636
fi
3737

SR_View_SSB/WRControl/Readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# web https://cmst1.web.cern.ch/CMST1/WFMon/WaitingRoom_Sites.txt
77
# Script in acrontab t1
88
# 5,20,35,50 * * * * => Every 15 minutes every day (starting at 00:05)
9-
# 5,20,35,50 * * * * lxplus ssh vocms202 /afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard/source_The_Run_File_WaitingRoom_Sites.sh &> /dev/null
9+
# 5,20,35,50 * * * * lxplus ssh vocms202 /afs/cern.ch/user/c/cmst1/scratch0/MonitoringScripts/SR_View_SSB/WRControl/source_The_Run_File_WaitingRoom_Sites.sh &> /dev/null

SR_View_SSB/WRControl/run_WaitingRoom_Sites.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22

3-
cd /afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard
3+
location="/afs/cern.ch/user/c/cmst1/scratch0/MonitoringScripts/SR_View_SSB/WRControl"
4+
outputdir="/afs/cern.ch/user/c/cmst1/www/WFMon/"
5+
cd $location
46

57
echo "exporting KEY and CERT"
68

@@ -15,7 +17,7 @@ then
1517
echo "run_WaitingRoom_Sites.sh is already running. Will send an email to the admin."
1618
# script to send simple email
1719
# email subject
18-
SUBJECT="[MonitoringScripts] WRControl running slow"
20+
SUBJECT="[MonitoringScripts] WRControl running slowly."
1921
# Email To ?
2022
2123
# Email text/message
@@ -25,13 +27,13 @@ then
2527
fi
2628
touch emailmessage.txt
2729
EMAILMESSAGE="/tmp/emailmessage.txt"
28-
echo "run_WaitingRoom_Sites.sh is running to slowly. See: /afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard/"> $EMAILMESSAGE
29-
echo "/afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard/" >>$EMAILMESSAGE
30+
echo "run_WaitingRoom_Sites.sh is running slowly." > $EMAILMESSAGE
31+
echo $location >> $EMAILMESSAGE
3032
# send an email using /bin/mail
3133
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
3234

3335
else
34-
echo "bash run_WaitingRoom_Sites.sh succesfully"
36+
echo "bash run_WaitingRoom_Sites.sh started succesfully"
3537
touch scriptRunning.run
3638
fi
3739

@@ -45,6 +47,6 @@ cat sites_WaitingRoom.log
4547
problem="$?"
4648
echo "problem: $problem"
4749

48-
cp $txt /afs/cern.ch/user/c/cmst1/www/WFMon/
49-
echo "WaitingRoom_Sites.txt copied to: /afs/cern.ch/user/c/cmst1/www/WFMon/ "
50+
cp $txt $outputdir
51+
echo "WaitingRoom_Sites.txt copied to: " $outputdir
5052
rm scriptRunning.run
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
2-
cd /afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard
2+
cd /afs/cern.ch/user/c/cmst1/scratch0/MonitoringScripts/SR_View_SSB/WRControl
33
source run_WaitingRoom_Sites.sh

SR_View_SSB/WRCriteria/Readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
# web https://cmst1.web.cern.ch/CMST1/WFMon/BadSites_SiteReadiness.txt
1010
# Script in acrontab t1
1111
# 5,20,35,50 * * * * => Every 15 minutes every day (starting at 00:05)
12-
# 5,20,35,50 * * * * lxplus ssh vocms202 /afs/cern.ch/user/c/cmst1/scratch0/SiteReadiness_Dashboard/run_badSites_SiteReadiness.sh &> /dev/null
12+
# 5,20,35,50 * * * * lxplus ssh vocms202 /afs/cern.ch/user/c/cmst1/scratch0/MonitoringScripts/SR_View_SSB/WRCriteria/run_badSites_SiteReadiness.sh &> /dev/null
Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,15 @@
11
#!/bin/sh
2-
#
3-
# Sten Luyckx
4-
# Script in acrontab t1
5-
# 5,20,35,50 * * * * lxplus ssh vocms202 /afs/cern.ch/user/c/cmst1/scratch0/SiteReadiness_Dashboard/run_badSites_SiteReadiness.sh &> /dev/null
6-
# Green red if : site readiness percentage is bigger or smaller than 60 % for both the last week as in the last 3 months
7-
# Script for Dashboard metric 152: SiteReadiness 1W&3M (>60%)
8-
# outputfile BadSites_SiteReadiness.txt
9-
# outputdir /afs/cern.ch/user/c/cmst1/www/WFMon/
10-
11-
12-
cd /afs/cern.ch/user/c/cmst1/scratch0/SiteReadiness_Dashboard
2+
location="/afs/cern.ch/user/c/cmst1/scratch0/MonitoringScripts/SR_View_SSB/WRCriteria/"
3+
outputdir="/afs/cern.ch/user/c/cmst1/www/WFMon/"
4+
cd $location
135

146
# Email if things are running slowly
157
if [ -f scriptRunning.run ];
168
then
179
echo "bash run_badSites_SiteReadiness.sh is already running. Will send an email to the admin."
1810
# script to send simple email
1911
# email subject
20-
SUBJECT="[MonitoringScripts] WRCriteria is running slow"
12+
SUBJECT="[MonitoringScripts] WRCriteria is running slowly"
2113
# Email To ?
2214
2315
# Email text/message
@@ -27,8 +19,8 @@ then
2719
fi
2820
touch emailmessage.txt
2921
EMAILMESSAGE="/tmp/emailmessage.txt"
30-
echo "Run_badSites_SiteReadiness.sh is running to slowly. See: /afs/cern.ch/user/c/cmst1/scratch0/SiteReadiness_Dashboard"> $EMAILMESSAGE
31-
echo "/afs/cern.ch/user/c/cmst1/scratch0/SiteReadiness_Dashboard" >>$EMAILMESSAGE
22+
echo "Run_badSites_SiteReadiness.sh is running slowly."> $EMAILMESSAGE
23+
echo $location >>$EMAILMESSAGE
3224
# send an email using /bin/mail
3325
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
3426

@@ -46,6 +38,6 @@ python badsites_SiteReadiness.py $txt &> badSites_SiteReadiness.log
4638
problem="$?"
4739
echo "problem: $problem"
4840

49-
cp $txt /afs/cern.ch/user/c/cmst1/www/WFMon/
50-
echo "BadSites_SiteReadiness.txt copied to: /afs/cern.ch/user/c/cmst1/www/WFMon/ "
41+
cp $txt $outputdir
42+
echo "BadSites_SiteReadiness.txt copied to: " $outputdir
5143
rm scriptRunning.run

SR_View_SSB/WRDays/Readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
# web https://cmst1.web.cern.ch/CMST1/WFMon/WaitingRoom_1MonthSum.txt
99
# Script in acrontab t1
1010
# 5,20,35,50 * * * * => Every 15 minutes every day (starting at 00:05)
11-
# 5,20,35,50 * * * * lxplus ssh vocms202 /afs/cern.ch/user/c/cmst1/scratch0/Waitingroom_Dashboard/Waitingroom_SummedMetric/run_WaitingRoom_Sites.sh &> /dev/null
11+
# 5,20,35,50 * * * * lxplus ssh vocms202 /afs/cern.ch/user/c/cmst1/scratch0/MonitoringScripts/SR_View_SSB/WRDays/run_WaitingRoom_Sites.sh &> /dev/null

0 commit comments

Comments
 (0)