Index: trunk/Monitoring/Analyze/analyze
===================================================================
--- trunk/Monitoring/Analyze/analyze	(revision 930)
+++ trunk/Monitoring/Analyze/analyze	(revision 935)
@@ -70,7 +70,5 @@
 		for simulation in repo_io.get_running_simulations():
 
-			print "hhh"
-
-			print "checking heartbeat ('%s')"%simulation.name
+			print "\nchecking heartbeat ('%s')"%simulation.name
 
 			try:
@@ -94,9 +92,9 @@
 				repo_io.update_simulation_status(simulation)
 
-				print "heartbeat NOK - simulation status set to 'error' (%s)"%simulation.name
+				print "heartbeat NOK - simulation status set to 'error'\n"
 
 
 			else:
-				print "heartbeat OK (%s)"%simulation.name
+				print "heartbeat OK\n"
 
 class Analyzer():
@@ -132,5 +130,5 @@
 		while True:
 
-			print "checking simulations heartbeats"
+			#print "checking simulations heartbeats"
 
 			CheckList.C0001()
Index: trunk/Monitoring/Watch/watch
===================================================================
--- trunk/Monitoring/Watch/watch	(revision 930)
+++ trunk/Monitoring/Watch/watch	(revision 935)
@@ -63,7 +63,8 @@
 			s=repo_io.retrieve_simulation(message.simuid)
 
+			if s is None:
+				raise Exception("WATCH-ERR102","simulation not found")
+
 			repo_io.create_message(message,s)
-
-			sys.exit()
 
 		except:
@@ -102,10 +103,17 @@
 	def crea_sim(cls,message):
 
-		#repo_io.retrieve_simulation(name)
-		#repo_io.delete_simulation(name)
-
-		simulation=smon.types.Simulation(name=message.simuid,status="running")
-
-		repo_io.create_simulation(simulation)
+		s=repo_io.retrieve_simulation(message.simuid)
+
+		if s is not None:
+			#repo_io.delete_simulation(name)
+
+			s.status="running"
+			repo_io.update_simulation_status(s)
+
+		else:
+			simulation=smon.types.Simulation(name=message.simuid,status="running")
+
+
+			repo_io.create_simulation(simulation)
 
 	@classmethod
@@ -125,4 +133,5 @@
 
 		print "%s %s %s %s\n"%(message.code,message.jobid,message.command,message.timestamp)
+		#pass
 
 	@classmethod
@@ -291,5 +300,6 @@
 
 			except Exception,e:
-				print "ERR019 - exception occurs (exception=%s,msg=%s)"%(str(e),base64_decoded_msg)
+				print "ERR019 - exception occurs (exception=%s)"%(str(e))
+				#print "ERR019 - exception occurs (exception=%s,msg=%s)"%(str(e),base64_decoded_msg)
 
 				traceback.print_exc()
Index: trunk/Monitoring/doc/README
===================================================================
--- trunk/Monitoring/doc/README	(revision 930)
+++ trunk/Monitoring/doc/README	(revision 935)
@@ -1,21 +1,32 @@
 - installation instructions
-	- LibIGCM RabbitMQ agent installation
+	- LibIGCM AMQP agent installation
 		- see CNClient/README
 	- Broker installation
 		- see Broker/README
 	- Supervisor installation
+		- check if EPEL repository is configured, if not, do steps below
+			- for CENTOS 6
+			  (from http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/)
+				- wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
+				- rpm -ivh epel-release-6-8.noarch.rpm
 		- Python installation
-			- yum install python26
-			- yum install python26-devel
+			- if python version < 2.6, do
+				- yum install python26
+				- yum install python26-devel
+			- yum install python-devel
 			- yum install sqlite
 			- yum install sqlite-devel
 			- yum install python-sqlite
 		- Virtualenv installation
+			- mkdir /opt/src
 			- cd /opt/src/
-			- wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.6.1.tar.gz
-			- tar xzvf virtualenv-1.6.1.tar.gz
-			- rm virtualenv-1.6.1.tar.gz
-			- cd /opt/src/virtualenv-1.6.1
-			- /usr/bin/python26 virtualenv.py --distribute --unzip-setuptools /opt/python2.6_ve
+			- wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.10.1.tar.gz
+			- tar xzvf virtualenv-1.10.1.tar.gz
+			- rm virtualenv-1.10.1.tar.gz
+			- cd /opt/src/virtualenv-1.10.1
+			- check if python use the 2.6 version with
+				- python -V
+			- yum install python-pip
+			- /usr/bin/python virtualenv.py --distribute --unzip-setuptools /opt/python2.6_ve
 			- source /opt/python2.6_ve/bin/activate
 		- Python PYPI libraries installation
@@ -33,4 +44,6 @@
 			- dependencies (PYPI packages)
 				-
+					- yum install gcc
+					- yum install postgresql-devel
 					- pip install psycopg2
 						- doesn't work (Error: pg_config executable not found)
@@ -52,5 +65,15 @@
 							- pip install SQLAlchemy==0.7.8
 			- Prodiguer package
+				- mkdir -p /opt/supervisor/prodiguer_lib
+				- cd /opt/supervisor/prodiguer_lib
 				- svn co svn+ssh://<login here>@forge.ipsl.jussieu.fr/ipsl/forge/projets/prodiguer/svn/sw/src/python/trunk/prodiguer_shared/src
-				- edit "watch" script and edit line below accordingly
-					- sys.path.append("/home/jripsl/snapshot/src") 
+		- Supervisor python script installation
+			- svn co svn+ssh://<login here>@forge.ipsl.jussieu.fr/ipsl/forge/projets/libigcm/svn/trunk/Monitoring
+			- edit "watch" script and edit line below accordingly
+				- sys.path.append("/home/jripsl/snapshot/src") 
+			- smon/repo_io.py
+				- sys.path.append("/home/jripsl/snapshot/src") 
+	- test
+		- connectivity test
+			- run command below on supervisor
+				- telnet pp-db-dev.private.ipsl.fr 5432
Index: trunk/Monitoring/smon/repo_io.py
===================================================================
--- trunk/Monitoring/smon/repo_io.py	(revision 930)
+++ trunk/Monitoring/smon/repo_io.py	(revision 935)
@@ -250,5 +250,6 @@
 
 		if s is None:
-			raise Exception("RG543534")
+			#raise Exception("RG543534")
+			return None
 
 
@@ -426,5 +427,6 @@
 		# ..
 
-		print "%s %s %s"%(simulation.name,message.code,"message.body")
+		# debug
+		#print "%s %s %s"%(simulation.name,message.code,"message.body")
 
 		# execute
