Changeset 126 for trunk/IPs/systemC/processor/Morpheo/Script/distexe.sh
- Timestamp:
- Jun 17, 2009, 8:10:41 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Script/distexe.sh
r124 r126 7 7 VERSION="1.0" 8 8 9 # Need : test, echo, cd, dirname, basename, ssh 9 # Need : test, echo, cd, dirname, basename, ssh, ps aux 10 10 11 11 #-----[ distexe_usage ]------------------------------------- … … 103 103 fi; 104 104 105 local FILE_CPT="${PATH_EXE}/control-"$(basename ${FILE_CMD}); 106 105 107 header; 106 108 echo " * {"$(my_date)"} <${HOSTNAME}> file : ${FILE_CMD}"; … … 108 110 109 111 local hosts="${DISTEXE_HOSTS}"; 112 local -a commands; 113 local -i cpt=0; 110 114 111 115 for line in ${hosts}; do … … 116 120 117 121 # lunch service 118 local cmd="export MORPHEO_SCRIPT=${MORPHEO_SCRIPT};${MORPHEO_SCRIPT}/execute_n.sh ${PATH_EXE} ${FILE_CMD} ${ nb_process};";122 local cmd="export MORPHEO_SCRIPT=${MORPHEO_SCRIPT};${MORPHEO_SCRIPT}/execute_n.sh ${PATH_EXE} ${FILE_CMD} ${FILE_CPT} ${nb_process};"; 119 123 ssh ${host} ${cmd} & 124 125 commands[${cpt}]="${cmd}"; 126 cpt=$((${cpt}+1)); 120 127 done; 121 128 122 129 echo " * {"$(my_date)"} <${HOSTNAME}> all hosts working"; 123 130 131 cpt=0; 132 while test ${cpt} -lt ${#commands[*]}; do 133 local -i res=1 134 135 while test ${res} -ne 0; do 136 res=$(ps aux | grep -c "${commands[${cpt}]}"); 137 done 138 139 cpt=$((${cpt}+1)); 140 done; 141 142 echo " * {"$(my_date)"} <${HOSTNAME}> all hosts is done"; 143 rm ${FILE_CPT}; 124 144 } 125 145
Note: See TracChangeset
for help on using the changeset viewer.