Changeset 1162 for trunk/libIGCM/libIGCM_debug/libIGCM_debug.ksh
- Timestamp:
- 01/29/15 18:53:48 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_debug/libIGCM_debug.ksh
r1153 r1162 175 175 rm -f ${buffer} # cleaning behind us 176 176 rm -f ${last_mail_date__file} # cleaning behind us 177 fi 178 179 # Allways all good for now. 180 return 0 181 } 182 183 #D-#================================================================== 184 #D-function IGCM_debug_sendAMQP_Metrics 185 #D- * Purpose: Take over AMQP C client using mail as a message recipient 186 #D- * One argument : Directory where metrics.json files can be found 187 #D- * Attach encoded metrics.json files. 188 189 function IGCM_debug_sendAMQP_Metrics { 190 191 typeset mail_recipient encodedBody 192 if [ X${ActivateBigBro} = Xtrue ] ; then 193 mail_recipient="superviseur@ipsl.jussieu.fr" 194 # Metrics tag on server side 195 code=7100 196 # Usual AMQP message to route messages on server side 197 encodedBody=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" | base64 -w 0 ) 198 # send mail 199 attachmentsOptions="" 200 for metricsFile in $( ls $1/*json ) ; do 201 attachmentsOptions="-a ${metricsFile} ${attachmentsOptions}" 202 done 203 echo ${encodedBody}|mailx -s "[TEMPORARY AMQP CHANNEL]" ${attachmentsOptions} ${mail_recipient} 177 204 fi 178 205
Note: See TracChangeset
for help on using the changeset viewer.