From 32b192c06bef1291802ce7a505d786266e8f81bb Mon Sep 17 00:00:00 2001 From: Hadaq Hades Date: Tue, 29 May 2018 11:07:58 +0200 Subject: [PATCH] JAM: changed EB configuraton for BNET. Changed control gui scripts. --- control/gui/eb/10_Restart_EB | 2 +- control/gui/eb/29_Prefix_Be | 3 + control/gui/eb/40_Prefix_Te | 6 +- control/gui/eb/50_Prefix_Co | 4 + control/gui/eb/60_Prefix_TC | 3 + control/gui/eb/70_Prefix_Ri | 3 + control/gui/eb/75_Prefix_Ec | 3 + control/gui/eb/80_Prefix_St | 3 + control/gui/eb/90_Prefix_Md | 3 + control/gui/eb/98_Prefix_Sh | 3 + control/gui/eb/99_Prefix_Pt | 4 + ecal/addresses_ecal.db | 6 +- ecal/startup.script | 54 ++ evtbuild/eb_bnet_ltsm.conf | 5 +- evtbuild/start_eb_gbe.pl | 87 +- evtbuild/start_eb_gbe.sh | 3 +- hmon/QA.pm | 8 +- hmon/hmon_adcvolt.pl | 14 +- hmon/hmon_rich_apvs.pl | 0 hmon/hmon_rich_temp.pl | 22 +- hmon/index.cgi | 1 + hmon/start.sh | 2 + hub/register_configgbe_ip.db | 1083 +++++++++++++++++++++- hub/register_configgbe_ip_2018_newEBs.db | 8 +- main/data_sources.db | 4 +- main/startup_briccolage.sh | 3 + mdc/addresses_oep.db | 2 +- rich/addresses_concentrator.db_20180509 | 2 +- rich/addresses_dirich.db | 2 +- rich/addresses_dirich.db_20180509 | 54 +- rich/addresses_dirich_concentrator.db | 2 +- start/startup.script | 50 +- 32 files changed, 1344 insertions(+), 105 deletions(-) mode change 100755 => 100644 hmon/hmon_rich_apvs.pl mode change 120000 => 100644 hub/register_configgbe_ip.db diff --git a/control/gui/eb/10_Restart_EB b/control/gui/eb/10_Restart_EB index 1aae676..0a77f47 100755 --- a/control/gui/eb/10_Restart_EB +++ b/control/gui/eb/10_Restart_EB @@ -7,7 +7,7 @@ ssh -X hadaq@lxhadesdaq " stoptrigger.sh cd ~/trbsoft/hadesdaq/evtbuild/ sleep 10 && starttrigger.sh & - ./start_eb_gbe.sh + ./start_eb_gbe.sh ' " /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been restarted with last prefix" "EB" & diff --git a/control/gui/eb/29_Prefix_Be b/control/gui/eb/29_Prefix_Be index 95d0e05..9bcf178 100755 --- a/control/gui/eb/29_Prefix_Be +++ b/control/gui/eb/29_Prefix_Be @@ -8,6 +8,9 @@ ssh -X hadaq@lxhadesdaq " echo "Starting Eventbuilders with file prefix be" cd ~/trbsoft/hadesdaq/evtbuild/ ./start_eb_gbe.pl -e restart -n 1-16 -d on -p be + /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=be&oninit=10\" + echo set prefix te on BNET master controller + sleep 2 ' " /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been started. Writing beam files." "EB" & diff --git a/control/gui/eb/40_Prefix_Te b/control/gui/eb/40_Prefix_Te index a966b8b..f8cd293 100755 --- a/control/gui/eb/40_Prefix_Te +++ b/control/gui/eb/40_Prefix_Te @@ -6,8 +6,12 @@ ssh -X hadaq@lxhadesdaq " xterm -geometry 80x24 -bg orange -fg black -e bash -c ' echo "Starting Eventbuilders with prefix te" cd ~/trbsoft/hadesdaq/evtbuild/ - ./start_eb_gbe.pl -e restart -n 1-16 -d on -p te + ./start_eb_gbe.pl -e restart -n 1-16 -d on -p te + /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=te&oninit=10\" + echo set prefix te on BNET master controller + sleep 2 ' " + /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been started. Writing test files" "EB" & diff --git a/control/gui/eb/50_Prefix_Co b/control/gui/eb/50_Prefix_Co index ee70e70..8a234c4 100755 --- a/control/gui/eb/50_Prefix_Co +++ b/control/gui/eb/50_Prefix_Co @@ -7,6 +7,10 @@ ssh -X hadaq@lxhadesdaq " echo "Starting Eventbuilders with prefix co" cd ~/trbsoft/hadesdaq/evtbuild/ ./start_eb_gbe.pl -e restart -n 1-16 -d on -p co + /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=co&oninit=10\" + echo set prefix CO on BNET master controller + sleep 2 + ' " /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been started. Writing Cosmics Files" "EB" & diff --git a/control/gui/eb/60_Prefix_TC b/control/gui/eb/60_Prefix_TC index 4d471d5..540f918 100755 --- a/control/gui/eb/60_Prefix_TC +++ b/control/gui/eb/60_Prefix_TC @@ -7,6 +7,9 @@ ssh -X hadaq@lxhadesdaq " echo "Starting Eventbuilders with prefix tc" cd ~/trbsoft/hadesdaq/evtbuild/ ./start_eb_gbe.pl -e restart -n 1-16 -d on -p tc + /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=tc&oninit=10\" + echo set prefix TC on BNET master controller + sleep 2 ' " /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been started. Writing TDC-Calibration Files" "EB" & diff --git a/control/gui/eb/70_Prefix_Ri b/control/gui/eb/70_Prefix_Ri index 3e3da20..5e97fd2 100755 --- a/control/gui/eb/70_Prefix_Ri +++ b/control/gui/eb/70_Prefix_Ri @@ -7,6 +7,9 @@ ssh -X hadaq@lxhadesdaq " echo "Starting Eventbuilders with prefix ri" cd ~/trbsoft/hadesdaq/evtbuild/ ./start_eb_gbe.pl -e restart -n 1-16 -d on -p ri + /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=ri&oninit=10\" + echo set prefix RI on BNET master controller + sleep 2 ' " /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been started. Writing RICH Files" "EB" & diff --git a/control/gui/eb/75_Prefix_Ec b/control/gui/eb/75_Prefix_Ec index b8a8aec..1c702ff 100755 --- a/control/gui/eb/75_Prefix_Ec +++ b/control/gui/eb/75_Prefix_Ec @@ -7,6 +7,9 @@ ssh -X hadaq@lxhadesdaq " echo "Starting Eventbuilders with prefix ec" cd ~/trbsoft/hadesdaq/evtbuild/ ./start_eb_gbe.pl -e restart -n 1-16 -d on -p ec + /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=ec&oninit=10\" + echo set prefix EC on BNET master controller + sleep 2 ' " /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been started. Writing ECAL Files" "EB" & diff --git a/control/gui/eb/80_Prefix_St b/control/gui/eb/80_Prefix_St index 23ebcfc..e0d25e1 100755 --- a/control/gui/eb/80_Prefix_St +++ b/control/gui/eb/80_Prefix_St @@ -5,6 +5,9 @@ ssh -X hadaq@lxhadesdaq " echo "Starting Eventbuilders with prefix st" cd ~/trbsoft/hadesdaq/evtbuild/ ./start_eb_gbe.pl -e restart -n 1-16 -d on -p st + /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=st&oninit=10\" + echo set prefix ST on BNET master controller + sleep 2 ' " /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been started. Writing START Files" "EB"& diff --git a/control/gui/eb/90_Prefix_Md b/control/gui/eb/90_Prefix_Md index e68c98c..fd15cf5 100755 --- a/control/gui/eb/90_Prefix_Md +++ b/control/gui/eb/90_Prefix_Md @@ -5,6 +5,9 @@ ssh -X hadaq@lxhadesdaq " echo "Starting Eventbuilders with prefix md" cd ~/trbsoft/hadesdaq/evtbuild/ ./start_eb_gbe.pl -e restart -n 1-16 -d on -p md + /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=md&oninit=10\" + echo set prefix MD on BNET master controller + sleep 2 ' " /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been started. Writing MDC Files" "EB"& diff --git a/control/gui/eb/98_Prefix_Sh b/control/gui/eb/98_Prefix_Sh index 6ab4cd2..d84fddc 100755 --- a/control/gui/eb/98_Prefix_Sh +++ b/control/gui/eb/98_Prefix_Sh @@ -7,6 +7,9 @@ ssh -X hadaq@lxhadesdaq " echo "Starting Eventbuilders with prefix sh" cd ~/trbsoft/hadesdaq/evtbuild/ ./start_eb_gbe.pl -e restart -n 1-16 -d on -p sh + /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=sh&oninit=10\" + echo set prefix SH on BNET master controller + sleep 2 ' " /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been started. Writing Shower sh files" "EB" & diff --git a/control/gui/eb/99_Prefix_Pt b/control/gui/eb/99_Prefix_Pt index c0a4da9..5e5df1d 100755 --- a/control/gui/eb/99_Prefix_Pt +++ b/control/gui/eb/99_Prefix_Pt @@ -7,6 +7,10 @@ ssh -X hadaq@lxhadesdaq " echo "Starting Eventbuilders with prefix pt" cd ~/trbsoft/hadesdaq/evtbuild/ ./start_eb_gbe.pl -e restart -n 1-16 -d on -p pt + /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=pt&oninit=10\" + echo set prefix PT on BNET master controller + sleep 2 + ' " /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been started. Writing PionTracker pt files" "EB" & diff --git a/ecal/addresses_ecal.db b/ecal/addresses_ecal.db index 612177b..d408eed 100644 --- a/ecal/addresses_ecal.db +++ b/ecal/addresses_ecal.db @@ -8,9 +8,9 @@ 0x6005 0 1 0 0 0x6006 0 1 0 0 - 0x6010 0 1 0 0 - 0x6011 0 1 0 0 - 0x6012 0 1 0 0 + 0x6010 1171 1 0 0 + 0x6011 1651 1 0 0 + 0x6012 1231 1 0 0 0x6013 1211 1 0 0 0x6014 1591 1 0 0 0x6015 1051 1 0 0 diff --git a/ecal/startup.script b/ecal/startup.script index 3bceab4..f284c6f 100644 --- a/ecal/startup.script +++ b/ecal/startup.script @@ -9,6 +9,60 @@ trbcmd w 0xfe71 0xc804 0x00000000 trbcmd w 0xfe71 0xc804 0x00000078 + + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=0 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=1 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=2 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=3 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=4 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=5 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=6 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=7 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=8 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=9 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=10 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=11 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=12 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=13 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=14 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=15 --execute=pwm --data=0xdb1a + + + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=0 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=1 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=2 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=3 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=4 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=5 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=6 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=7 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=8 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=9 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=10 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=11 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=12 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=13 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=14 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=15 --execute=pwm --data=0xdb1a + + + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=0 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=1 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=2 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=3 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=4 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=5 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=6 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=7 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=8 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=9 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=10 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=11 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=12 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=13 --execute=pwm --data=0xdb1a + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=14 --execute=pwm --data=0x7b0 + exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=15 --execute=pwm --data=0xdb1a + #Load TDC settings load_register register_tdc_ecal.db diff --git a/evtbuild/eb_bnet_ltsm.conf b/evtbuild/eb_bnet_ltsm.conf index 0635d32..56adcfb 100644 --- a/evtbuild/eb_bnet_ltsm.conf +++ b/evtbuild/eb_bnet_ltsm.conf @@ -67,13 +67,14 @@ QUEUESIZE: 32 # BNETBLD gives number of builder processes per node # set BNETINP to 0 for conventional EB setup # EB server 0 1 2 3 -BNETINP: 0 0 0 0 -#BNETINP: 1 1 1 1 +#BNETINP: 0 0 0 0 +BNETINP: 1 1 1 1 #BNETINP: 2 2 2 2 #BNETBLD: 2 2 2 2 #BNETBLD: 3 3 3 3 BNETBLD: 1 1 1 0 + # EB Nr 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #EB_LIST: 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 EB_LIST: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 diff --git a/evtbuild/start_eb_gbe.pl b/evtbuild/start_eb_gbe.pl index ce56a68..56ba68a 100755 --- a/evtbuild/start_eb_gbe.pl +++ b/evtbuild/start_eb_gbe.pl @@ -583,18 +583,23 @@ sub startBnet() # parameters in eb.conf can specify how many input and builder processes run on each node. # we misuse daq gbe setup for EB 15 to specify ports and destination nodes. my (@process_list); -my $ebproc =15; +#my $ebproc =15; +# new: test with setup for first EB +my $ebproc =0; my $username = "hadaq"; my $dabclogin = ". /home/hadaq/soft/dabc/bin/dabclogin.head; "; # here test special installations: my $cdworkdir = "cd /home/hadaq/oper;"; - my $cmd_dabc = "/home/hadaq/soft/dabc/bin/dabc_exe.head "; +# my $cmd_dabc = "/home/hadaq/soft/dabc/bin/dabc_exe.head "; + my $cmd_dabc = "/usr/bin/gdb -x /home/hadaq/soft/dabc/head/base/run/gdbcmd.txt --args /home/hadaq/soft/dabc/bin/dabc_exe.head "; + my $conf_bnet_inp = " BnetInputHades.head.xml"; my $conf_bnet_bld = " BnetBuilderHades.head.xml"; - + # my @bnetservers = ("192.168.100.8","192.168.100.9","192.168.100.10","192.168.100.15"); + # before we start inidividual bnet processes, need to evaluate list of ports and nodes: # BNETSENDERS=[localhost:12501,localhost:12502] @@ -617,6 +622,10 @@ for ( my $ebserver=0; $ebserver<4; $ebserver=$ebserver+1){ # here we use the fact that first 4 eb processes are assigned to first 4 servers. # so node ip is directly mapped from setup: my $ip = $EB_Args_href->{$ebserver}->{'IP'}; + #dirty workaround for bnet at eb0: + if ($ebserver == 0) { + $ip = '192.168.100.8'; + } # JAM2018 - need to transform HADES VLAN IPs into GSI VLAN for BNET! my $gsi_ip = getIP_hades2gsi($ip); @@ -690,18 +699,21 @@ print "bnetreceivers: ". $bnetrcvs ."\n"; my $bnebport=12100; for ( my $ebserver=0; $ebserver<4; $ebserver=$ebserver+1){ - print "Starting processes on EB server: $ebserver\n"; + print "Starting input processes on EB server: $ebserver\n"; my $ebid=$ebserver + 1; # still need unique eventbuilder ids on cluster because of epics! # here we use the fact that first 4 eb processes are assigned to first 4 servers. # so node ip is directly mapped from setup: my $cpu = $EB_Args_href->{$ebserver}->{'IP'}; + if ($ebserver == 0) { + $cpu = '192.168.100.8'; + } my $gsi_cpu = getIP_hades2gsi($cpu); - # in the following, the port and ip setup of the bnet is taken from ebproc 15 only! + # in the following, the port and ip setup of the bnet is taken from ebproc 15 or 0 only! my $bnet_numsenders = $EB_Args_href->{$ebserver}->{'BNET_INP'}; - my $bnet_numbuilders = $EB_Args_href->{$ebserver}->{'BNET_BLD'}; - print "found $bnet_numsenders senders and $bnet_numbuilders builders on node $cpu \n"; + #my $bnet_numbuilders = $EB_Args_href->{$ebserver}->{'BNET_BLD'}; + print "found $bnet_numsenders senders on node $cpu \n"; @@ -727,9 +739,10 @@ for ( my $ebserver=0; $ebserver<4; $ebserver=$ebserver+1){ # todo: how to configure situation with more than one bnet input per node? hadaqports must be distributed on them... # - my $core_nr = &getCoreNr($cpu) . "," . &getCoreNr($cpu); + #my $core_nr = &getCoreNr($cpu) . "," . &getCoreNr($cpu); - my $exe_dabc = "ssh -n $cpu -l $username \"$dabclogin $cdworkdir $exports taskset -c $core_nr $cmd_dabc $conf_bnet_inp 1senderlog_$cpu.log 2>&1 &\""; my $log = $log_path . "/log_" . $ebserver . "_" . "startBnetInp_". $sender. ".txt"; @@ -743,7 +756,27 @@ for ( my $ebserver=0; $ebserver<4; $ebserver=$ebserver+1){ } # bnet sender/input processes - # todo: loop over builders + } # end senders + # todo: loop over builders + + for ( my $ebserver=0; $ebserver<4; $ebserver=$ebserver+1){ + print "Starting builder processes on EB server: $ebserver\n"; + my $ebid=$ebserver + 1; # still need unique eventbuilder ids on cluster because of epics! + + # here we use the fact that first 4 eb processes are assigned to first 4 servers. + # so node ip is directly mapped from setup: + my $cpu = $EB_Args_href->{$ebserver}->{'IP'}; + if ($ebserver == 0) { + $cpu = '192.168.100.8'; + } + my $gsi_cpu = getIP_hades2gsi($cpu); + # in the following, the port and ip setup of the bnet is taken from ebproc 15 or 0 only! + + #my $bnet_numsenders = $EB_Args_href->{$ebserver}->{'BNET_INP'}; + my $bnet_numbuilders = $EB_Args_href->{$ebserver}->{'BNET_BLD'}; + print "found $bnet_numbuilders builders on node $cpu \n"; + + for(my $builder=0; $builder<$bnet_numbuilders; $builder=$builder+1) { @@ -757,7 +790,7 @@ for ( my $ebserver=0; $ebserver<4; $ebserver=$ebserver+1){ " export PREFIX=" . $EB_Args_href->{$ebproc}->{'PREFIX'}. "; " . " export BNETSENDERS=" . $bnetsenders . ";" . " export BNETRECEIVERS=" . $bnetrcvs . ";" . - " export HADAQPORTS=" . $bnet_port_list[$ebserver]; + " export HADAQPORTS=" . $bnet_port_list[$ebserver]. "; " ; if($EB_Args_href->{$ebproc}->{'OUTDIR'} ){ if($EB_Args_href->{$ebproc}->{'MULTIDISK'}){ @@ -809,12 +842,13 @@ for ( my $ebserver=0; $ebserver<4; $ebserver=$ebserver+1){ # no output except for the stream server... } - my $core_nr = &getCoreNr($cpu) . "," . &getCoreNr($cpu); + #my $core_nr = &getCoreNr($cpu) . "," . &getCoreNr($cpu); - my $exe_dabc = "ssh -n $cpu -l $username \"$dabclogin $cdworkdir $exports taskset -c $core_nr $cmd_dabc $conf_bnet_bld 1builderlog_$cpu.log 2>&1 &\""; - my $log = $log_path . "/log_" . $ebserver . "_" . "startBnetBld_". $builder. ".txt"; + my $log = $log_path . "/log_" . $ebserver . "_" . "startBnetBld_". $builder . ".txt"; #my $log = "/dev/null 2>&1"; print "Forking:" . $exe_dabc ."\n"; @@ -829,9 +863,13 @@ for ( my $ebserver=0; $ebserver<4; $ebserver=$ebserver+1){ } # servers # finally, we need to set eb lut on cts for setup of EB15 => bnet distribution - `trbcmd w 0x0003 0xa0f0 0x8000`; + #trbcmd w 0x0003 0xa0f0 0x8000`; + `trbcmd w 0x0003 0xa0f0 0x1`; + # use EB1 as pseude for BNET now # all calibration triggers also assigned to pseudo EB15 => bnet distribution for the moment - `trbcmd w 0x0003 0xa0f3 0xfff`; + #trbcmd w 0x0003 0xa0f3 0xfff`; + `trbcmd w 0x0003 0xa0f3 0xff0`; + # use EB1 as pseudo receiver for calib triggers sleep (20); # need to wait until forking is done, otherwise it does not work via gui control xterm @@ -889,10 +927,10 @@ if($ebproc==15) #my $cmd_dabc = "/home/hadaq/soft/dabc/bin/dabc_exe "; # here test special installations: # my $cmd_dabc = "/home/hadaq/soft/dabc/bin/dabc_exe.275 "; - my $cmd_dabc = "/home/hadaq/soft/dabc/bin/dabc_exe.head "; +my $cmd_dabc = "/home/hadaq/soft/dabc/bin/dabc_exe.head "; # my $conf_dabc = " EventBuilderHades.xml"; -# my $conf_dabc = " EventBuilderHades.275.xml"; +# my $conf_dabc = " EventBuilderHades.275.xml"; my $conf_dabc = " EventBuilderHades.head.xml"; my $exports = " export LC_ALL=C;" . @@ -1224,8 +1262,12 @@ sub startIOC() # we always reset it to match lxhadeb05 where epics for builder should belong if($ebproc == 15) { - $cpu="192.168.100.15"; + $cpu='192.168.100.15'; } + #another dirty workaround for bnet at eb0: + if ($ebproc == 0) { + $cpu = '192.168.100.8'; + } # end bnet kludge my $exe = "ssh -n $cpu -l scs \"$cmd\""; @@ -1925,8 +1967,11 @@ sub writeArgs2file() foreach my $arg (@arg_list){ print $fh " $arg"; } - print $fh "\n"; - + print $fh ";\n"; + + # here put command to start the correct file prefix in bnet builders: + my $prefix=$EB_Args_href->{0}->{'PREFIX'}; + print $fh "/usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=$prefix&oninit=10\"\n"; $fh->close(); system("chmod 755 ./$fileName"); diff --git a/evtbuild/start_eb_gbe.sh b/evtbuild/start_eb_gbe.sh index aef0339..0a9320e 100755 --- a/evtbuild/start_eb_gbe.sh +++ b/evtbuild/start_eb_gbe.sh @@ -1 +1,2 @@ -./start_eb_gbe.pl -e restart -n 1-16 -d on -p te +./start_eb_gbe.pl -e restart -n 1-16 -d on -p te; +/usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt "http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=te&oninit=10" diff --git a/hmon/QA.pm b/hmon/QA.pm index 3d93a53..9480cf7 100644 --- a/hmon/QA.pm +++ b/hmon/QA.pm @@ -48,7 +48,7 @@ $entries->{'endp'} = ['mdc','rich', 'tof', 'rpc', 'other']; $entries->{'feeerr'} = ['mdcinvalid', 'trb', 'feeerr','trginp','trgqual']; $entries->{'pion'} = ['nxstatus', 'HV', 'HVcurr', 'cooling','seu']; $entries->{'other'} = ['magnet','goofy','','','sequencer']; -$entries->{'rich'} = ['temp','volt','curr','','']; +$entries->{'rich'} = ['temp','volt','curr','bkpl','']; $entries->{'ecal'} = ['','','','','']; @@ -80,11 +80,11 @@ our @TrgErrLimits = (100, 1000, 10000); our @CPULimits = (95, 100, 100); our @TimeoutLimits = (0, 0, 1); our @LinkErrLimits = (50, 500, 1000); -our @MdcEndpMissingLimits = (0, 0, 1); +our @MdcEndpMissingLimits = (0, 1, 2); our @RichEndpMissingLimits = (0, 2, 4); #!!!! our @TofEndpMissingLimits = (0, 0, 0); -our @RpcEndpMissingLimits = (0, 1, 2); -our @OtherEndpMissingLimits = (0, 2, 4);#!!! +our @RpcEndpMissingLimits = (0, 0, 1); +our @OtherEndpMissingLimits = (0, 0, 0);#!!! our @EBDeltaRateLimits = (10, 15, 25); our $TrgCheckPolarity = 1; our @Eventsbroken = (.5,5,10); diff --git a/hmon/hmon_adcvolt.pl b/hmon/hmon_adcvolt.pl index aee514e..c2821aa 100755 --- a/hmon/hmon_adcvolt.pl +++ b/hmon/hmon_adcvolt.pl @@ -195,7 +195,7 @@ while(1) { # } -# print Dumper $ret; + #print Dumper $ret->[1][1]; my $longtext = ''; my $dirich1V; my $dirich2V5; @@ -298,11 +298,20 @@ while(1) { $status = QA::OK; QA::WriteQALog($fqa,"rich","curr",30,$status,'Currents',$value,$longtext); + my $timeStamp = localtime(); + + my @months = qw( Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ); + my @days = qw(Sun Mon Tue Wed Thu Fri Sat Sun); + my ($sec,$minute,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); + my $updatetime = sprintf("%03s, %02d %s %04d - %02d:%02d:%02d",$days[$wday], $mday, $months[$mon], 1900 + $year, $hour, $minute, $sec); + $dirich1V->{min} = 1100; $dirich1V->{max} = 1400; $dirich1V->{symbol} = 'mV'; $dirich1V->{title} = 'RICH 1.1V'; + $dirich1V->{updatetime} = $updatetime; + my $fh; open($fh, ">", Hmon::HMONDIR."/files/rich1V.json"); print $fh encode_json($dirich1V); @@ -312,6 +321,9 @@ while(1) { $dirich2V5->{max} = 2800; $dirich2V5->{symbol} = 'mV'; $dirich2V5->{title} = 'RICH 2.5V'; + + $dirich2V5->{updatetime} = $updatetime; + open($fh, ">", Hmon::HMONDIR."/files/rich2V5.json"); print $fh encode_json($dirich2V5); close $fh; diff --git a/hmon/hmon_rich_apvs.pl b/hmon/hmon_rich_apvs.pl old mode 100755 new mode 100644 diff --git a/hmon/hmon_rich_temp.pl b/hmon/hmon_rich_temp.pl index aeaad93..7bf6ec8 100755 --- a/hmon/hmon_rich_temp.pl +++ b/hmon/hmon_rich_temp.pl @@ -33,17 +33,18 @@ trb_init_ports() or die trb_strerror(); while (1) { - my $rich_temp; my $data; - $rich_temp = trb_register_read(0xfe51, 0x0) or sleep 5 and next; -# print Dumper $rich_temp; + my $rich_temp1 = trb_register_read(0xfe51, 0x0) or sleep 5 and next; + my $rich_temp2 = trb_register_read(0xfe52, 0x0) or sleep 5 and next; + my %rich_temp = (%{$rich_temp1},%{$rich_temp2}); + # print Dumper $rich_temp; $min = 1000; $max = 0; $sum = 0; $count = 0; - foreach my $b (keys %{$rich_temp}) { + foreach my $b (keys %rich_temp) { $count ++; - my $t = ($rich_temp->{$b}>>20)/16; + my $t = ($rich_temp{$b}>>20)/16; $min = $t if $t < $min; $max = $t if $t > $max; $sum += $t; @@ -55,6 +56,17 @@ while (1) { $data->{min} = $min; $data->{symbol} = " °C"; $data->{title} = "RICH Temperature"; + + my $timeStamp = localtime(); + + my @months = qw( Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ); + my @days = qw(Sun Mon Tue Wed Thu Fri Sat Sun); + my ($sec,$minute,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); + my $updatetime = sprintf("%03s, %02d %s %04d - %02d:%02d:%02d",$days[$wday], $mday, $months[$mon], 1900 + $year, $hour, $minute, $sec); + + $data->{updatetime} = $updatetime; + + my $qastate = QA::GetQAState('below', $max, @QA::MdcTempLimits); my $str = sprintf("%i - %i", $min, $max); diff --git a/hmon/index.cgi b/hmon/index.cgi index e6e820c..95e5d0f 100755 --- a/hmon/index.cgi +++ b/hmon/index.cgi @@ -101,6 +101,7 @@ function openwin(url) {