X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=automate-default.sh;h=a51144a2afbe719e57dbee5afca7c44814b768bd;hb=145829c491624619f34509d22b0cd1788f796f92;hp=3354a693ff41bf63ac05e682b64e69e3dcc51b0f;hpb=e637272100e8e03884188cb2118b21158e739bb0;p=monitor.git diff --git a/automate-default.sh b/automate-default.sh index 3354a69..a51144a 100755 --- a/automate-default.sh +++ b/automate-default.sh @@ -4,7 +4,7 @@ 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/ -$INSTALLPATH/shconfig.py > $INSTALLPATH/monitorconfig.sh +$INSTALLPATH/commands/shconfig.py > $INSTALLPATH/monitorconfig.sh source $INSTALLPATH/monitorconfig.sh cd ${MONITOR_SCRIPT_ROOT} set -e @@ -13,7 +13,7 @@ MONITOR_PID="${MONITOR_SCRIPT_ROOT}/SKIP" echo "#######################################"; echo "Running Monitor at $DATE"; echo "######################################" echo "Performing API test" -API=$(./testapi.py) +API=$(${MONITOR_SCRIPT_ROOT}/tools/testapi.py) if [ "$API" != "ok" ] ; then # NOTE: Do not try to run any commands if the API is obviously broken. echo "API IS DOWN : "`date` @@ -62,7 +62,7 @@ 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}/tools/syncwithplc.py $DATE || : +${MONITOR_SCRIPT_ROOT}/commands/syncwithplc.py $DATE || : service plc restart monitor echo "Performing FindAll Nodes" @@ -74,7 +74,7 @@ ps ax | grep BatchMode | grep -v grep | awk '{print $1}' | xargs -r kill || : ps ax | grep locfg | grep -v grep | awk '{print $1}' | xargs -r kill || : -${MONITOR_SCRIPT_ROOT}/policy.py $DATE || : +${MONITOR_SCRIPT_ROOT}/commands/policy.py $DATE || : curl -s 'http://summer.cs.princeton.edu/status/tabulator.cgi?table=table_nodeview&formatcsv' > /var/lib/monitor/comon/$DATE.comon.csv || : cp ${MONITOR_SCRIPT_ROOT}/monitor.log ${MONITOR_ARCHIVE_ROOT}/`date +%F-%H:%M`.monitor.log