]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
update control GUI scripts
authorhadaq <jan@lxhadeb07>
Tue, 25 Feb 2025 16:23:37 +0000 (17:23 +0100)
committerhadaq <jan@lxhadeb07>
Tue, 25 Feb 2025 16:23:37 +0000 (17:23 +0100)
12 files changed:
control/gui/daq/40_Resync_MDC_12 [new file with mode: 0755]
control/gui/eb/60_Restart_EB
control/gui/power/MDC_12_LV [new file with mode: 0755]
control/gui/power/MDC_34_LV [moved from control/gui/power/MDC_LV with 100% similarity]
control/gui/reboot/10_Quite-A-Lot
control/gui/reboot/30_MDC_12 [new file with mode: 0755]
control/gui/reboot/30_MDC_34_Hub [moved from control/gui/reboot/30_MDC_Hub with 100% similarity]
control/gui/reboot/30_MDC_34_OEP [moved from control/gui/reboot/30_MDC_OEP with 100% similarity]
control/gui/reboot/30_RPC
control/gui/reboot/30_TOF_Wall
hmon/doc/misc2-ip.htt [new file with mode: 0644]
utils/Powercycle_MDCnew.pl [new file with mode: 0644]

diff --git a/control/gui/daq/40_Resync_MDC_12 b/control/gui/daq/40_Resync_MDC_12
new file mode 100755 (executable)
index 0000000..bc7caa6
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+export myvar=$(doyoureallywant.pl "to powercycle missing MDC I/II boards?")
+if [ $myvar == "256" ]; then exit; fi
+
+
+xterm  -e bash --login -c  '
+  ssh hadaq@hades33 "
+  source /home/hadaq/.bash_profile        
+  echo Switch off trigger
+  timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400 
+  echo \"Starting a MDC I/II power cycle for missing boards...\"
+  cd /home/hadaq/trbsoft/mdc_settings/scripts
+  ./powercycle_missing.pl
+  echo Done
+  sleep 1
+  timeout 1s trbcmd clearbit 0x0003 0xa0c0 0x400 
+
+  sleep 5
+  "
+'
index 6b2b0b2f3c88bffbcf910987c119e55e09a50595..6fd23adb0334d97ef7e09b743676a9dbef87c9a4 100755 (executable)
@@ -7,13 +7,15 @@ $HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders are being res
 
 xterm -geometry 80x24 -bg orange -fg black -e bash -c '
   ssh hadaq@lxhadesdaqp "
-  echo \"Restarting Eventbuilder 1 - 16\"
   stoptrigger.sh
+  echo \"Restarting Eventbuilder 1 - 16\"  
   cd ~/trbsoft/hadesdaq/evtbuild/
+  ./start_eb_gbe.sh
   sleep 12 && starttrigger.sh &
-  ./start_eb_gbe.sh      
   "
 '
 
 $HOME/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" "<I> Eventbuilders have been restarted with last prefix" "EB" &
 
+#stoptrigger.sh
+#sleep 12 && starttrigger.sh &
diff --git a/control/gui/power/MDC_12_LV b/control/gui/power/MDC_12_LV
new file mode 100755 (executable)
index 0000000..6ce0a44
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+export myvar=$(doyoureallywant.pl "to powercycle the RICH LV?")
+if [ $myvar == "256" ]; then exit; fi
+
+xterm  -e bash --login -c  '
+  ssh hadaq@lxhadesdaqp "
+  source /home/hadaq/.bash_profile        
+  echo Switch off trigger
+  timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400 
+  echo \"Starting a RICH power cycle...\"
+  cd /home/hadaq/trbsoft/hadesdaq/utils;
+  PERLLIB=/home/hadaq/EPICS/EPICS-3.15.6/base/lib/perl ./Powercycle_MDCnew.pl;
+    echo Done
+
+  sleep 5
+  "
+'
index 27849c88c878815e0c7251b4fd8ec1db25955a4a..6494dd010935f885b5dac208dc331ad033f5e00e 100755 (executable)
@@ -12,13 +12,13 @@ xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
   timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400 
   echo Mute DAQi
   ssh hadaq@hadesp33 \"killall -USR1 speakdaemon.pl\"
-#  echo Switch off beam abort
-#  ssh hadeswrp01 \"echo \"W3000000010\" >/dev/ttyUSB0\"
-#  sleep .1
+  echo Switch off beam abort
+  ssh hadeswrp01 \"echo \"W3000000010\" >/dev/ttyUSB0\"
+  sleep .1
 
   cd ~/trbsoft/trbnettools/binlocal
 
-  echo \"This does not include MDC, Extra Boards, Hubs, CTS!\"
+  echo \"This does not include old MDC, Extra Boards, Hubs, CTS!\"
 
 
 
@@ -58,6 +58,15 @@ for TRB3_SERVER in  trb3sc134 trb3sc009 trb3sc130 trb3sc128 trb3sc131 trb3sc129
   done
 
 
+echo MDC new
+for TRB3_SERVER in  trb3sc546 trb3sc548 trb3sc554 trb3sc555 trb3sc563 trb3sc565 ;
+  do
+    ping \$TRB3_SERVER -c 1 -w 1  >/dev/null 2>&1 || echo \"ERROR contacting \$TRB3_SERVER\"
+    TRB3_SERVER=\$TRB3_SERVER ./trbcmd reload 0xffff
+    sleep .3
+  done
+
+
 
 echo Start
 for TRB3_SERVER in  trb3sc438;
