From 95538f9f9e2e251c18bbeddc7dccf6aa846413e4 Mon Sep 17 00:00:00 2001 From: "hadaq@countinghouse" Date: Mon, 30 Jun 2014 18:27:19 +0200 Subject: [PATCH] Latest updates before beamtime --- control/gui/eb/10_Restart_EB | 2 +- control/gui/eb/60_Prefix_TC | 13 +++++++ control/gui/eb/98_Prefix_Sh | 13 +++++++ control/gui/monitor/10_CTS_Mon | 6 +-- control/gui/monitor/30_Epics_EB | 3 +- hmon/HPlot.pm | 3 ++ hmon/QA.pm | 4 +- hmon/hmon_busynew.pl | 7 +++- hmon/hmon_diamond.pl | 8 ++-- hmon/hmon_endpoints.pl | 2 +- hmon/hmon_hodo.pl | 22 ++++++----- hmon/hmon_hodo_hist.pl | 51 ++++++++----------------- hmon/hmon_mdchv_plottemplate.pl | 12 +++--- hmon/hmon_shower.pl | 2 +- hmon/index.cgi | 7 ++-- hmon/permanent/hmon_cpu.pl | 2 +- hmon/permanent/hmon_mdchv.pl | 54 +++++++++++++++----------- hmon/permanent/hmon_mdcpressure.pl | 56 ++++++++++++++++----------- hmon/start.sh | 2 +- hub/addresses_hub.db | 2 +- hub/serials_hub.db | 1 + nettools/Perl2Epics.pm | 5 ++- rpc/addresses_rpc.db | 4 +- start/addresses_start_trb3.db | 8 ++-- start/serials_start_trb3.db | 5 +++ start/startup.script | 61 ++++++++++++++++++------------ utils/hldlast_store | 6 ++- utils/move_doublecpu_irq.sh | 7 ++-- 28 files changed, 216 insertions(+), 152 deletions(-) create mode 100755 control/gui/eb/60_Prefix_TC create mode 100755 control/gui/eb/98_Prefix_Sh mode change 100644 => 100755 hmon/hmon_shower.pl diff --git a/control/gui/eb/10_Restart_EB b/control/gui/eb/10_Restart_EB index 241b360..1aae676 100755 --- a/control/gui/eb/10_Restart_EB +++ b/control/gui/eb/10_Restart_EB @@ -6,7 +6,7 @@ ssh -X hadaq@lxhadesdaq " echo "Restarting Eventbuilder 1 - 16" stoptrigger.sh cd ~/trbsoft/hadesdaq/evtbuild/ - sleep 5 && starttrigger.sh & + sleep 10 && starttrigger.sh & ./start_eb_gbe.sh ' " diff --git a/control/gui/eb/60_Prefix_TC b/control/gui/eb/60_Prefix_TC new file mode 100755 index 0000000..fa0a161 --- /dev/null +++ b/control/gui/eb/60_Prefix_TC @@ -0,0 +1,13 @@ +#!/bin/bash + +# notifyall.sh "DAQ" " Eventbuilders are being restarted." "EB" & + +ssh -X hadaq@lxhadesdaq " + xterm -geometry 80x24 -bg orange -fg black -e bash -c ' + echo "Starting Eventbuilder 1 - 16 with prefix tc" + cd ~/trbsoft/hadesdaq/evtbuild/ + ./start_eb_gbe.pl -e restart -n 1-16 -d on -p tc + ' + " +/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been started. Writing TDC-Calibration Files" "EB" & + diff --git a/control/gui/eb/98_Prefix_Sh b/control/gui/eb/98_Prefix_Sh new file mode 100755 index 0000000..07c3ddf --- /dev/null +++ b/control/gui/eb/98_Prefix_Sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# notifyall.sh "DAQ" " Eventbuilders are being restarted." "EB" & + +ssh -X hadaq@lxhadesdaq " + xterm -geometry 80x24 -bg orange -fg black -e bash -c ' + echo "Starting Eventbuilder 1 - 16 with prefix sh" + cd ~/trbsoft/hadesdaq/evtbuild/ + ./start_eb_gbe.pl -e restart -n 1-16 -d on -p sh + ' + " +/home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been started. Writing Shower sh files" "EB" & + diff --git a/control/gui/monitor/10_CTS_Mon b/control/gui/monitor/10_CTS_Mon index 0bd28a6..9a92ec7 100755 --- a/control/gui/monitor/10_CTS_Mon +++ b/control/gui/monitor/10_CTS_Mon @@ -5,13 +5,13 @@ #notifyall.sh "DAQ" " DAQ is going to be restarted." "STARTUP" & #xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' -# ssh -X hadaq@lxhadeb06 " + ssh -X hadaq@lxhadeb06 " source /home/hadaq/.bashrc export DAQOPSERVER=hadesp31 cd /home/hadaq/trbsoft/hadesdaq/control/ctsmon perl ./mon_cts.pl -# sleep 1 -#" + sleep 1 +" #' #sleep 1 diff --git a/control/gui/monitor/30_Epics_EB b/control/gui/monitor/30_Epics_EB index 4cf305c..2fcbbf2 100755 --- a/control/gui/monitor/30_Epics_EB +++ b/control/gui/monitor/30_Epics_EB @@ -1,3 +1,4 @@ #!/bin/bash -ssh -X scs@lxhadeb06 'export EPICS_CA_ADDR_LIST=192.168.103.255; export EPICS_CA_AUTO_ADDR_LIST=NO; /home/epics/EPICS/EPICS-3.14.12.4/extensions/bin/linux-x86_64/medm -x -macro "SUBSYSNUM=24" ~/operator/ebmainctrl.adl' +ssh -X scs@lxhadeb06 'export EPICS_CA_ADDR_LIST="192.168.103.255 192.168.103.255:10012 192.168.103.255:10008 192.168.103.255:10003 192.168.103.255:10002 192.168.103.255:10001 192.168.103.255:10014 192.168.103.255:10007 192.168.103.255:10004 192.168.103.255:10010 192.168.103.255:10013 192.168.103.255:10015 192.168.103.255:10016 192.168.103.255:10009 192.168.103.255:10005 192.168.103.255:10011 192.168.103.255:10006" ; export EPICS_CA_AUTO_ADDR_LIST=NO; /home/epics/EPICS/EPICS-3.14.12.4/extensions/bin/linux-x86_64/medm -x -macro "SUBSYSNUM=24" ~/operator/ebmainctrl.adl' + #export EPICS_CA_ADDR_LIST=192.168.103.255; export EPICS_CA_AUTO_ADDR_LIST=NO; /home/epics/EPICS/EPICS-3.14.12.4/extensions/bin/linux-x86_64/medm -x -macro "SUBSYSNUM=24" /home/scs/operator/ebmainctrl.adl & diff --git a/hmon/HPlot.pm b/hmon/HPlot.pm index 26af668..0c3d79c 100755 --- a/hmon/HPlot.pm +++ b/hmon/HPlot.pm @@ -80,6 +80,9 @@ sub PlotInit { if ($p->{$name}->{nokey}) { plot_write($fh,"unset key"); } + else { + plot_write($fh,"set key left top"); + } plot_write($fh,"set xlabel \"".$p->{$name}->{xlabel}."\"") if $p->{$name}->{xlabel}; diff --git a/hmon/QA.pm b/hmon/QA.pm index 4932e6f..d523caf 100644 --- a/hmon/QA.pm +++ b/hmon/QA.pm @@ -41,7 +41,7 @@ $entries->{'eb'} = ['run', 'rate','bytes', 'lostevt', 'errbits']; $entries->{'mdc'} = ['token', 'blocked', 'temp', 'linkqual', 'voltage']; $entries->{'endp'} = ['mdc','rich', 'tof', 'rpc', 'other']; $entries->{'feeerr'} = ['rich', 'trb', 'feeerr','trginp','trgqual']; -$entries->{'other'} = ['speech','rich','mdcinvalid']; #'magnet','shower' +$entries->{'other'} = ['magnet','speech','rich','shower','mdcinvalid']; $entries->{'pion'} = ['nxstatus', 'HV', 'HVcurr', 'cooling']; @@ -94,7 +94,7 @@ use constant {CTSAddress => 0x0003}; # Missing Boards ############################################################################### -# our @mdc_boards_removed =(0x2233,0x2257); +our @mdc_boards_removed =(0x2257); our @mdc_chambers_removed =(); our @rich_boards_removed =(); our @tof_boards_removed =(); diff --git a/hmon/hmon_busynew.pl b/hmon/hmon_busynew.pl index dd27ca6..aad7af1 100755 --- a/hmon/hmon_busynew.pl +++ b/hmon/hmon_busynew.pl @@ -109,7 +109,7 @@ while (1) { $diff->{$b}->[$v] = $vdiff/($tdiff||1); } } - + HPlot::PlotAdd('BusyTimes',$diff->{0x8000}->[6],0); #MDC12 HPlot::PlotAdd('BusyTimes',$diff->{0x8000}->[7],1); #MDC34 HPlot::PlotAdd('BusyTimes',$diff->{0x8000}->[3],2); #Shower @@ -172,6 +172,11 @@ while (1) { } unless($iter % 8) { HPlot::PlotDraw('BusyTimes'); + my $maxpercent = max($diff->{0x8000}->[6],$diff->{0x8000}->[7],$diff->{0x8000}->[3],$diff->{0x8000}->[2],$diff->{0x8000}->[1],$diff->{0x8000}->[0],); + my $msgstr = sprintf("%3.1f%%",$maxpercent); + my $qastate = QA::OK; + $qastate = QA::ERROR if ($maxpercent > 99); + QA::WriteQALog($fqa,"daq","busy",5,$qastate,"Busy",$msgstr,""); } } diff --git a/hmon/hmon_diamond.pl b/hmon/hmon_diamond.pl index a97b324..7b6d501 100755 --- a/hmon/hmon_diamond.pl +++ b/hmon/hmon_diamond.pl @@ -106,13 +106,13 @@ my $time = time(); my $diff; my $iter = 0; -$ENV{'DAQOPSERVER'} = "xboxp:6"; +#$ENV{'DAQOPSERVER'} = "xboxp:6"; trb_init_ports() or die trb_strerror(); while (1) { my $o; - foreach my $b (0x50f0,0x50f2,0x50f3) { + foreach my $b (0x5000,0x5002,0x5003) { my $t = trb_register_read_mem($b,0xc000,0,33); $o->{$b} = $t->{$b}; } @@ -121,7 +121,7 @@ while (1) { foreach my $b (keys %$o) { for my $v (0..32) { my $tdiff = time() - $oldtime; - my $vdiff = ($o->{$b}->[$v]&0xffffff) - ($old->{$b}->[$v]&0xffffff); + my $vdiff = (($o->{$b}->[$v]||0)&0xffffff) - (($old->{$b}->[$v]||0)&0xffffff); if ($vdiff < 0) { $vdiff += 2**24;} $diff->{$b}->[$v] = $vdiff/($tdiff|1); } @@ -130,7 +130,7 @@ while (1) { for my $x (0..5) { for my $y (0..5) { - HPlot::PlotFill('DiamondRate',$diff->{$fpga->[$y]->[$x]+0x50f0}->[$chan->[$y]->[$x]],$x+1,$y+1); + HPlot::PlotFill('DiamondRate',$diff->{$fpga->[$y]->[$x]+0x5000}->[$chan->[$y]->[$x]],$x+1,$y+1); } } HPlot::PlotDraw('DiamondRate'); diff --git a/hmon/hmon_endpoints.pl b/hmon/hmon_endpoints.pl index cd4fbe9..6c72b58 100755 --- a/hmon/hmon_endpoints.pl +++ b/hmon/hmon_endpoints.pl @@ -115,7 +115,7 @@ while(1) { #Start TRB3 0x8880,0x5000,0x5002,0x5003, #Hodo TRB3 - 0x8890,0x5010,0x5013 + 0x8890,0x5010,0x5011,0x5012,0x5013 ); ###strip the register value diff --git a/hmon/hmon_hodo.pl b/hmon/hmon_hodo.pl index b7631c8..6918f6f 100755 --- a/hmon/hmon_hodo.pl +++ b/hmon/hmon_hodo.pl @@ -74,26 +74,30 @@ trb_init_ports() or die trb_strerror(); while (1) { my $o; - foreach my $b (0x5010,0x5013) { + foreach my $b (0x5010,0x5011,0x5012,0x5013) { my $t = trb_register_read_mem($b,0xc000,0,33); $o->{$b} = $t->{$b}; } if (defined $old) { foreach my $b (keys %$o) { - for my $v (0..32) { + for my $v (0..7) { my $tdiff = time() - $oldtime; - my $vdiff = ($o->{$b}->[$v]&0xffffff) - ($old->{$b}->[$v]&0xffffff); + my $vdiff = ($o->{$b}->[$v*4+1]&0xffffff) - ($old->{$b}->[$v*4+1]&0xffffff); if ($vdiff < 0) { $vdiff += 2**24;} - $diff->{$b}->[$v] = $vdiff/($tdiff|1); + $diff->{$b}->[$v*4+1] = $vdiff/($tdiff|1); } } - for my $bar (0..7) { + for my $bar (0..3) { for my $x (0..1) { - HPlot::PlotFill('HodoRate',$diff->{0x5010}->[$bar*2+1+$x*16],$x,$bar+8); - HPlot::PlotFill('HodoRate',$diff->{0x5013}->[$bar*2+1+$x*16],$x,$bar); - HPlot::PlotFill('HodoRatePlot',$diff->{0x5010}->[$bar*2+1+$x*16],$bar+8,$x); - HPlot::PlotFill('HodoRatePlot',$diff->{0x5013}->[$bar*2+1+$x*16],$bar,$x); + HPlot::PlotFill('HodoRate', $diff->{0x5013}->[$bar*4+1+$x*16],$x,$bar); + HPlot::PlotFill('HodoRatePlot',$diff->{0x5013}->[$bar*4+1+$x*16],$bar,$x); + HPlot::PlotFill('HodoRate', $diff->{0x5012}->[$bar*4+1+$x*16],$x,$bar+4); + HPlot::PlotFill('HodoRatePlot',$diff->{0x5012}->[$bar*4+1+$x*16],$bar+4,$x); + HPlot::PlotFill('HodoRate', $diff->{0x5011}->[$bar*4+1+$x*16],$x,$bar+8); + HPlot::PlotFill('HodoRatePlot',$diff->{0x5011}->[$bar*4+1+$x*16],$bar+8,$x); + HPlot::PlotFill('HodoRate', $diff->{0x5010}->[$bar*4+1+$x*16],$x,$bar+12); + HPlot::PlotFill('HodoRatePlot',$diff->{0x5010}->[$bar*4+1+$x*16],$bar+12,$x); } } HPlot::PlotDraw('HodoRate'); diff --git a/hmon/hmon_hodo_hist.pl b/hmon/hmon_hodo_hist.pl index ca41168..37eddf7 100755 --- a/hmon/hmon_hodo_hist.pl +++ b/hmon/hmon_hodo_hist.pl @@ -38,24 +38,6 @@ $plot->{xlabel} = "Time [s]"; $plot->{ylabel} = "Hits [1/s]"; HPlot::PlotInit($plot); -my $plot2 = (); -$plot2->{name} = "ScintiHist"; -$plot2->{file} = "files/ScintiHist"; -$plot2->{curves} = 1; -$plot2->{entries} = 200; -$plot2->{titles}->[0] = "Scintillator"; -$plot2->{type} = HPlot::TYPE_HISTORY; -$plot2->{output} = HPlot::OUT_PNG; -$plot2->{zlabel} = "Hitrate"; -$plot2->{sizex} = 680; -$plot2->{sizey} = 365; -$plot2->{nokey} = 0; -$plot2->{buffer} = 1; -$plot2->{xscale} = 5; -$plot2->{xlabel} = "Time [s]"; -$plot2->{ylabel} = "Hits [1/s]"; -HPlot::PlotInit($plot2); - my $plot3 = (); $plot3->{name} = "HitRatios"; $plot3->{file} = "files/HitRatios"; @@ -124,10 +106,10 @@ $str .= qq@
\n@; $str .= Hmon::MakeFooter(); Hmon::WriteFile("HodoHist",$str); -$str = Hmon::MakeTitle(9, 8, "Scintillator Hit History"); -$str .= qq@
\n@; -$str .= Hmon::MakeFooter(); -Hmon::WriteFile("ScintiHist",$str); +#$str = Hmon::MakeTitle(9, 8, "Scintillator Hit History"); +#$str .= qq@
\n@; +#$str .= Hmon::MakeFooter(); +#Hmon::WriteFile("ScintiHist",$str); $str = Hmon::MakeTitle(6, 8, "Hit Ratios"); $str .= qq@
\n@; @@ -166,7 +148,7 @@ trb_init_ports() or die trb_strerror(); while (1) { my $o, my $o2; my $t; - foreach my $b (0x5010,0x5012,0x5013) { + foreach my $b (0x5010,0x5011,0x5012,0x5013) { $t = trb_registertime_read_mem($b,0xc000,0,33); $o->{$b} = $t->{$b}; } @@ -177,10 +159,6 @@ while (1) { } } -# $t = trb_registertime_read(0xfe49,0x841f); -# foreach my $b (keys $t) { -# $o2->{$b}->{0x841f} = $t->{$b}; -# } if (defined $old) { foreach my $b (keys %$o) { @@ -210,19 +188,22 @@ while (1) { my @sum = qw(0 0 0 0 0 0 0 0); my $total = 0; - for my $bar (0..7) { + for my $bar (0..3) { for my $x (0..1) { - $sum[$bar/2+4] += $diff->{0x5010}->[$bar*2+1+$x*16]; - $sum[$bar/2] += $diff->{0x5013}->[$bar*2+1+$x*16]; - $total += $diff->{0x5010}->[$bar*2+1+$x*16]; - $total += $diff->{0x5013}->[$bar*2+1+$x*16]; + $sum[$bar/2] += $diff->{0x5013}->[$bar*4+1+$x*16]; + $total += $diff->{0x5013}->[$bar*4+1+$x*16]; + $sum[$bar/2+2] += $diff->{0x5012}->[$bar*4+1+$x*16]; + $total += $diff->{0x5012}->[$bar*4+1+$x*16]; + $sum[$bar/2+4] += $diff->{0x5011}->[$bar*4+1+$x*16]; + $total += $diff->{0x5011}->[$bar*4+1+$x*16]; + $sum[$bar/2+6] += $diff->{0x5010}->[$bar*4+1+$x*16]; + $total += $diff->{0x5010}->[$bar*4+1+$x*16]; } } for my $i (0..7) { HPlot::PlotAdd("HodoHist",$sum[$i]/2,$i); -# $total += $sum[$i]/2; } - HPlot::PlotAdd("ScintiHist",$diff->{0x5012}->[7],0); +# HPlot::PlotAdd("ScintiHist",$diff->{0x5012}->[7],0); HPlot::PlotAdd("HodoHist",$total/2,8); @@ -267,7 +248,7 @@ while (1) { unless($timer++ % 5) { HPlot::PlotDraw('HodoHist'); - HPlot::PlotDraw('ScintiHist'); +# HPlot::PlotDraw('ScintiHist'); HPlot::PlotDraw('HitRatioHist'); HPlot::PlotDraw('HitRatios'); HPlot::PlotDraw('HitSumHist'); diff --git a/hmon/hmon_mdchv_plottemplate.pl b/hmon/hmon_mdchv_plottemplate.pl index 04c0871..da44913 100755 --- a/hmon/hmon_mdchv_plottemplate.pl +++ b/hmon/hmon_mdchv_plottemplate.pl @@ -79,17 +79,17 @@ use Hmon; # close $fh; foreach my $i (0..3) { - my $out = Hmon::MakeTitle(11, 19, "MDC High Voltage "); - $out .= "

Plane ".($i+1)."

"; - $out .= qq%
%; + my $out = Hmon::MakeTitle(18, 5, "MDC High Voltage Plane$i"); + $out .= qq@\n@; + $out .= qq@\n@; $out .= Hmon::MakeFooter(); Hmon::WriteFile("mdchvV$i",$out); } foreach my $i (0..3) { - my $out = Hmon::MakeTitle(11, 19, "MDC High Voltage Current"); - $out .= "

Plane ".($i+1)."

"; - $out .= qq%
%; + my $out = Hmon::MakeTitle(18, 5, "MDC High Voltage Current Plane $i"); + $out .= qq@\n@; + $out .= qq@\n@; $out .= Hmon::MakeFooter(); Hmon::WriteFile("mdchvC$i",$out); } diff --git a/hmon/hmon_shower.pl b/hmon/hmon_shower.pl old mode 100644 new mode 100755 index a88af02..54483e9 --- a/hmon/hmon_shower.pl +++ b/hmon/hmon_shower.pl @@ -45,7 +45,7 @@ while (1) { my $hexval = sprintf("%x", $board); my @a = split("", $hexval); if($a[0] == "3" && $a[1] == "2") { - $values{$board}->{"bytes"} = %$bytes_sent->{$board} - $values{$board}->{"prev_bytes"} if defined %$bytes_sent->{$board}; + $values{$board}->{"bytes"} = %$bytes_sent->{$board} - ($values{$board}->{"prev_bytes"}||0) if defined %$bytes_sent->{$board}; $values{$board}->{"prev_bytes"} = %$bytes_sent->{$board}; $sum += $values{$board}->{"bytes"}; diff --git a/hmon/index.cgi b/hmon/index.cgi index 784be41..2fea507 100755 --- a/hmon/index.cgi +++ b/hmon/index.cgi @@ -15,7 +15,7 @@ print qq$ @@ -82,8 +82,8 @@ function openwin(url) { diff --git a/hmon/permanent/hmon_cpu.pl b/hmon/permanent/hmon_cpu.pl index dfb3037..696f04c 100755 --- a/hmon/permanent/hmon_cpu.pl +++ b/hmon/permanent/hmon_cpu.pl @@ -85,7 +85,7 @@ while(1) { $str .= "%2i",Hmon::findcolor($busy||.001,0,100,0),$busy); - if($s>0 && $s<5 && $max < $busy && $c>=2 && $c<=11) { + if($s>0 && $s<4 && $max < $busy && $c>=2 && $c<=11) { $max = $busy; $maxstr = sprintf("%d%%",$max); $busystr = sprintf("Max. Load: %.1f%% on %s CPU %d (sys %.1f, wait %.1f, irq %.1f)",$max,$srv[$s],$c,$sys,$io,$irq); diff --git a/hmon/permanent/hmon_mdchv.pl b/hmon/permanent/hmon_mdchv.pl index b4a8fe9..b2a5f4d 100755 --- a/hmon/permanent/hmon_mdchv.pl +++ b/hmon/permanent/hmon_mdchv.pl @@ -30,39 +30,41 @@ my @plot; foreach my $s (0..1) { foreach my $p (0..3) { $plot[$p*2+$s] = (); - $plot[$p*2+$s]->{name} = "P".$p.($s?'C':'F')."I"; + $plot[$p*2+$s]->{name} = "P".$p.($s?'F':'C')."I"; $plot[$p*2+$s]->{file} = "files/MDCHV".$plot[$p*2+$s]->{name}; $plot[$p*2+$s]->{entries} = 360; $plot[$p*2+$s]->{xscale} = 12; $plot[$p*2+$s]->{type} = HPlot::TYPE_HISTORY; $plot[$p*2+$s]->{output} = HPlot::OUT_PNG; $plot[$p*2+$s]->{xlabel} = "Minutes"; - $plot[$p*2+$s]->{ylabel} = ($s?'C':'F')." Current"; - $plot[$p*2+$s]->{sizex} = 800; - $plot[$p*2+$s]->{sizey} = 420; + $plot[$p*2+$s]->{ylabel} = ($s?'F':'C')." Current"; + $plot[$p*2+$s]->{sizex} = 700; + $plot[$p*2+$s]->{sizey} = 240; $plot[$p*2+$s]->{curves} = 6; $plot[$p*2+$s]->{dots} = 1; $plot[$p*2+$s]->{colors} = \@colors; + $plot[$p*2+$s]->{buffer} = 1; foreach my $c (0..5) { - $plot[$p*2+$s]->{titles}->[$c] = ($s?'C ':'F ').$names[$c]; + $plot[$p*2+$s]->{titles}->[$c] = ($s?'F ':'C ').$names[$c]; } HPlot::PlotInit($plot[$p*2+$s]); - $plot[$p*2+$s+8]->{name} = "P".$p.($s?'C':'F')."V"; + $plot[$p*2+$s+8]->{name} = "P".$p.($s?'F':'C')."V"; $plot[$p*2+$s+8]->{file} = "files/MDCHV".$plot[$p*2+$s+8]->{name}; $plot[$p*2+$s+8]->{entries} = 360; $plot[$p*2+$s+8]->{xscale} = 12; $plot[$p*2+$s+8]->{type} = HPlot::TYPE_HISTORY; $plot[$p*2+$s+8]->{output} = HPlot::OUT_PNG; $plot[$p*2+$s+8]->{xlabel} = "Minutes"; - $plot[$p*2+$s+8]->{ylabel} = ($s?'C':'F')." Voltage"; - $plot[$p*2+$s+8]->{sizex} = 800; - $plot[$p*2+$s+8]->{sizey} = 420; + $plot[$p*2+$s+8]->{ylabel} = ($s?'F':'C')." Voltage"; + $plot[$p*2+$s+8]->{sizex} = 700; + $plot[$p*2+$s+8]->{sizey} = 240; $plot[$p*2+$s+8]->{curves} = 6; $plot[$p*2+$s+8]->{dots} = 1; $plot[$p*2+$s+8]->{colors} = \@colors; + $plot[$p*2+$s+8]->{buffer} = 1; foreach my $c (0..5) { - $plot[$p*2+$s+8]->{titles}->[$c] = ($s?'C ':'F ').$names[$c]; + $plot[$p*2+$s+8]->{titles}->[$c] = ($s?'F ':'C ').$names[$c]; } HPlot::PlotInit($plot[$p*2+$s+8]); } @@ -71,13 +73,13 @@ foreach my $s (0..1) { for(my $i = 1; $i<=4; $i++) { for(my $j = 1; $j<=6; $j++) { - my $s = sprintf("HAD:MDC:HV:P%i:S%i:C:vmon",$i,$j); + my $s = sprintf("HAD:MDC:HV:P%i:S%i:F:vmon",$i,$j); Perl2Epics::Connect("$i-$j-0-V",$s); - $s = sprintf("HAD:MDC:HV:P%i:S%i:F:vmon",$i,$j); + $s = sprintf("HAD:MDC:HV:P%i:S%i:C:vmon",$i,$j); Perl2Epics::Connect("$i-$j-1-V",$s); - $s = sprintf("HAD:MDC:HV:P%i:S%i:C:imon",$i,$j); - Perl2Epics::Connect("$i-$j-0-I",$s); $s = sprintf("HAD:MDC:HV:P%i:S%i:F:imon",$i,$j); + Perl2Epics::Connect("$i-$j-0-I",$s); + $s = sprintf("HAD:MDC:HV:P%i:S%i:C:imon",$i,$j); Perl2Epics::Connect("$i-$j-1-I",$s); } } @@ -85,11 +87,11 @@ print "Connected.\n"; while(1) { my $data = Perl2Epics::GetAll(); - my $str = Hmon::MakeTitle(13, 9, "MDC HV", 1, ""); + my $str = Hmon::MakeTitle(13, 6, "MDC HV", 1, ""); $str .= ""; #
+ $str .= "
Sector 1Sector 2Sector 3Sector 4Sector 5Sector 6"; for(my $i = 1; $i<=4; $i++) { - $str .= "
Plane $i\n"; - $str .= "
Sector 1Sector 2Sector 3Sector 4Sector 5Sector 6"; + $str .= "
Plane $i\n"; for(my $v = 0; $v<=1; $v++) { $str .= "
".$layerlabel[$v]." "; for(my $s = 1; $s<=6; $s++) { @@ -99,16 +101,22 @@ while(1) { my $tc = strftime("%H:%M:%S",localtime($data->{"$i-$s-$v-I"}->{tme} || 0)); $volt = -1 unless defined $volt; $curr = -1 unless defined $curr; - HPlot::PlotAdd("P".($i-1).(($v)?'C':'F')."I",$curr,$s-1); - HPlot::PlotAdd("P".($i-1).(($v)?'C':'F')."V",$volt,$s-1); + HPlot::PlotAdd("P".($i-1).(($v)?'F':'C')."I",$curr,$s-1); + HPlot::PlotAdd("P".($i-1).(($v)?'F':'C')."V",$volt,$s-1); my $tmp .= sprintf(" %4i V | %2.2f uA",$volt,$curr); $tmp =~ s/\s/ /gi; $str .= "".$tmp; } } - $str .= "
 \n"; + + #$str .= "
 \n"; } - $str .= "
";# + $str .= "\n";# + $str .= "
currents trend
\n"; + $str .= "
\n"; + $str .= qq@\n@; + $str .= "
\n"; + $str .= qq@\n@; $str .= Hmon::MakeFooter(); if(!($timer%1)) { @@ -117,8 +125,8 @@ while(1) { if(!($timer%3)) { foreach my $s (0..1){ foreach my $p (0..3) { - HPlot::PlotDraw("P".$p.($s?'C':'F')."I"); - HPlot::PlotDraw("P".$p.($s?'C':'F')."V"); + HPlot::PlotDraw("P".$p.($s?'F':'C')."I"); + HPlot::PlotDraw("P".$p.($s?'F':'C')."V"); } } } diff --git a/hmon/permanent/hmon_mdcpressure.pl b/hmon/permanent/hmon_mdcpressure.pl index 8a4e5be..b72615b 100755 --- a/hmon/permanent/hmon_mdcpressure.pl +++ b/hmon/permanent/hmon_mdcpressure.pl @@ -12,7 +12,7 @@ use Perl2Epics; use HPlot; -my @names = qw( reflowPressureAthm reflowPressureCompr reflowInO2 reflowRatioIsob opensysFreshARGON opensysFreshCO2 reflowFreshArgon reflowFreshIsob pipePressureIsoB ); +my @names = qw( reflowPressureAthm:average reflowPressureCompr reflowInO2 reflowRatioIsob opensysFreshARGON opensysFreshCO2 reflowFreshArgon reflowFreshIsob pipePressureIsoB ); my @namesLABEL = qw( AtmosphericPressure reflowPressureCompressor reflow_O2_concentration reflow_Isobutane_fraction planeI_argon planeI_CO2 reflowFreshArgon reflowFreshIsobutane pipePressureIsobutane ); my @names2 = qw(waage_1_net waage_2_net); my @names2LABEL = qw(Scale_1 Scale_2); @@ -66,7 +66,7 @@ $plotPrePlane1->{titles}->[3] = "sector 4"; $plotPrePlane1->{titles}->[4] = "sector 5"; $plotPrePlane1->{titles}->[5] = "sector 6"; $plotPrePlane1->{xlabel} = "Minutes"; -$plotPrePlane1->{ylabel} = "Pa"; +$plotPrePlane1->{ylabel} = "Plane I - [Pa]"; $plotPrePlane1->{sizex} = 630; $plotPrePlane1->{sizey} = 220; $plotPrePlane1->{nokey} = 0; @@ -88,7 +88,7 @@ $plotPrePlane2->{titles}->[3] = "sector 4"; $plotPrePlane2->{titles}->[4] = "sector 5"; $plotPrePlane2->{titles}->[5] = "sector 6"; $plotPrePlane2->{xlabel} = "Minutes"; -$plotPrePlane2->{ylabel} = "Pa"; +$plotPrePlane2->{ylabel} = "Plane II - [Pa]"; $plotPrePlane2->{sizex} = 630; $plotPrePlane2->{sizey} = 220; $plotPrePlane2->{nokey} = 0; @@ -110,7 +110,7 @@ $plotPrePlane3->{titles}->[3] = "sector 4"; $plotPrePlane3->{titles}->[4] = "sector 5"; $plotPrePlane3->{titles}->[5] = "sector 6"; $plotPrePlane3->{xlabel} = "Minutes"; -$plotPrePlane3->{ylabel} = "Pa"; +$plotPrePlane3->{ylabel} = "Plane III - [Pa]"; $plotPrePlane3->{sizex} = 630; $plotPrePlane3->{sizey} = 220; $plotPrePlane3->{nokey} = 0; @@ -129,6 +129,14 @@ $str .= qq@@; $str .= Hmon::MakeFooter(); Hmon::WriteFile("MdcScales",$str); +$str = Hmon::MakeTitle(8,15,"Mdc differential Pressure",0); +$str .= qq@@; +$str .= qq@@; +$str .= qq@@; +$str .= Hmon::MakeFooter(); +Hmon::WriteFile("MdcPressure",$str); + + $str = Hmon::MakeTitle(8,5,"Mdc differential Pressure Plane1",0); $str .= qq@@; $str .= Hmon::MakeFooter(); @@ -170,7 +178,7 @@ print "Connected.\n"; while(1) { my $data = Perl2Epics::GetAll(); - $str = Hmon::MakeTitle(8, 28, "MDC Gas Pressure", 1, ""); + $str = Hmon::MakeTitle(8, 17, "MDC Gas Pressure", 1, ""); $str .= "

Chamber differential pressure [Pa]

\n"; $str .= "\n"; #
$str .= "
plane/sector123456\n"; @@ -181,7 +189,22 @@ while(1) { } } $str .= "
\n"; - $str .= "

Gas System

\n"; + # $str .= "Plane 1
\n"; + $str .= qq@\n@; + #$str .= "
Plane 2
\n"; + $str .= qq@\n@; + # $str .= "
Plane 3
\n"; + $str .= qq@\n@; + $str .= Hmon::MakeFooter(); + Hmon::WriteFile("MDCPressure", $str); + + $str = Hmon::MakeTitle(8, 18, "MDC Reflow & Scales", 1, ""); + $str .= "

Atmospheric Pressure

\n"; + $str .= qq@\n@; + $str .= "

Isobutane scales

"; + $str .= qq@\n@; + + $str .= "

Gas System

"; $str .= "\n"; foreach my $i (0.. (scalar @names)-1) { $str .= sprintf("
%s%.2f\n",$namesLABEL[$i],$data->{$names[$i]}->{val} || -1); @@ -194,22 +217,11 @@ while(1) { foreach my $i (0.. (scalar @names3)-1) { $str .= sprintf("
%s%.2f\n",$names3[$i],$data->{$names3[$i]}->{val} || -1); } - $str .= "
\n"; - $str .= "
Chamber differential pressure
\n"; - $str .= "Plane 1
\n"; - $str .= qq@\n@; - $str .= "
Plane 2
\n"; - $str .= qq@\n@; - $str .= "
Plane 3
\n"; - $str .= qq@\n@; - $str .= "

Isobutane scales

\n"; - $str .= qq@\n@; - $str .= "
\n"; - $str .= "

Atmospheric Pressure

\n"; - $str .= qq@\n@; + $str .= ""; + $str .= Hmon::MakeFooter(); - Hmon::WriteFile("MDCPressure", $str); + Hmon::WriteFile("MDCReflow", $str); if(!($timer%6)) { HPlot::PlotAdd("MdcScales",$data->{waage_1_net}->{val},0); @@ -219,7 +231,7 @@ while(1) { if(!($timer%6)) { - HPlot::PlotAdd("AtmosPress",$data->{reflowPressureAthm}->{val}); + HPlot::PlotAdd("AtmosPress",$data->{reflowPressureAthm:average}->{val}); HPlot::PlotDraw("AtmosPress"); } @@ -227,7 +239,7 @@ while(1) { if(!($timer%6)) { for(my $i = 1; $i<=3; $i++) { for(my $j = 1; $j<=6; $j++) { - HPlot::PlotAdd("MdcPressurePlane$i",$data->{"p$i$j"}->{val},$j); + HPlot::PlotAdd("MdcPressurePlane$i",$data->{"p$i$j"}->{val},$j-1); HPlot::PlotDraw("MdcPressurePlane$i"); } } diff --git a/hmon/start.sh b/hmon/start.sh index 6a55519..4b89531 100755 --- a/hmon/start.sh +++ b/hmon/start.sh @@ -10,7 +10,7 @@ echo " Renewing tunnels and environment..." pgrep -f 'hmon_ssh -f -R 8888' >/dev/null if [ $? -eq 1 ]; then echo " No tunnel found, digging new one"; -./hmon_ssh -f -R 8888:hades33.gsi.de:80 -R 3060:hades33.gsi.de:80 cerberus.x-matter.uni-frankfurt.de -N & +./hmon_ssh -f -R 8888:hades33.gsi.de:80 -R 3060:hades33.gsi.de:80 -R 8889:hades33.gsi.de:1234 -R 9999:lxhadeb06.gsi.de:80 cerberus.x-matter.uni-frankfurt.de -N & fi killall speakdaemon.pl diff --git a/hub/addresses_hub.db b/hub/addresses_hub.db index 785daa6..118b7e0 100644 --- a/hub/addresses_hub.db +++ b/hub/addresses_hub.db @@ -48,5 +48,5 @@ 0x8910 0815 5 0 081 #StartTRB3 -0x8880 0745 5 0 074 +0x8880 0065 5 0 006 0x8890 1065 5 0 106 diff --git a/hub/serials_hub.db b/hub/serials_hub.db index b2b1743..cad693b 100644 --- a/hub/serials_hub.db +++ b/hub/serials_hub.db @@ -28,3 +28,4 @@ 0805 0x330000031349ed28 0815 0x6b0000031319f428 1065 0x4b000004f9decd28 + 0065 0xc4000003481ef228 diff --git a/nettools/Perl2Epics.pm b/nettools/Perl2Epics.pm index 15e6018..6ad4701 100644 --- a/nettools/Perl2Epics.pm +++ b/nettools/Perl2Epics.pm @@ -8,8 +8,9 @@ use lib '/home/scs/EPICS/gcc-4.4/EPICS-3.14.12.2_linux-x86_64/base/' . '/lib/per use CA; $ENV{EPICS_CA_AUTO_ADDR_LIST} = 'YES'; -$ENV{EPICS_CA_ADDR_LIST} = "192.168.100.11 192.168.100.12 192.168.100.13 192.168.100.14 192.168.100.15 localhost"; - +# JAM added fixed port numbers of EB epics +$ENV{EPICS_CA_ADDR_LIST} = "192.168.103.255 192.168.103.255:10012 192.168.103.255:10008 192.168.103.255:10003 192.168.103.255:10002 192.168.103.255:10001 192.168.103.255:10014 192.168.103.255:10007 192.168.103.255:10004 192.168.103.255:10010 192.168.103.255:10013 192.168.103.255:10015 192.168.103.255:10016 192.168.103.255:10009 192.168.103.255:10005 192.168.103.255:10011 192.168.103.255:10006 localhost"; +#$ENV{EPICS_CA_ADDR_LIST} = "192.168.100.11 192.168.100.12 192.168.100.13 192.168.100.14 192.168.100.15 localhost"; my $EpicsValues = {}; my $EpicsStore = {}; diff --git a/rpc/addresses_rpc.db b/rpc/addresses_rpc.db index 89bfffa..2fc571b 100644 --- a/rpc/addresses_rpc.db +++ b/rpc/addresses_rpc.db @@ -2,7 +2,7 @@ ################################################### 0x4800 059 1 7 059 0x4801 067 1 7 067 -0x4802 110 1 7 110 +0x4802 052 1 7 052 0x4803 056 1 7 056 0x4810 094 1 7 094 0x4811 085 1 7 085 @@ -19,7 +19,7 @@ 0x4833 122 1 7 122 0x4840 054 1 7 054 0x4841 053 1 7 053 -0x4842 052 1 7 052 +0x4842 110 1 7 110 0x4843 051 1 7 051 0x4850 092 1 7 092 0x4851 083 1 7 083 diff --git a/start/addresses_start_trb3.db b/start/addresses_start_trb3.db index cfd3589..7a73863 100644 --- a/start/addresses_start_trb3.db +++ b/start/addresses_start_trb3.db @@ -1,9 +1,9 @@ #Address # S/N # FPGA # Design # TRB # ################################################### -0x5000 0740 0 0 0 -0x5001 0741 1 0 0 -0x5002 0742 2 0 0 -0x5003 0743 3 0 0 +0x5000 0060 0 0 0 +0x5001 0061 1 0 0 +0x5002 0062 2 0 0 +0x5003 0063 3 0 0 0x5010 1060 0 0 0 0x5011 1061 1 0 0 diff --git a/start/serials_start_trb3.db b/start/serials_start_trb3.db index ac040dd..acef26c 100644 --- a/start/serials_start_trb3.db +++ b/start/serials_start_trb3.db @@ -12,3 +12,8 @@ 1062 0xea000004fa000028 1063 0xc7000004fa00c628 + 0065 0xc4000003481ef228 + 0060 0xb5000003482d3d28 + 0061 0xd5000003481eef28 + 0062 0xec00000348284328 + 0063 0x34000003482d1c28 diff --git a/start/startup.script b/start/startup.script index f5abd78..157e793 100644 --- a/start/startup.script +++ b/start/startup.script @@ -25,17 +25,17 @@ trbcmd w 0xfe4e 0xc804 0x00000080 #Hodoscope inputs - trbcmd w 0x5010 0xc802 0xffffffff # disable channel 0-31 - trbcmd w 0x5010 0xc803 0x00000000 # disable channel 32-63 - trbcmd w 0x5011 0xc802 0x00000000 # disable channel 0-31 - trbcmd w 0x5011 0xc803 0x00000000 # disable channel 32-63 - trbcmd w 0x5012 0xc802 0x000000c0 # disable channel 0-31 - trbcmd w 0x5012 0xc803 0x00000000 # disable channel 32-63 - trbcmd w 0x5013 0xc802 0xffffffff # disable channel 0-31 - trbcmd w 0x5013 0xc803 0x00000000 # disable channel 32-63 +# trbcmd w 0x5010 0xc802 0xffffffff # disable channel 0-31 +# trbcmd w 0x5010 0xc803 0x00000000 # disable channel 32-63 +# trbcmd w 0x5011 0xc802 0x00000000 # disable channel 0-31 +# trbcmd w 0x5011 0xc803 0x00000000 # disable channel 32-63 +# trbcmd w 0x5012 0xc802 0x000000c0 # disable channel 0-31 +# trbcmd w 0x5012 0xc803 0x00000000 # disable channel 32-63 +# trbcmd w 0x5013 0xc802 0xffffffff # disable channel 0-31 +# trbcmd w 0x5013 0xc803 0x00000000 # disable channel 32-63 #Start inputs - trbcmd w 0x5000 0xc802 0xfffcfcfc # disable channel 0-31 +# trbcmd w 0x5000 0xc802 0xfffcfcfc # disable channel 0-31 trbcmd w 0x5000 0xc803 0x00000000 # disable channel 32-63 trbcmd w 0x5001 0xc802 0x00000000 # disable channel 0-31 trbcmd w 0x5001 0xc803 0x00000000 # disable channel 32-63 @@ -45,10 +45,10 @@ trbcmd w 0xfe4e 0xc804 0x00000080 trbcmd w 0x5003 0xc803 0x00000000 # disable channel 32-63 - trbcmd w 0x5000 0xc802 0x00000000 # disable channel 32-63 - trbcmd w 0x5002 0xc802 0x00000000 # disable channel 32-63 - trbcmd w 0x5003 0xc802 0x00000000 # disable channel 32-63 - + trbcmd w 0x5000 0xc802 0xffffffff # eneable 32 channels in 0x5000 + trbcmd w 0x5001 0xc802 0xffffffff # eneable 32 channels in 0x5001 + trbcmd w 0x5002 0xc802 0xffffffff # eneable 32 channels in 0x5002 + trbcmd w 0x5003 0xc802 0xffffffff # eneable 32 channels in 0x5003 @@ -56,16 +56,22 @@ trbcmd w 0xfe4e 0xc804 0x00000080 trbcmd w 0x5000 0xcf00 0xfeee trbcmd w 0x5001 0xcf00 0x0000 trbcmd w 0x5002 0xcf00 0xfeee -trbcmd w 0x5003 0xcf00 0xfc1e +trbcmd w 0x5003 0xcf00 0x7e1e trbcmd w 0x8880 0xcf00 0x1101 #Forward to CTS via central FPGA #Connected to second Start input on CTS -trbcmd w 0x5010 0xcf00 0xffff -trbcmd w 0x5011 0xcf00 0x0000 -trbcmd w 0x5012 0xcf00 0x0000 -trbcmd w 0x5013 0xcf00 0xffff -trbcmd w 0x8890 0xcf00 0x1001 #Forward to CTS via central FPGA +trbcmd w 0x5010 0xcf00 0x0055 +trbcmd w 0x5011 0xcf00 0x0055 +trbcmd w 0x5012 0xcf00 0x0055 +trbcmd w 0x5013 0xcf00 0x0055 +trbcmd w 0x5010 0xcf02 0x5500 +trbcmd w 0x5011 0xcf02 0x5500 +trbcmd w 0x5012 0xcf02 0x5500 +trbcmd w 0x5013 0xcf02 0x5500 +trbcmd w 0x8890 0xcf00 0x0000 #Forward to CTS via central FPGA +trbcmd w 0x8890 0xcf25 0x1111 +trbcmd w 0x8890 0xcf26 0x2222 #Input Monitor Settings @@ -80,14 +86,19 @@ trbcmd w 0x5012 0xcf80 0x0008 trbcmd w 0x5013 0xcf80 0xffff -trbcmd clearbit 0x8880 0xc0 0x2 -trbcmd clearbit 0x8880 0xc1 0x2 -trbcmd clearbit 0x8880 0xc3 0x2 +#trbcmd clearbit 0x8880 0xc0 0x2 +#trbcmd clearbit 0x8880 0xc1 0x2 +#trbcmd clearbit 0x8880 0xc3 0x2 -trbcmd clearbit 0x8890 0xc0 0x2 -trbcmd clearbit 0x8890 0xc1 0x2 -trbcmd clearbit 0x8890 0xc3 0x2 +#trbcmd clearbit 0x8890 0xc0 0x0 +#trbcmd clearbit 0x8890 0xc1 0x0 +#trbcmd clearbit 0x8890 0xc3 0x0 +#invert inputs of slow channels +exec_cmd{local} /home/hadaq/trbsoft/daqtools/tools/padiwa.pl 0x5010 0 invert 0xaaaa +exec_cmd{local} /home/hadaq/trbsoft/daqtools/tools/padiwa.pl 0x5011 0 invert 0xaaaa +exec_cmd{local} /home/hadaq/trbsoft/daqtools/tools/padiwa.pl 0x5012 0 invert 0xaaaa +exec_cmd{local} /home/hadaq/trbsoft/daqtools/tools/padiwa.pl 0x5013 0 invert 0xaaaa exec_cmd{local} /home/hadaq/trbsoft/daqtools/tools/dac_program.pl ../start/ThreshPadiwaVeto.db exec_cmd{local} /home/hadaq/trbsoft/daqtools/tools/dac_program.pl ../start/ThreshNinoStart.db diff --git a/utils/hldlast_store b/utils/hldlast_store index ba4f9d5..f7c879f 100755 --- a/utils/hldlast_store +++ b/utils/hldlast_store @@ -1,5 +1,9 @@ #!/bin/bash -find /store -mtime 0 -name \*$1\* -size +100c -printf %A@\\t%p\\n 2>/dev/null | sort | tail -n 20 | cut -f 2 +export num=$2 +#-mtime 0 +find /store -type f -regex .\*$1.\* -size +100c -printf %A@\\t%p\\t%s\\n | sort | tail -n ${num:-20} | cut -f 2,3 +# JAM added type argument to suppress directories in list 11-06-2014 +#find /store -mtime 0 -name \*$1\* -size +100c -printf %A@\\t%p\\n 2>/dev/null | sort | tail -n 20 | cut -f 2 #zsh diff --git a/utils/move_doublecpu_irq.sh b/utils/move_doublecpu_irq.sh index 7c0ccd1..76916fd 100755 --- a/utils/move_doublecpu_irq.sh +++ b/utils/move_doublecpu_irq.sh @@ -1,8 +1,9 @@ #!/bin/bash # JAM moved actual setting of interrupt affinities to scripts on target machines -ssh root@lxhadeb02p '/root/bin/set_eth_affinity.sh' -ssh root@lxhadeb03p '/root/bin/set_eth_affinity.sh' -ssh root@lxhadeb04p '/root/bin/set_eth_affinity.sh' +#ssh root@lxhadeb02p '/usr/bin/perl -w /root/bin/set_eth_affinity_lxhadeb02.pl' +#ssh root@lxhadeb03p '/usr/bin/perl -w /root/bin/set_eth_affinity_lxhadeb03.pl' +#ssh root@lxhadeb04p '/usr/bin/perl -w /root/bin/set_eth_affinity_lxhadeb04.pl' +echo use default eth interrupt affinities on lxhadeb02-lxhadeb04 ssh root@lxhadeb05p '/usr/bin/perl -w /root/bin/set_eth_affinity_lxhadeb05.pl' #ssh root@lxhadeb05 '/root/bin/set_eth_affinity_lxhadeb05.sh' -- 2.43.0