Index: /trunk/Monitoring/Failover/failover
===================================================================
--- /trunk/Monitoring/Failover/failover	(revision 841)
+++ /trunk/Monitoring/Failover/failover	(revision 842)
@@ -15,12 +15,20 @@
 from smon import dao
 
+CSTE_SIMULATION_STATUS_OK="2.2"
+
 class Failover():
+	running=true
 
 	@classmethod
 	def controlLoop(cls):
-		simulation=dao.get_simulation()
 
-		pass
- 
+		while cls.running is True:
+
+			simulation=dao.get_simulation()
+
+			if simulation.status
+				
+			sleep 20
+
 def main():
 
Index: /trunk/Monitoring/sample/stack_light
===================================================================
--- /trunk/Monitoring/sample/stack_light	(revision 842)
+++ /trunk/Monitoring/sample/stack_light	(revision 842)
@@ -0,0 +1,37 @@
+Stack of an libIGCM job :
+> 0 : IGCM_card_Check
+< 0 : IGCM_card_Check
+> 0 : IGCM_config_Initialize
+ > 1 : IGCM_sys_Cp /ccc/work/cont003/dsm/p86denv/TEST/modipsl/config/IPSLCM5A/EXP01/run.card.init /ccc/work/cont003/dsm/p86denv/TEST/modipsl/config/IPSLCM5A/EXP01/run.card
+ < 1 : IGCM_sys_Cp
+ > 1 : IGCM_config_CommonConfiguration /ccc/work/cont003/dsm/p86denv/TEST/modipsl/config/IPSLCM5A/EXP01/config.card
+  > 2 : IGCM_card_DefineVariableFromOption /ccc/work/cont003/dsm/p86denv/TEST/modipsl/config/IPSLCM5A/EXP01/config.card Compatibility libIGCM
+  < 2 : IGCM_card_DefineVariableFromOption
+  > 2 : IGCM_sys_MkdirWork /ccc/scratch/cont003/dsm/p86denv/IGCM_OUT/IPSLCM5A/DEVT/pdControl/KSH.01/REBUILD
+  < 2 : IGCM_sys_MkdirWork
+ < 1 : IGCM_config_CommonConfiguration
+ > 1 : IGCM_card_WriteOption /ccc/work/cont003/dsm/p86denv/TEST/modipsl/config/IPSLCM5A/EXP01/run.card Configuration PeriodDateEnd 2050-01-31
+  > 2 : IGCM_card_PrintOption /ccc/work/cont003/dsm/p86denv/TEST/modipsl/config/IPSLCM5A/EXP01/run.card Configuration PeriodDateEnd
+  < 2 : IGCM_card_PrintOption
+  > 2 : IGCM_card_CheckConflict /ccc/work/cont003/dsm/p86denv/TEST/modipsl/config/IPSLCM5A/EXP01/run.card
+  < 2 : IGCM_card_CheckConflict
+ < 1 : IGCM_card_WriteOption
+ > 1 : IGCM_card_WriteOption /ccc/work/cont003/dsm/p86denv/TEST/modipsl/config/IPSLCM5A/EXP01/run.card Configuration CumulPeriod 601
+  > 2 : IGCM_card_PrintOption /ccc/work/cont003/dsm/p86denv/TEST/modipsl/config/IPSLCM5A/EXP01/run.card Configuration CumulPeriod
+  < 2 : IGCM_card_PrintOption
+  > 2 : IGCM_card_CheckConflict /ccc/work/cont003/dsm/p86denv/TEST/modipsl/config/IPSLCM5A/EXP01/run.card
+  < 2 : IGCM_card_CheckConflict
+ < 1 : IGCM_card_WriteOption
+< 0 : IGCM_config_Initialize
+> 0 : IGCM_config_Finalize
+ > 1 : IGCM_sys_SendMail
+ < 1 : IGCM_sys_SendMail
+ > 1 : IGCM_card_WriteOption /ccc/work/cont003/dsm/p86denv/TEST/modipsl/config/IPSLCM5A/EXP01/run.card Configuration PeriodState Completed
+  > 2 : IGCM_card_PrintOption /ccc/work/cont003/dsm/p86denv/TEST/modipsl/config/IPSLCM5A/EXP01/run.card Configuration PeriodState
+  < 2 : IGCM_card_PrintOption
+  > 2 : IGCM_card_CheckConflict /ccc/work/cont003/dsm/p86denv/TEST/modipsl/config/IPSLCM5A/EXP01/run.card
+  < 2 : IGCM_card_CheckConflict
+ < 1 : IGCM_card_WriteOption
+ > 1 : IGCM_sys_Rm -- -rf /ccc/work/cont003/dsm/p86denv/RUN.CURIE/IPSLCM5A/KSH.01.29479
+ < 1 : IGCM_sys_Rm
+< 0 : IGCM_config_Finalize
Index: /trunk/Monitoring/script/libIGCM_mock.sh
===================================================================
--- /trunk/Monitoring/script/libIGCM_mock.sh	(revision 842)
+++ /trunk/Monitoring/script/libIGCM_mock.sh	(revision 842)
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+##################################
+#  @program        smon
+#  @description    simulation monitor
+#  @copyright      Copyright â(c)2009 Centre National de la Recherche Scientifique CNRS. 
+#                             All Rights Reservedâ
+#  @svn_file       $Id: failover 2545 2013-02-01 09:58:10Z jripsl $
+#  @version        $Rev: 2545 $
+#  @lastrevision   $Date: 2013-02-01 10:58:10 +0100 (Fri, 01 Feb 2013) $
+#  @license        CeCILL (http://dods.ipsl.jussieu.fr/jripsl/smon/LICENSE)
+##################################
+
+stack_file="../sample/stack_light"
+
+IFS=$'\n'
+for line in $(cat $stack_file); do
+	echo $line | awk -F" " '{print $4}'
+done
Index: /trunk/Monitoring/smon/types.py
===================================================================
--- /trunk/Monitoring/smon/types.py	(revision 841)
+++ /trunk/Monitoring/smon/types.py	(revision 842)
@@ -11,4 +11,7 @@
 #  @license        CeCILL (http://dods.ipsl.jussieu.fr/jripsl/smon/LICENSE)
 ##################################
+
+import networkx as nx
+import pickle
 
 CSTE_SAMPLE="2.2"
@@ -36,5 +39,17 @@
 
     def __init__(self,**kw):
-		pass
+		dg = nx.DiGraph()
+
+	def update(cls):
+		dg.add_edge('a','b')
+
+	def print(cls):
+		print dg.edges()
+
+	def write(cls):
+		pickle.dump(dg, open('/tmp/graph.txt', 'w'))
+
+	def read(cls):
+		dg = pickle.load(open('/tmp/graph.txt'))
 
     def __str__(self):