@@ -67,7 +76,7 @@ for TRB3_SERVER in  trb3sc438;
   done
 
 
-  echo \"Done   - Check for Error messages above, then do a DAQ restart!\"
+  echo \"Done   - Check for Error messages above, then do a DAQ restart and enable beam abort again!\"
   sleep 10
   "
 '
diff --git a/control/gui/reboot/30_MDC_12 b/control/gui/reboot/30_MDC_12
new file mode 100755 (executable)
index 0000000..4e42693
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "reboot MDC 1/2 boards in the system") #"WARNING: Turn off the beam request in the back of the counting house before!")
+if [ $myvar == "256" ]; then exit; fi
+
+notifyall.sh "DAQ" "<I> The new MDC boards are going to be rebooted." "STARTUP" &
+
+xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
+  ssh hadaq@lxhadesdaqp "
+  source /home/hadaq/.bash_profile
+  echo Switch off trigger
+  timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400
+#  echo Switch off beam abort
+#  ssh hadeswrp01 \"echo \"W3000000010\" >/dev/ttyUSB0\"
+#  sleep .1
+  cd ~/trbsoft/trbnettools/binlocal
+
+for TRB3_SERVER in  trb3sc548 trb3sc546 trb3sc565 trb3sc554 trb3sc563 trb3sc555;
+  do
+    ping \$TRB3_SERVER -c 1 -w 1  >/dev/null 2>&1 || echo \"ERROR contacting \$TRB3_SERVER\"
+    TRB3_SERVER=\$TRB3_SERVER timeout 1s ./trbcmd reload 0xffff
+    sleep .6
+  done
+
+
+  echo \"Done   - Check for Error messages above, then do a DAQ restart!\"
+
+  sleep 10
+  "
+'
+
+
index 2184560c779c63250579c63cf9335b2930d009e1..b2105c0cea9b9c73b94a65dd23971b4524766329 100755 (executable)
@@ -10,9 +10,9 @@ xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
   source /home/hadaq/.bash_profile
   echo Switch off trigger
   timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400
-#  echo Switch off beam abort
-#  ssh hadeswrp01 \"echo \"W3000000010\" >/dev/ttyUSB0\"
-#  sleep .1
+  echo Switch off beam abort
+  ssh hadeswrp01 \"echo \"W3000000010\" >/dev/ttyUSB0\"
+  sleep .1
   cd ~/trbsoft/trbnettools/binlocal
 
 for TRB3_SERVER in  trb3sc317 trb3sc319 trb3sc320 trb3sc315 trb3sc318 trb3sc316;
index 16b225455121324cc82ce0f982fae2c4f1f48f84..44ff97f27842eeaef799aff7c5c2a14bc8197dc2 100755 (executable)
@@ -11,9 +11,9 @@ xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
   echo Switch off trigger
   timeout 1s trbcmd setbit 0x0003 0xa0c0 0x400 
   cd ~/trbsoft/trbnettools/binlocal
-#  echo Switch off beam abort
-#  ssh hadeswrp01 \"echo \"W3000000010\" >/dev/ttyUSB0\"
-#  sleep .1
+  echo Switch off beam abort
+  ssh hadeswrp01 \"echo \"W3000000010\" >/dev/ttyUSB0\"
+  sleep .1
 
 #   echo \"Trying reload via TrbNet\"
 #   timeout .2s trbcmd reload 0xfe47
diff --git a/hmon/doc/misc2-ip.htt b/hmon/doc/misc2-ip.htt
new file mode 100644 (file)
index 0000000..151ed88
--- /dev/null
@@ -0,0 +1,13 @@
+<h3>Network Connections of DAQ hubs</h3>
+Event data is sent from the DAQ to eventbuilders over normal Ethernet.
+This checks if all the DAQ boards do have a working link.
+
+If a link is not working, data from this subsystem will not reach the Eventbuilders
+preventing them from writing files.
+
+<h4>Error Handling</h4>
+
+<li>Do a "fix missing IP" followed by a DAQ restart<br>
+<li>If this doesn't help and some endpoints are missing (with an address in the 0x8000 range), a power cycle of that system might be needed.
+</ul>
+
diff --git a/utils/Powercycle_MDCnew.pl b/utils/Powercycle_MDCnew.pl
new file mode 100644 (file)
index 0000000..bc1b95e
--- /dev/null
@@ -0,0 +1,33 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+use lib "../nettools/";
+use Perl2Epics;
+use Data::Dumper;
+
+print "Connect..\n";
+my $s = "HAD:RICH:PS:poweron";
+my $ret = Perl2Epics::Connect("RICHLV_PowerOn",$s);
+if(!$ret) {
+    print "Could not connect to ".$s."\nEXITING\n";
+    sleep 5;
+    exit;
+}
+
+$s    = "HAD:RICH:PS:poweroff";
+$ret = Perl2Epics::Connect("RICHLV_PowerOff",$s);
+if(!$ret) {
+    print "Could not connect to ".$s."\nEXITING\n";
+    sleep 5;
+    exit;
+}
+print "Connected\n";
+
+Perl2Epics::Put("RICHLV_PowerOff",1);
+Perl2Epics::GetAll();
+
+sleep 10;
+Perl2Epics::Put("RICHLV_PowerOn",1);
+Perl2Epics::Update(0.2);
+sleep 10;