From 8d5188edebf4e50cbd29026590829d003c3fddb4 Mon Sep 17 00:00:00 2001 From: hadaq Date: Sat, 29 Jan 2022 02:37:34 +0100 Subject: [PATCH] changed start and stop to work with master_channels, mt --- hmon/start.sh | 28 ++++++++++++++++------------ hmon/stop.sh | 7 +++---- hmon/stopall.sh | 8 ++++++++ 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/hmon/start.sh b/hmon/start.sh index 88ea5cf..6bdf407 100755 --- a/hmon/start.sh +++ b/hmon/start.sh @@ -7,15 +7,15 @@ export PERL5LIB="./" mkdir /dev/shm/hmon #Kill old tunnel, make new one. Better: Check if tunnel still exists, if not restart. -echo " Renewing tunnels and environment..." +echo " Renewing environment..." -pgrep -f 'ssh -R 8888' >/dev/null -if [ $? -eq 1 ]; then -echo " No tunnel found, digging new one"; +#pgrep -f 'ssh -R 8888' >/dev/null +#if [ $? -eq 1 ]; then +#echo " No tunnel found, digging new one"; #ssh -f -R 8888:hades33.gsi.de:80 -R 3060:hades33.gsi.de:80 -R 8889:hades33.gsi.de:1234 -R 9999:lxhadeb06p:80 cerberus.x-matter.uni-frankfurt.de -N &a #ssh -f -R 8888:hades33.gsi.de:80 -R 3060:hades33.gsi.de:80 cerberus.x-matter.uni-frankfurt.de -N & -tmux new-session -s cerberus_tunnel -d 'while true; do ssh -R 8888:hades33.gsi.de:80 -R 3060:hades33.gsi.de:80 cerberus.x-matter.uni-frankfurt.de -N -v; sleep 10; done' -fi +#tmux new-session -s cerberus_tunnel -d 'while true; do ssh -R 8888:hades33.gsi.de:80 -R 3060:hades33.gsi.de:80 cerberus.x-matter.uni-frankfurt.de -N -v; sleep 10; done' +#fi ######### #ssh hadesp57 pkill -f speakdaemon.pl @@ -28,11 +28,11 @@ cd /home/hadaq/trbsoft/hadesdaq/hmon/ # cd ../ export DAQOPSERVER=hadesp31 -mkdir `pwd`/archive -mkdir `pwd`/qa -mkdir `pwd`/logs -mkdir `pwd`/vertex -mkdir `pwd`/pion +mkdir -p `pwd`/archive +mkdir -p `pwd`/qa +mkdir -p `pwd`/logs +mkdir -p `pwd`/vertex +mkdir -p `pwd`/pion #DISPLAY=:0 ssh -f -X lxhadeb06p "ping -i 100 lxhadesdaqp" &>/dev/null & @@ -43,8 +43,12 @@ mkdir `pwd`/pion #sshfs -o allow_other hadaq@lxhadeb06p:/home/hadaq/local/hydra2/online/feb21_master/online/pics/vertex `pwd`/vertex #sshfs -o allow_other hadaq@lxhadeb06p:/home/hadaq/local/hydra2/online/feb21/online/pics `pwd`/qa +pkill -f "sshfs -o allow_other hadaq@hadesp66:/home/hades-qa/online/5.34.38/pics" +sshfs -o allow_other hadaq@hadesp66:/home/hades-qa/online/5.34.38/pics `pwd`/qa + # sshfs -o allow_other hadaq@lxhadeb06p:/data01/tmp/ `pwd`/pion +pkill -f "sshfs -o allow_other hadaq@hadesp63:/home/hadaq/local/tdcmon/dabc/cal" sshfs -o allow_other hadaq@hadesp63:/home/hadaq/local/tdcmon/dabc/cal `pwd`/calibration @@ -116,7 +120,7 @@ END: {if($r!=0 and eof()) {foreach (@l) {wait}}} ' & rm ~/trbsoft/hadesdaq/hmon/files/note.htt -ssh hadesp57 'cd /home/hadaq/trbsoft/daq/hmon/; PERL5LIB=. ./speakdaemon.pl 1>/dev/null 2>>/home/hadaq/trbsoft/hadesdaq/hmon/logs/perlerror_speakdaemon' & +#ssh hadesp57 'cd /home/hadaq/trbsoft/daq/hmon/; PERL5LIB=. ./speakdaemon.pl 1>/dev/null 2>>/home/hadaq/trbsoft/hadesdaq/hmon/logs/perlerror_speakdaemon' & ssh hadesp33 'cd /home/hadaq/trbsoft/daq/hmon/; PERL5LIB=. ./speakdaemon.pl 1>/dev/null 2>>/home/hadaq/trbsoft/hadesdaq/hmon/logs/perlerror_speakdaemon' & sleep 1; diff --git a/hmon/stop.sh b/hmon/stop.sh index a8ab4c3..bd29db2 100755 --- a/hmon/stop.sh +++ b/hmon/stop.sh @@ -4,11 +4,10 @@ echo " Killing all sub-processes..." pkill -f "\./hmon_.+\.pl" 2>/dev/null 1>/dev/null pkill -f "sh -c \./hmon_.*\.sh" -pkill -f "lxhadeb06p ping -i 100 lxhadesdaqp" -pkill -f "/usr/bin/perl -w \./speakdaemon.pl" -pkill -f "/usr/bin/perl -w \./hmon_.*\.sh" +pkill -f "/usr/bin/perl \./speakdaemon.pl" +pkill -f "/usr/bin/perl \./hmon_.*\.sh" pkill -f "hmon_tail -n" -pkill -f "hmon_ssh" +#pkill -f "hmon_ssh" # don't do that for a normal daq-restart # echo " Cleaning up..." diff --git a/hmon/stopall.sh b/hmon/stopall.sh index 2793860..7081a38 100755 --- a/hmon/stopall.sh +++ b/hmon/stopall.sh @@ -1,9 +1,17 @@ #!/bin/bash + killall hmon_permanent_tail cd permanent killall hmon*.pl 2>/dev/null 1>/dev/null cd ../ + +pkill -f "sshfs -o allow_other hadaq@hades66:/home/hades-qa/online/5.34.38/pics" +pkill -f "sshfs -o allow_other hadaq@hadesp63:/home/hadaq/local/tdcmon/dabc/cal" + + +pkill hmon_ssh + ./stop.sh; # echo " Killing all sub-processes..." -- 2.43.0