blob: cac81890b9c24f1b388026f6a80e57a725f97f46 [file] [log] [blame]
vinayakb5ee049d2013-04-06 21:21:29 +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`
11 PID_INFO=$(ssh $host "ps -ef | grep asterix | grep -v grep | grep -v nc_join | grep $PARENT_ID")
12 PID=`echo $PID_INFO | cut -d " " -f2`
13 echo "NC:$host:$nc_id:$PID"
14 shift 2
15done
16
17CC_PARENT_ID_INFO=$(ssh $MASTER_NODE "ps -ef | grep asterix | grep cc_start | grep -v ssh")
18CC_PARENT_ID=`echo $CC_PARENT_ID_INFO | tr -s " " | cut -d " " -f2`
19CC_ID_INFO=$(ssh $MASTER_NODE "ps -ef | grep asterix | grep $CC_PARENT_ID | grep -v bash")
20CC_ID=`echo $CC_ID_INFO | tr -s " " | cut -d " " -f2`
21echo "CC:$MASTER_NODE:N/A:$CC_ID"