Changeset 935


Ignore:
Timestamp:
08/22/13 12:32:34 (11 years ago)
Author:
jripsl
Message:
  • fix typo.
Location:
trunk/Monitoring
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Monitoring/Analyze/analyze

    r879 r935  
    7070                for simulation in repo_io.get_running_simulations(): 
    7171 
    72                         print "hhh" 
    73  
    74                         print "checking heartbeat ('%s')"%simulation.name 
     72                        print "\nchecking heartbeat ('%s')"%simulation.name 
    7573 
    7674                        try: 
     
    9492                                repo_io.update_simulation_status(simulation) 
    9593 
    96                                 print "heartbeat NOK - simulation status set to 'error' (%s)"%simulation.name 
     94                                print "heartbeat NOK - simulation status set to 'error'\n" 
    9795 
    9896 
    9997                        else: 
    100                                 print "heartbeat OK (%s)"%simulation.name 
     98                                print "heartbeat OK\n" 
    10199 
    102100class Analyzer(): 
     
    132130                while True: 
    133131 
    134                         print "checking simulations heartbeats" 
     132                        #print "checking simulations heartbeats" 
    135133 
    136134                        CheckList.C0001() 
  • trunk/Monitoring/Watch/watch

    r879 r935  
    6363                        s=repo_io.retrieve_simulation(message.simuid) 
    6464 
     65                        if s is None: 
     66                                raise Exception("WATCH-ERR102","simulation not found") 
     67 
    6568                        repo_io.create_message(message,s) 
    66  
    67                         sys.exit() 
    6869 
    6970                except: 
     
    102103        def crea_sim(cls,message): 
    103104 
    104                 #repo_io.retrieve_simulation(name) 
    105                 #repo_io.delete_simulation(name) 
    106  
    107                 simulation=smon.types.Simulation(name=message.simuid,status="running") 
    108  
    109                 repo_io.create_simulation(simulation) 
     105                s=repo_io.retrieve_simulation(message.simuid) 
     106 
     107                if s is not None: 
     108                        #repo_io.delete_simulation(name) 
     109 
     110                        s.status="running" 
     111                        repo_io.update_simulation_status(s) 
     112 
     113                else: 
     114                        simulation=smon.types.Simulation(name=message.simuid,status="running") 
     115 
     116 
     117                        repo_io.create_simulation(simulation) 
    110118 
    111119        @classmethod 
     
    125133 
    126134                print "%s %s %s %s\n"%(message.code,message.jobid,message.command,message.timestamp) 
     135                #pass 
    127136 
    128137        @classmethod 
     
    291300 
    292301                        except Exception,e: 
    293                                 print "ERR019 - exception occurs (exception=%s,msg=%s)"%(str(e),base64_decoded_msg) 
     302                                print "ERR019 - exception occurs (exception=%s)"%(str(e)) 
     303                                #print "ERR019 - exception occurs (exception=%s,msg=%s)"%(str(e),base64_decoded_msg) 
    294304 
    295305                                traceback.print_exc() 
  • trunk/Monitoring/doc/README

    r866 r935  
    11- installation instructions 
    2         - LibIGCM RabbitMQ agent installation 
     2        - LibIGCM AMQP agent installation 
    33                - see CNClient/README 
    44        - Broker installation 
    55                - see Broker/README 
    66        - Supervisor installation 
     7                - check if EPEL repository is configured, if not, do steps below 
     8                        - for CENTOS 6 
     9                          (from http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/) 
     10                                - wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm 
     11                                - rpm -ivh epel-release-6-8.noarch.rpm 
    712                - Python installation 
    8                         - yum install python26 
    9                         - yum install python26-devel 
     13                        - if python version < 2.6, do 
     14                                - yum install python26 
     15                                - yum install python26-devel 
     16                        - yum install python-devel 
    1017                        - yum install sqlite 
    1118                        - yum install sqlite-devel 
    1219                        - yum install python-sqlite 
    1320                - Virtualenv installation 
     21                        - mkdir /opt/src 
    1422                        - cd /opt/src/ 
    15                         - wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.6.1.tar.gz 
    16                         - tar xzvf virtualenv-1.6.1.tar.gz 
    17                         - rm virtualenv-1.6.1.tar.gz 
    18                         - cd /opt/src/virtualenv-1.6.1 
    19                         - /usr/bin/python26 virtualenv.py --distribute --unzip-setuptools /opt/python2.6_ve 
     23                        - wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.10.1.tar.gz 
     24                        - tar xzvf virtualenv-1.10.1.tar.gz 
     25                        - rm virtualenv-1.10.1.tar.gz 
     26                        - cd /opt/src/virtualenv-1.10.1 
     27                        - check if python use the 2.6 version with 
     28                                - python -V 
     29                        - yum install python-pip 
     30                        - /usr/bin/python virtualenv.py --distribute --unzip-setuptools /opt/python2.6_ve 
    2031                        - source /opt/python2.6_ve/bin/activate 
    2132                - Python PYPI libraries installation 
     
    3344                        - dependencies (PYPI packages) 
    3445                                - 
     46                                        - yum install gcc 
     47                                        - yum install postgresql-devel 
    3548                                        - pip install psycopg2 
    3649                                                - doesn't work (Error: pg_config executable not found) 
     
    5265                                                        - pip install SQLAlchemy==0.7.8 
    5366                        - Prodiguer package 
     67                                - mkdir -p /opt/supervisor/prodiguer_lib 
     68                                - cd /opt/supervisor/prodiguer_lib 
    5469                                - svn co svn+ssh://<login here>@forge.ipsl.jussieu.fr/ipsl/forge/projets/prodiguer/svn/sw/src/python/trunk/prodiguer_shared/src 
    55                                 - edit "watch" script and edit line below accordingly 
    56                                         - sys.path.append("/home/jripsl/snapshot/src")  
     70                - Supervisor python script installation 
     71                        - svn co svn+ssh://<login here>@forge.ipsl.jussieu.fr/ipsl/forge/projets/libigcm/svn/trunk/Monitoring 
     72                        - edit "watch" script and edit line below accordingly 
     73                                - sys.path.append("/home/jripsl/snapshot/src")  
     74                        - smon/repo_io.py 
     75                                - sys.path.append("/home/jripsl/snapshot/src")  
     76        - test 
     77                - connectivity test 
     78                        - run command below on supervisor 
     79                                - telnet pp-db-dev.private.ipsl.fr 5432 
  • trunk/Monitoring/smon/repo_io.py

    r879 r935  
    250250 
    251251                if s is None: 
    252                         raise Exception("RG543534") 
     252                        #raise Exception("RG543534") 
     253                        return None 
    253254 
    254255 
     
    426427                # .. 
    427428 
    428                 print "%s %s %s"%(simulation.name,message.code,"message.body") 
     429                # debug 
     430                #print "%s %s %s"%(simulation.name,message.code,"message.body") 
    429431 
    430432                # execute 
Note: See TracChangeset for help on using the changeset viewer.