#!/bin/tcsh -f # # fcal_S1_exit - stops all DAQ processes for FCAL North crates # # SP, 04-Dec-2013 set hh = `echo $HOST | cut -c 1-5 ` if ($hh != "gluon") then echo "" echo " You should be logged into gluon machine" echo "" exit (1) endif echo "" echo " Stop Run Control GUI" set pp = `ps -ef | grep -v grep | grep -i '/rcgui' | awk '{print $2}' ` set pp = `ps -ef | grep -v grep | grep -i $pp | awk '{print $2}' ` set pp = `kill -9 $pp ` set PL_t = "-T fcal_S1_platform" set RC_t = "-T fcal_S1_RC" set EB_t = "-T fcal_S1_EB" echo "" echo " Kill terminals:" set pp = `ps -ef | grep -v grep | grep -i $PL_t | awk '{print $2}' ` set pp = `kill -9 $pp ` echo " $PL_t done" set pp = `ps -ef | grep -v grep | grep -i $RC_t | awk '{print $2}' ` set pp = `kill -9 $pp ` echo " $RC_t done" set pp = `ps -ef | grep -v grep | grep -i $EB_t | awk '{print $2}' ` set pp = `kill -9 $pp ` echo " $EB_t done" set rocs = ( ROCFCAL1 ) foreach roc ($rocs) set pp = `ps -ef | grep -v grep | grep -i CRATE_$roc | awk '{print $2}' ` set pp = `kill -9 $pp ` echo " CRATE_$roc done" end echo "" echo " fcal_N2_exit done" echo "" exit