source: trunk/Monitoring/script/libIGCM_mock.sh @ 854

Last change on this file since 854 was 854, checked in by jripsl, 11 years ago

add JSON deserialization, mail notification, logging.

  • Property svn:executable set to *
File size: 876 bytes
Line 
1#!/bin/bash
2
3##################################
4#  @program        smon
5#  @description    simulation monitor
6#  @copyright      Copyright “(c)2009 Centre National de la Recherche Scientifique CNRS.
7#                             All Rights Reserved”
8#  @svn_file       $Id: failover 2545 2013-02-01 09:58:10Z jripsl $
9#  @version        $Rev: 2545 $
10#  @lastrevision   $Date: 2013-02-01 10:58:10 +0100 (Fri, 01 Feb 2013) $
11#  @license        CeCILL (http://dods.ipsl.jussieu.fr/jripsl/smon/LICENSE)
12##################################
13
14stack_file=$1
15send_msg="/home/jripsl/snapshot/Monitoring/CNClient/sendAMQPMsg"
16
17if [ $# -lt 1 ]; then
18        echo "Usage $0 ../sample/stack_light"
19        exit 1
20fi
21
22IFS=$'\n'
23for line in $(cat $stack_file); do
24        #echo $line | awk -F" " '{print $4}'
25        callname=$(echo $line | awk -F" " '{print $4}' )
26        $send_msg localhost 5672 string "$callname"
27done
Note: See TracBrowser for help on using the repository browser.