Changeset 937
- Timestamp:
- 08/23/13 10:13:15 (11 years ago)
- Location:
- trunk/Monitoring
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Monitoring/Watch/README
r859 r937 1 1 - to run the watcher, do 2 - cd Watch 2 3 - source /opt/python2.6_ve/bin/activate 3 4 - python watch -
trunk/Monitoring/Watch/watch
r935 r937 24 24 25 25 # line below is to include "smon" package in the search path 26 sys.path.append("/ home/jripsl/snapshot/Monitoring")26 sys.path.append("/opt/supervisor/Monitoring") 27 27 28 28 import smon.repo_io as repo_io 29 29 import smon.types 30 30 31 CSTE_BROKER_HOST='cstest-broker.ipsl.jussieu.fr' # cstest 32 #CSTE_BROKER_HOST='localhost' # vesg4 31 33 32 34 class Mail(): … … 137 139 @classmethod 138 140 def log(cls,message): 139 with open("/ home/jripsl/supervisor/log/supervisor.log", "a") as log_file:141 with open("/opt/supervisor/log/supervisor.log", "a") as log_file: 140 142 log_file.write("%s %s %s %s %s\n"%(datetime.datetime.now().strftime('%Y%m%d_%H%M%S'), message.code,message.jobid,message.timestamp,message.command)) 141 143 … … 213 215 """ 214 216 215 connection = pika.BlockingConnection(pika.ConnectionParameters( host='localhost'))217 connection = pika.BlockingConnection(pika.ConnectionParameters(host=CSTE_BROKER_HOST)) 216 218 self.channel = connection.channel() 217 219 218 #self.channel.queue_declare(queue='myqueue')219 220 220 221 print ' [*] Waiting for messages. To exit press CTRL+C' … … 311 312 #time.sleep(0.5) 312 313 314 self.channel.queue_declare(queue='myqueue') 313 315 314 316 self.channel.basic_consume(callback, queue='myqueue', no_ack=True) -
trunk/Monitoring/doc/README
r935 r937 69 69 - svn co svn+ssh://<login here>@forge.ipsl.jussieu.fr/ipsl/forge/projets/prodiguer/svn/sw/src/python/trunk/prodiguer_shared/src 70 70 - Supervisor python script installation 71 - mkdir /opt/supervisor/local_db 72 - mkdir /opt/supervisor/log 71 73 - svn co svn+ssh://<login here>@forge.ipsl.jussieu.fr/ipsl/forge/projets/libigcm/svn/trunk/Monitoring 72 74 - edit "watch" script and edit line below accordingly 73 - sys.path.append(" /home/jripsl/snapshot/src")75 - sys.path.append("<snapshot_dir>/src") 74 76 - smon/repo_io.py 75 - sys.path.append(" /home/jripsl/snapshot/src")77 - sys.path.append("<snapshot_dir>/src") 76 78 - test 77 79 - connectivity test -
trunk/Monitoring/smon/local_repo.py
r879 r937 26 26 raise Exception() 27 27 28 db_file="/ home/jripsl/supervisor/local_db/local_repo.db"28 db_file="/opt/supervisor/local_db/supervisor.db" 29 29 #db_file=":memory:" 30 30 -
trunk/Monitoring/smon/repo_io.py
r935 r937 20 20 21 21 # line below is to include Prodiguer database I/O library in the search path 22 sys.path.append("/ home/jripsl/snapshot/src/prodiguer_shared/src")22 sys.path.append("/opt/supervisor/prodiguer_lib/src") 23 23 24 24 … … 33 33 34 34 35 # HACK36 import prodiguer_shared.repo.session as repo_session37 import prodiguer_shared.models as models38 39 40 # Test constants.41 _SIM_ACTIVITY = 'IPSL'42 _SIM_COMPUTE_NODE = 'TGCC'43 _SIM_COMPUTE_NODE_LOGIN = 'p86denv'44 _SIM_COMPUTE_NODE_MACHINE = 'TGCC - Curie'45 _SIM_EXECUTION_START_DATE = datetime.datetime.now()46 _SIM_EXECUTION_STATE = models.EXECUTION_STATE_RUNNING47 _SIM_EXPERIMENT = '1pctCO2'48 _SIM_MODEL_ENGINE = 'IPSL-CM5A-LR'49 _SIM_SPACE = models.SIMULATION_SPACE_TEST50 _MSG_TYPE = "0000"51 _MSG_CONTENT1 = "12345690"52 _MSG_CONTENT2 = "12345690"53 35 54 36 … … 59 41 60 42 # set mode 61 mode=CSTE_MODE_REMOTE_REPO62 #mode=CSTE_MODE_LOCAL_REPO63 64 # set repository driver43 #mode=CSTE_MODE_REMOTE_REPO 44 mode=CSTE_MODE_LOCAL_REPO 45 46 # mode specific init. (e.g. repository driver) 65 47 if mode==CSTE_MODE_REMOTE_REPO_STUB: 66 48 raise Exception() … … 72 54 73 55 56 # HACK 57 # (uncomment those two lines if use prodiguer repo) 58 import prodiguer_shared.repo.session as repo_session 59 import prodiguer_shared.models as models 60 61 62 # Test constants. 63 _SIM_ACTIVITY = 'IPSL' 64 _SIM_COMPUTE_NODE = 'TGCC' 65 _SIM_COMPUTE_NODE_LOGIN = 'p86denv' 66 _SIM_COMPUTE_NODE_MACHINE = 'TGCC - Curie' 67 _SIM_EXECUTION_START_DATE = datetime.datetime.now() 68 _SIM_EXECUTION_STATE = models.EXECUTION_STATE_RUNNING 69 _SIM_EXPERIMENT = '1pctCO2' 70 _SIM_MODEL_ENGINE = 'IPSL-CM5A-LR' 71 _SIM_SPACE = models.SIMULATION_SPACE_TEST 72 _MSG_TYPE = "0000" 73 _MSG_CONTENT1 = "12345690" 74 _MSG_CONTENT2 = "12345690" 75 74 76 elif mode==CSTE_MODE_LOCAL_REPO: 77 75 78 import local_repo as repo 79 80 76 81 else: 77 82 raise Exception("ERR001 - incorrect mode") 83 78 84 79 85
Note: See TracChangeset
for help on using the changeset viewer.