From bceda22896c75a7a22bbb93f6579d376545156ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Mon, 30 Nov 2009 21:56:53 +0000 Subject: [PATCH] * mv the commands that fit in monitors (or operation teams) work-flow to 'commands' directory. * mv special purpose commands to 'tools' directory. --- Monitor.spec | 2 +- automate-default.sh | 8 +++----- blacklist.py => commands/blacklist.py | 0 bootman.py => commands/bootman.py | 0 checksync.py => commands/checksync.py | 0 comonquery.py => commands/comonquery.py | 0 findall.py => commands/findall.py | 0 findbad.py => commands/findbad.py | 0 findbadpcu.py => commands/findbadpcu.py | 0 nodebad.py => commands/nodebad.py | 0 nodeconfig.py => commands/nodeconfig.py | 0 nodegroups.py => commands/nodegroups.py | 0 nodeinfo.py => commands/nodeinfo.py | 0 nodequery.py => commands/nodequery.py | 0 pcubad.py => commands/pcubad.py | 0 pcuinfo.py => commands/pcuinfo.py | 0 plcquery.py => commands/plcquery.py | 0 policy.py => commands/policy.py | 0 shconfig.py => commands/shconfig.py | 0 sitebad.py => commands/sitebad.py | 0 siteinfo.py => commands/siteinfo.py | 0 siteleave.py => commands/siteleave.py | 0 syncwithplc.py => commands/syncwithplc.py | 0 model.txt => docs/model.txt | 0 rt_db | 4 ---- {automate => tools/automate}/automate.py | 0 {automate => tools/automate}/fetch.py | 0 {automate => tools/automate}/query.py | 0 {automate => tools/automate}/vxargs.py | 0 {extra => tools/extra}/nodeaction.py | 0 {extra => tools/extra}/nodediff.py | 0 {extra => tools/extra}/nodehistory.py | 0 {extra => tools/extra}/nodesets.py | 0 {extra => tools/extra}/pcutest.py | 0 {extra => tools/extra}/pkl2php.py | 0 {extra => tools/extra}/prep_power_users.py | 0 {extra => tools/extra}/printpdb.py | 0 {extra => tools/extra}/showlatlon.py | 0 {extra => tools/extra}/template.py | 0 getsshkeys.py => tools/getsshkeys.py | 0 kill.cmd.sh => tools/kill.cmd.sh | 0 {nagios => tools}/plc2nagios.py | 0 setup-agent.sh => tools/setup-agent.sh | 0 testapi.py => tools/testapi.py | 0 timeout.pl => tools/timeout.pl | 0 45 files changed, 4 insertions(+), 10 deletions(-) rename blacklist.py => commands/blacklist.py (100%) rename bootman.py => commands/bootman.py (100%) rename checksync.py => commands/checksync.py (100%) rename comonquery.py => commands/comonquery.py (100%) rename findall.py => commands/findall.py (100%) rename findbad.py => commands/findbad.py (100%) rename findbadpcu.py => commands/findbadpcu.py (100%) rename nodebad.py => commands/nodebad.py (100%) rename nodeconfig.py => commands/nodeconfig.py (100%) rename nodegroups.py => commands/nodegroups.py (100%) rename nodeinfo.py => commands/nodeinfo.py (100%) rename nodequery.py => commands/nodequery.py (100%) rename pcubad.py => commands/pcubad.py (100%) rename pcuinfo.py => commands/pcuinfo.py (100%) rename plcquery.py => commands/plcquery.py (100%) rename policy.py => commands/policy.py (100%) rename shconfig.py => commands/shconfig.py (100%) rename sitebad.py => commands/sitebad.py (100%) rename siteinfo.py => commands/siteinfo.py (100%) rename siteleave.py => commands/siteleave.py (100%) rename syncwithplc.py => commands/syncwithplc.py (100%) rename model.txt => docs/model.txt (100%) delete mode 100644 rt_db rename {automate => tools/automate}/automate.py (100%) rename {automate => tools/automate}/fetch.py (100%) rename {automate => tools/automate}/query.py (100%) rename {automate => tools/automate}/vxargs.py (100%) rename {extra => tools/extra}/nodeaction.py (100%) rename {extra => tools/extra}/nodediff.py (100%) rename {extra => tools/extra}/nodehistory.py (100%) rename {extra => tools/extra}/nodesets.py (100%) rename {extra => tools/extra}/pcutest.py (100%) rename {extra => tools/extra}/pkl2php.py (100%) rename {extra => tools/extra}/prep_power_users.py (100%) rename {extra => tools/extra}/printpdb.py (100%) rename {extra => tools/extra}/showlatlon.py (100%) rename {extra => tools/extra}/template.py (100%) rename getsshkeys.py => tools/getsshkeys.py (100%) rename kill.cmd.sh => tools/kill.cmd.sh (100%) rename {nagios => tools}/plc2nagios.py (100%) rename setup-agent.sh => tools/setup-agent.sh (100%) rename testapi.py => tools/testapi.py (100%) rename timeout.pl => tools/timeout.pl (100%) diff --git a/Monitor.spec b/Monitor.spec index 9d47dec..0665e61 100644 --- a/Monitor.spec +++ b/Monitor.spec @@ -131,7 +131,7 @@ rm -rf $RPM_BUILD_ROOT #################### CLIENT #install -D -m 755 monitor-client.init $RPM_BUILD_ROOT/%{_initrddir}/monitor #install -D -m 644 monitor.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/monitor -install -D -m 755 timeout.pl $RPM_BUILD_ROOT/usr/bin/timeout.pl +install -D -m 755 tools/timeout.pl $RPM_BUILD_ROOT/usr/bin/timeout.pl #################### SERVER diff --git a/automate-default.sh b/automate-default.sh index c0b4b7b..3354a69 100755 --- a/automate-default.sh +++ b/automate-default.sh @@ -26,7 +26,7 @@ if [ -f $MONITOR_PID ] ; then PID=`cat $MONITOR_PID` rm -f $MONITOR_PID if [ -z $PID ] ; then - ${MONITOR_SCRIPT_ROOT}/kill.cmd.sh $PID + ${MONITOR_SCRIPT_ROOT}/tools/kill.cmd.sh $PID echo "done." else echo "No PID to be killed." @@ -62,21 +62,19 @@ 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 || : +${MONITOR_SCRIPT_ROOT}/tools/syncwithplc.py $DATE || : service plc restart monitor echo "Performing FindAll Nodes" ######################### # 1. FINDBAD NODES -${MONITOR_SCRIPT_ROOT}/findall.py $DATE || : +${MONITOR_SCRIPT_ROOT}/commands/findall.py $DATE || : ps ax | grep BatchMode | grep -v grep | awk '{print $1}' | xargs -r kill || : # clean up stray 'locfg' processes that hang around inappropriately... ps ax | grep locfg | grep -v grep | awk '{print $1}' | xargs -r kill || : ${MONITOR_SCRIPT_ROOT}/policy.py $DATE || : -${MONITOR_SCRIPT_ROOT}/statistics/add-record.py || : 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 diff --git a/blacklist.py b/commands/blacklist.py similarity index 100% rename from blacklist.py rename to commands/blacklist.py diff --git a/bootman.py b/commands/bootman.py similarity index 100% rename from bootman.py rename to commands/bootman.py diff --git a/checksync.py b/commands/checksync.py similarity index 100% rename from checksync.py rename to commands/checksync.py diff --git a/comonquery.py b/commands/comonquery.py similarity index 100% rename from comonquery.py rename to commands/comonquery.py diff --git a/findall.py b/commands/findall.py similarity index 100% rename from findall.py rename to commands/findall.py diff --git a/findbad.py b/commands/findbad.py similarity index 100% rename from findbad.py rename to commands/findbad.py diff --git a/findbadpcu.py b/commands/findbadpcu.py similarity index 100% rename from findbadpcu.py rename to commands/findbadpcu.py diff --git a/nodebad.py b/commands/nodebad.py similarity index 100% rename from nodebad.py rename to commands/nodebad.py diff --git a/nodeconfig.py b/commands/nodeconfig.py similarity index 100% rename from nodeconfig.py rename to commands/nodeconfig.py diff --git a/nodegroups.py b/commands/nodegroups.py similarity index 100% rename from nodegroups.py rename to commands/nodegroups.py diff --git a/nodeinfo.py b/commands/nodeinfo.py similarity index 100% rename from nodeinfo.py rename to commands/nodeinfo.py diff --git a/nodequery.py b/commands/nodequery.py similarity index 100% rename from nodequery.py rename to commands/nodequery.py diff --git a/pcubad.py b/commands/pcubad.py similarity index 100% rename from pcubad.py rename to commands/pcubad.py diff --git a/pcuinfo.py b/commands/pcuinfo.py similarity index 100% rename from pcuinfo.py rename to commands/pcuinfo.py diff --git a/plcquery.py b/commands/plcquery.py similarity index 100% rename from plcquery.py rename to commands/plcquery.py diff --git a/policy.py b/commands/policy.py similarity index 100% rename from policy.py rename to commands/policy.py diff --git a/shconfig.py b/commands/shconfig.py similarity index 100% rename from shconfig.py rename to commands/shconfig.py diff --git a/sitebad.py b/commands/sitebad.py similarity index 100% rename from sitebad.py rename to commands/sitebad.py diff --git a/siteinfo.py b/commands/siteinfo.py similarity index 100% rename from siteinfo.py rename to commands/siteinfo.py diff --git a/siteleave.py b/commands/siteleave.py similarity index 100% rename from siteleave.py rename to commands/siteleave.py diff --git a/syncwithplc.py b/commands/syncwithplc.py similarity index 100% rename from syncwithplc.py rename to commands/syncwithplc.py diff --git a/model.txt b/docs/model.txt similarity index 100% rename from model.txt rename to docs/model.txt diff --git a/rt_db b/rt_db deleted file mode 100644 index eba79ec..0000000 --- a/rt_db +++ /dev/null @@ -1,4 +0,0 @@ -RT_DB_HOST=rt.planet-lab.org -RT_DB_USER=rt_ro -RT_DB_PASSWORD=rtropassword -RT_DB_NAME=rt3 diff --git a/automate/automate.py b/tools/automate/automate.py similarity index 100% rename from automate/automate.py rename to tools/automate/automate.py diff --git a/automate/fetch.py b/tools/automate/fetch.py similarity index 100% rename from automate/fetch.py rename to tools/automate/fetch.py diff --git a/automate/query.py b/tools/automate/query.py similarity index 100% rename from automate/query.py rename to tools/automate/query.py diff --git a/automate/vxargs.py b/tools/automate/vxargs.py similarity index 100% rename from automate/vxargs.py rename to tools/automate/vxargs.py diff --git a/extra/nodeaction.py b/tools/extra/nodeaction.py similarity index 100% rename from extra/nodeaction.py rename to tools/extra/nodeaction.py diff --git a/extra/nodediff.py b/tools/extra/nodediff.py similarity index 100% rename from extra/nodediff.py rename to tools/extra/nodediff.py diff --git a/extra/nodehistory.py b/tools/extra/nodehistory.py similarity index 100% rename from extra/nodehistory.py rename to tools/extra/nodehistory.py diff --git a/extra/nodesets.py b/tools/extra/nodesets.py similarity index 100% rename from extra/nodesets.py rename to tools/extra/nodesets.py diff --git a/extra/pcutest.py b/tools/extra/pcutest.py similarity index 100% rename from extra/pcutest.py rename to tools/extra/pcutest.py diff --git a/extra/pkl2php.py b/tools/extra/pkl2php.py similarity index 100% rename from extra/pkl2php.py rename to tools/extra/pkl2php.py diff --git a/extra/prep_power_users.py b/tools/extra/prep_power_users.py similarity index 100% rename from extra/prep_power_users.py rename to tools/extra/prep_power_users.py diff --git a/extra/printpdb.py b/tools/extra/printpdb.py similarity index 100% rename from extra/printpdb.py rename to tools/extra/printpdb.py diff --git a/extra/showlatlon.py b/tools/extra/showlatlon.py similarity index 100% rename from extra/showlatlon.py rename to tools/extra/showlatlon.py diff --git a/extra/template.py b/tools/extra/template.py similarity index 100% rename from extra/template.py rename to tools/extra/template.py diff --git a/getsshkeys.py b/tools/getsshkeys.py similarity index 100% rename from getsshkeys.py rename to tools/getsshkeys.py diff --git a/kill.cmd.sh b/tools/kill.cmd.sh similarity index 100% rename from kill.cmd.sh rename to tools/kill.cmd.sh diff --git a/nagios/plc2nagios.py b/tools/plc2nagios.py similarity index 100% rename from nagios/plc2nagios.py rename to tools/plc2nagios.py diff --git a/setup-agent.sh b/tools/setup-agent.sh similarity index 100% rename from setup-agent.sh rename to tools/setup-agent.sh diff --git a/testapi.py b/tools/testapi.py similarity index 100% rename from testapi.py rename to tools/testapi.py diff --git a/timeout.pl b/tools/timeout.pl similarity index 100% rename from timeout.pl rename to tools/timeout.pl -- 2.47.0