#!/bin/tcsh -f # # ps_scaler_exit - stops server and client for "rocps1" and "rocps2" # # SP, 04-Mar-2015 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 set dir = "/home/hdops/CDAQ/config/hd_server" set GUI_t = "-T Scaler_Client_GUI_PS" echo "" echo " Stop Scaler_Client_GUI_PS" set pp = `ps -ef | grep -v grep | grep -i $GUI_t | awk '{print $2}' ` set pp = `kill -9 $pp ` echo " $GUI_t done" echo "" echo " Kill terminals:" set rocs = ( ROCPS1 ROCPS2 ) foreach roc ($rocs) set pp = `ps -ef | grep -v grep | grep -i Scaler_Server_$roc | awk '{print $2}' ` set pp = `kill -9 $pp ` echo " Scaler_Server_$roc done" set smroc = `echo $roc | tr '[A-Z]' '[a-z]' ` set tmp = `modify_setfile.sh off $smroc scStandalone.set ` rm -f $dir/$smroc.gui end echo "" echo " ps_scaler_exit done" echo "" exit