blob: cac81890b9c24f1b388026f6a80e57a725f97f46 [file] [log] [blame]
ramangrover29116eb972013-02-20 20:47:35 +00001INSTANCE_NAME=$1
2MASTER_NODE=$2
3shift 2
4numargs=$#
5for ((i=1 ; i <= numargs ; i=i+2))
6do
7 host=$1
8 nc_id=$2
9 INFO=$(ssh $host "ps -ef | grep nc_join | grep -v grep | grep -v ssh| grep $nc_id" | head -n 1 )
10 PARENT_ID=`echo $INFO | cut -d " " -f2`
ramangrover29@gmail.com4ba21522013-02-27 23:35:42 +000011 PID_INFO=$(ssh $host "ps -ef | grep asterix | grep -v grep | grep -v nc_join | grep $PARENT_ID")
ramangrover29116eb972013-02-20 20:47:35 +000012 PID=`echo $PID_INFO | cut -d " " -f2`
13 echo "NC:$host:$nc_id:$PID"
14 shift 2
15done
16
ramangrover29@gmail.com4ba21522013-02-27 23:35:42 +000017CC_PARENT_ID_INFO=$(ssh $MASTER_NODE "ps -ef | grep asterix | grep cc_start | grep -v ssh")
ramangrover29116eb972013-02-20 20:47:35 +000018CC_PARENT_ID=`echo $CC_PARENT_ID_INFO | tr -s " " | cut -d " " -f2`
ramangrover29@gmail.com4ba21522013-02-27 23:35:42 +000019CC_ID_INFO=$(ssh $MASTER_NODE "ps -ef | grep asterix | grep $CC_PARENT_ID | grep -v bash")
ramangrover29116eb972013-02-20 20:47:35 +000020CC_ID=`echo $CC_ID_INFO | tr -s " " | cut -d " " -f2`
21echo "CC:$MASTER_NODE:N/A:$CC_ID"