X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=automate-default.sh;h=8d300a7c0d4b9537bba3063eb417554107007c34;hb=40884a302bf204a7f42044b72d87f9431ad6dd35;hp=b5508c13ffacb32f1eb29e6d0c5840478e91a375;hpb=0fabfc8dbe8f1f2c0d12397e1bc8c6ed686fb5ed;p=monitor.git diff --git a/automate-default.sh b/automate-default.sh index b5508c1..8d300a7 100755 --- a/automate-default.sh +++ b/automate-default.sh @@ -1,7 +1,9 @@ #!/bin/bash +export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + # NOTE: Must be an absolute path to guarantee it is read. -INSTALLPATH=/usr/share/monitor-server/ +INSTALLPATH=/usr/share/monitor/ # Generate an 'sh' style file full of variables in monitor.conf $INSTALLPATH/shconfig.py > $INSTALLPATH/monitorconfig.sh source $INSTALLPATH/monitorconfig.sh @@ -60,68 +62,22 @@ fi #TODO: should add a call to ssh-add -l to check if the keys are loaded or not. source ${MONITOR_SCRIPT_ROOT}/agent.sh +#${MONITOR_SCRIPT_ROOT}/checksync.py $DATE || : +${MONITOR_SCRIPT_ROOT}/syncwithplc.py $DATE || : +service plc restart monitor -echo "Performing Findbad Nodes" +echo "Performing FindAll Nodes" ######################### # 1. FINDBAD NODES -rm -f ${MONITOR_DATA_ROOT}/production.findbad2.pkl -${MONITOR_SCRIPT_ROOT}/findbad.py --increment --cachenodes --debug=0 --dbname="findbad2" $DATE || : -cp ${MONITOR_DATA_ROOT}/production.findbad2.pkl ${MONITOR_DATA_ROOT}/production.findbad.pkl +${MONITOR_SCRIPT_ROOT}/findall.py $DATE || : ps ax | grep BatchMode | grep -v grep | awk '{print $1}' | xargs -r kill || : - -echo "Performing Findbad PCUs" -######################### -# 2. FINDBAD PCUS -rm -f ${MONITOR_DATA_ROOT}/production.findbadpcus2.pkl -${MONITOR_SCRIPT_ROOT}/findbadpcu.py --increment --refresh --debug=0 --dbname=findbadpcus2 $DATE || : -cp ${MONITOR_DATA_ROOT}/production.findbadpcus2.pkl ${MONITOR_DATA_ROOT}/production.findbadpcus.pkl # clean up stray 'locfg' processes that hang around inappropriately... ps ax | grep locfg | grep -v grep | awk '{print $1}' | xargs -r kill || : -#echo "Generating web data" -# badcsv.txt -#${MONITOR_SCRIPT_ROOT}/printbadcsv.py | grep -v loading | tr -d ' ' > badcsv.txt -#cp badcsv.txt /plc/data/var/www/html/monitor/ -#${MONITOR_SCRIPT_ROOT}/showlatlon.py | head -9 | awk 'BEGIN {print "
", $0, " |