X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=automate_pl03.sh;h=a7712b491c6fb295f78976665fd9ff5c27c9ac6f;hb=d1f853e1768bcffcae0aba5938359f18fbb96bd1;hp=4cf870d4f7843b078f94ee00f61ed1df2769ffa3;hpb=e657f16ca10a4e41f8fa4ab2d28317081cb28dcb;p=monitor.git diff --git a/automate_pl03.sh b/automate_pl03.sh index 4cf870d..a7712b4 100755 --- a/automate_pl03.sh +++ b/automate_pl03.sh @@ -2,16 +2,37 @@ set -e cd $HOME/monitor/ +DATE=`date +%Y-%m-%d-%T` + +if [ -f $HOME/monitor/SKIP ] ; then + # echo "SKIPPING Monitor" + # exit + # TODO: should be possible to kill the old version if + # desired and prevent lingering instances of automate. + if [ -z "$1" ] ; then + echo "KILLING Monitor" + PID=`cat $HOME/monitor/SKIP` + rm -f $HOME/monitor/SKIP + ./kill.cmd.sh $PID + else + # skipping monitor + echo "SKIPPING Monitor" + exit + fi +fi +echo $$ > $HOME/monitor/SKIP ######################### # 1. FINDBAD NODES rm -f pdb/production.findbad2.pkl -./findbad.py --cachenodes --debug=0 --dbname="findbad2" +./findbad.py --increment --cachenodes --debug=0 --dbname="findbad2" $DATE + +ps ax | grep BatchMode | grep -v grep | awk '{print $1}' | xargs kill || : ######################## # COPY to golf for diagnose.py and action.py cp pdb/production.findbad2.pkl pdb/production.findbad.pkl -scp pdb/production.findbad2.pkl soltesz@golf.cs.princeton.edu:monitor3/pdb/production.findbad.pkl +#scp pdb/production.findbad2.pkl soltesz@golf.cs.princeton.edu:monitor3/pdb/production.findbad.pkl ######################## # COPY Act_all records @@ -21,16 +42,38 @@ scp pdb/production.findbad2.pkl soltesz@golf.cs.princeton.edu:monitor3/pdb/produ # badcsv.txt ./printbadcsv.py | grep -v loading | tr -d ' ' > badcsv.txt cp badcsv.txt /plc/data/var/www/html/monitor/ +./showlatlon.py | head -9 | awk 'BEGIN {print "
", $0, " |