forked from bmoffit/coda_scripts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkill_remotes.sh
executable file
·82 lines (63 loc) · 1.83 KB
/
kill_remotes.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/bash
#
# Kill the remote_vme's
#
#
#
. coda_conf_functions
# Get list of ROC hosts
coda_conf_get_component_list TS
if [ $? == 1 ] ; then
ROC_hosts=${CODA_HOSTNAME_LIST[@]}
# kill the remote_vme connections for the ROCs
echo "Killing local remote_vme startTS.sh connections"
pkill -U $UID -f "remote_vme.*startTS.sh"
# now kill the ROC, if it's still runnin gon the remote host
for host in $ROC_hosts
do
echo "Killing ROC on $host"
ssh $host pkill coda_ts
done
fi
# Get list of ROC hosts
coda_conf_get_component_list ROC
if [ $? == 1 ] ; then
ROC_hosts=${CODA_HOSTNAME_LIST[@]}
# kill the remote_vme connections for the ROCs
echo "Killing local remote_vme startROC.sh connections"
pkill -U $UID -f "remote_vme.*startROC.sh"
# now kill the ROC, if it's still runnin gon the remote host
for host in $ROC_hosts
do
echo "Killing ROC on $host"
ssh $host pkill coda_roc
done
fi
# Get list of FPGA hosts
coda_conf_get_component_list FPGA
if [ $? == 1 ] ; then
ROC_hosts=${CODA_HOSTNAME_LIST[@]}
# kill the remote_vme connections for the FPGAs
echo "Killing local remote_vme startFPGA.sh connections"
pkill -U $UID -f "remote_vme.*startFPGA.sh"
# now kill the ROC, if it's still runnin gon the remote host
for host in $ROC_hosts
do
echo "Killing ROC on $host"
ssh $host pkill coda_roc
done
fi
# Get list of PEB hosts
coda_conf_get_component_list PEB
if [ $? == 1 ] ; then
PEB_hosts=${CODA_HOSTNAME_LIST[@]}
# kill the remote_vme connections for the PEBs
echo "Killing local remote_vme startPEB.sh connections"
pkill -U $UID -f "remote_vme.*startPEB.sh"
# now kill the ROC, if it's still runnin gon the remote host
for host in $PEB_hosts
do
echo "Killing PEB on $host"
ssh $host pkill -f org.jlab.coda.emu.EmuFactory
done
fi