our @FeeErrLimits = (0, 5, 10);
our @MdcOepLimits = (372, 372-1, 372-3);
-our @MdcVoltageLimits = (60, 90, 100);
+our @MdcVoltageLimits = (70, 90, 100);
our @MdcLockLimits = (0, 3, 5);
our @MdcTempLimits = (75, 80, 85);
our @EcalTempLimits = (55, 60, 65);
our @TrgErrLimits = (100, 1000, 10000);
our @CPULimits = (95, 100, 100);
our @TimeoutLimits = (0, 0, 1);
-our @TimeoutLimitsOnlyRICHMDC = (0, 5, 10);
+our @TimeoutLimitsOnlyRICHMDC = (1, 5, 10);
our @LinkErrLimits = (50, 500, 1000);
our @MdcEndpMissingLimits = (0, 5, 8); #!!! Oh dear.
our @RichEndpMissingLimits = (0, 3, 4);
our @PadiwaItofLimits = (0, 0, 0);
our $PadiwaStartNumber = 12;
-our @PadiwaStartLimits = (0, 0, 0);
+our @PadiwaStartLimits = (0, 1, 1);
our $PadiwaHodoNumber = 2;
our @PadiwaHodoLimits = (0, 0, 0);
our @mdc_boards_removed =(0x2203, 0x2027, 0x2057); #(0x2257, 0x2029); # 2233 added 2014-08-28 , 2203 at 2014/09/03, 2029 2014/09/23
our @mdc_chambers_removed =();
-our @rich_boards_removed =();
+our @rich_boards_removed =(0x71a4,0x71a5,0x71b4,0x71b5,0x72a4,0x72a5,0x72b4,0x72b5,0x73a4,0x73a5,0x73b4,0x73b5,0x826a);
our @tof_boards_removed =();
-our @rpc_boards_removed =(); #(0x6010, 0x6011, 0x6012, 0x6030, 0x6031, 0x6032, 0x6033, 0x6034, 0x6035, 0x6036, 0x6051, 0x6052, 0x6053, 0x6054, 0x6055, 0x6056, 0x8a00, 0x8a05);
+our @rpc_boards_removed =();
our @other_boards_removed =();
<ul>
<li>Check the list of board addresses, which board is busy.
-<ul><li>If all addresses start with '2' (from MDC), try "Resync missing OEPs"
+<ul><!--<li>If all addresses start with '2' (from MDC), try "Resync missing OEPs"-->
<li>If all addresses start with '7' (from RICH), try "Resync DiRich"
</ul>
<li>Do a DAQ restart
Check the long error message for the subsystems that cause the most errors, then try to solve these.
<br><b>Partially Missing</b> errors usually refer to a detector with a lot of noise, try to reload thresholds for the corresponding detector. A few errors of this type are perfectly normal.
-<br><b>EventNumberMismatch TriggerCodeMismatch</b> errors are usually a problem in the hubs - if a DAQ restart doesn't help, try a reboot of the corresponding hubs (in RICH: combiners, or hubs).
+<br><b>EventNumberMismatch TriggerCodeMismatch</b> errors are usually a problem in the hubs - if a DAQ restart doesn't help, try a reboot of the corresponding system, then of its hubs (in RICH: combiners, or hubs).
<br><b>TimingTriggerError</b> A board has problems receiving the reference time for the event. Check the "Trigger" box for more details.
<br>If the reason is unclear, try to do a DAQ restart
<br>In some cases a reload or power-cycle of the corresponding system / chamber is necessary.
<h3>MDC Endpoints</h3>
This button shows if all MDC front-end modules are active. The button is red if too many modules are
-missing.<br>
+missing or two boards in the same chamber are missing or few boards are missing for a long time.<br>
<h4>Error Handling</h4>
-<ul><li>First thing to try: "Resync OEP" (not if >4 boards are missing).
-<li>If this doesn't help, do a DAQ restart.
-<li>If a board shows an error directly after DAQ restart several times, do a power-cycle of the corresponding sector
+<ul>
+<li>Do a DAQ restart.
+<li>If the same board shows an error after DAQ restart several times, do a power-cycle of the corresponding sector
<li>If this doesn't help, use "Reboot MdcHub" plus 2 DAQ restarts.
+<li>If the missing boards include a hub (0x1___) and a restart doesn't help, a power cycle of MDC Hubs might be needed.
<li>If 14/16 boards show an error after a power-cycle, click "MDC LV Turn On ALL Relais". You can
check the status of relais <a href="/mon/monitor.cgi?1-window-MDCLV">here</a>.
</ul>
<li>Do another DAQ restart
<li>If this doesn't help, use "Reboot DiRich", "Reboot Rich Combiner" and a DAQ restart
<li>If many boards are missing (>100), check RICH power supplies
-<li>If a hub board (with 8xxx address) is missing as well and a DAQ restart does not help, consider a RICH power cycle
+<li>If a hub board (with 82xx address) is missing as well and a DAQ restart does not help, do a RICH power cycle
</ul>
+<h3>iTOF HV</h3>
+Monitoring for the HV of iTOF SiPMs.
+<br>Orange if current is too high, inform iTOF operator.
+<br>Red if voltage is not correct, inform iTOF operator and check if all trigger rates are fine.
The full message contains the addresses of affected boards - consider rebooting the
coresponding subsystem at your convenience. Doing so before an actual failure of
the board is always simpler and quicker.
+
+<br>If many RICH Combiner boards show up, do a reboot RICH and reboot RICH combiners before the next DAQ restart.
<h4>Error Handling</h4>
<ul>
<li>Restart DAQ to make sure all settings are loaded correctly
+<li>Run BLR Reinit FPGA to reload the analog trigger collection board
</ul>
Hmon::WriteFile("BeamAbortFlags",$str);
#Reset error flag
-system("ssh hadeswrp02 /home/hadaq/bin/reset_beamabort_error.sh");
+#system("ssh hadeswrp02 /home/hadaq/bin/reset_beamabort_error.sh");
trb_init_ports() or die trb_strerror();
HPlot::PlotAdd("BeamAbortFlags",$ba_global->{0x130}?24:-1,24);
HPlot::PlotAdd("BeamAbortFlags",$ba_global->{0x130}?-1:25,25);
- Hmon::Speak('beamabort',"High radiation levels. Beam abort.") if($ba_global->{0x130});
HPlot::PlotDrawFork("BeamAbortFlags") if $iter == 10;
HPlot::PlotJsonDump("BeamAbortFlags",Hmon::HMONDIR."/files/BeamAbortFlags.json") if $iter == 9;
output => HPlot::OUT_PNG,
zlabel => "Hitrate",
sizex => 450,
- sizey => 360,
+ sizey => 320,
nokey => 1,
buffer => 1,
xmin => -0.5,
additional => "set xtics ('TOF' 0, 'RPC' 1, 'Meta' 2, 'iTOF' 3, 'Coin' 4);set x2tics ('TOF' 0, 'RPC' 1, 'Meta' 2, 'iTOF' 3, 'Coin' 4);",
});
-my $str = Hmon::MakeTitle(6, 8, "Trigger Rates per Sector");
+my $str = Hmon::MakeTitle(6, 7, "Trigger Rates per Sector");
$str .= qq@<img src="%ADDPNG files/TriggerRatesPerSector.png%" type="image/png"><br>\n@;
$str .= Hmon::MakeFooter();
Hmon::WriteFile("TriggerRatesPerSector",$str);
use List::MoreUtils qw(uniq);
use List::Util qw(min max);
use HADES::TrbNet;
+use Storable qw(store lock_retrieve);
+
+my $store;
+my $storefile = '/dev/shm/hmon_endpoints.store';
+ if (-e $storefile) {
+ $store = lock_retrieve($storefile);
+ }
+
+
trb_init_ports() or die trb_strerror();
my $flog = QA::OpenQAFile();
my $waittime = 15;
-my $mdcmissingtime = 0;
+my $mdcmissingtime = $store->{mdc}{missingtime};
my $loggerperiod = 12; #times 5 seconds sleep
my $timecnt;
+
my $fh;
open ($fh, ">", "/tmp/mdc_number_missing_boards");
if (!$fh) {
###strip the register value
for (my $k = 0; $k < scalar @result; $k += 2) {
- push @all_boards, $result[$k];
- }
+ push @all_boards, $result[$k];
+ }
###MDC
########################
foreach my $element (@mdc_boards) { $mdc_mask{$element} |= 2 }
foreach my $element (@QA::mdc_boards_removed) { $mdc_mask{$element} |= 4 }
foreach my $element (keys %mdc_mask) {
- push @{$mdc_results[0]}, sprintf("0x%x",$element);
- push @{$mdc_results[$mdc_mask{$element}]}, sprintf("0x%x",$element);
+ push @{$mdc_results[0]}, sprintf("0x%x",$element);
+ push @{$mdc_results[$mdc_mask{$element}]}, sprintf("0x%x",$element);
}
my $num_mdc_missing = (scalar @{$mdc_results[2]});
my $num_mdc_mistake = (scalar @{$mdc_results[4]});
my @sorted_mdc_results = sort @{$mdc_results[2]};
- $mdcmissingtime = 0 if $num_mdc_missing == 0;
+ $mdcmissingtime = 0 if $num_mdc_missing <= 2;
$mdcmissingtime += max(0,$num_mdc_missing-2);
#Are two boards from the same chamber missing?
Hmon::Speak('mdcmiss',"$num_mdc_missing MDC Frontends missing") if($qastate >= QA::ERROR );
QA::WriteQALog($flog,"endp","mdc",$waittime,$qastate,$title,$value,$longtext);
if($qastate > 60) {
+ $longtext =~ s/\<br\>//g;
system("logger -p local1.info -t DAQ Endp \\<E\\> $longtext") unless (($timecnt->{mdc}++)%$loggerperiod);
}
else {$timecnt->{mdc} = 0;}
+
+ $store->{mdc}{missing} = \@sorted_mdc_results;
+ $store->{mdc}{missingnumber} = $num_mdc_missing;
+ $store->{mdc}{missingtime} = $mdcmissingtime;
+ store($store,$storefile);
+
###RICH
########################
my $rich_title = "RICH";
- my $rich_value = "OK ".(scalar @rich_boards);
+ my $rich_value = "OK ".(scalar @rich_boards - scalar @QA::rich_boards_removed);
+ $rich_value .= "(-".(scalar @QA::rich_boards_removed).")" if scalar @QA::rich_boards_removed;
if ($num_rich_missing > 0) {$rich_value = "$num_rich_missing / ".(scalar @rich_boards)." miss";}
if ($num_rich_mistake > 0) {$rich_value = "Check Script";}
- my $rich_longtext = (scalar @rich_boards). " boards. ";
+ my $rich_longtext = (scalar @rich_boards). " boards. ".(scalar @QA::rich_boards_removed)." removed<br>";
if ($num_rich_missing > 0) {$rich_longtext = "Endp @sorted_rich_results missing"};
if ($num_rich_mistake > 0) {$rich_longtext .= " Endp @{$rich_results[4]} not known";}
$plot2->{output} = HPlot::OUT_PNG;
$plot2->{zlabel} = "Hitrate";
$plot2->{sizex} = 450;
-$plot2->{sizey} = 360;
+$plot2->{sizey} = 330;
$plot2->{nokey} = 1;
$plot2->{buffer} = 1;
$plot2->{xmin} = -0.5;
$str .= Hmon::MakeFooter();
Hmon::WriteFile("ItofRate",$str);
-$str = Hmon::MakeTitle(6, 8, "iTOF Hit Rate");
+$str = Hmon::MakeTitle(6, 7, "iTOF Hit Rate");
$str .= qq@<img src="%ADDPNG files/ItofNumbers.png%" type="image/png"><br>\n@;
$str .= Hmon::MakeFooter();
Hmon::WriteFile("ItofRateNumbers",$str);
my $value = "";
my $qastate = QA::OK;
- my $o = trb_register_read(0xffff,0xd501);
+ my $o = trb_register_read_mem(0xffff,0xd501,0,2);
+
foreach my $b (keys %$o) {
- next if $o->{$b} == 0x00000008;
- next if $o->{$b} == 0x00000000;
+ next if ($b & 0xf000) == 0x2000;
+ next if ($b & 0xf000) == 0x1000;
+ next if ($b ) < 0x10;
+ next unless defined $o->{$b}[0];
+ next if $o->{$b}[0] == 0x00000008;
+ next if $o->{$b}[0] == 0x00000000;
$totalboards++;
- next unless $o->{$b} & 0xFF000000;
+ next unless ((($o->{$b}[0]//0) & 0xFF000000) || (($o->{$b}[1]//0) & 0xFF));
$seuboards++;
push(@boards,$b);
}
$longtext = "$seuboards out of $totalboards monitored report some radiation issues<br>";
$longtext .= sprintf("%04x (%s)<br>",$_,Hmon::getsystem($_)) for sort @boards;
- if($seuboards >= 8) {
+ if($seuboards >= 12) {
+ $qastate = QA::WARN;
+ }
+ if($seuboards >= 16) {
$longtext .= "<br>Quite many boards seem to be affected by radiation. Better do some reboots soon.";
$qastate = QA::WARN_2;
}
$value = "$seuboards/$totalboards";
+# print $value."\n";
+# print $longtext."\n";
QA::WriteQALog($fqa,"misc","seu",30,$qastate,'SEU',$value,$longtext);
sleep 10;
}
buffer => 1,
stacked => 1,
curvewidth => .9,
+ key => 0,
additional => "
set obj 1 rect from -1, 7E7 to 200, 10E7 fc rgb '#ffffbb' behind \n
set obj 2 rect from -1, 10E7 to 200, 100E7 fc rgb '#ffdddd' behind
HPlot::PlotInit($plot7a);
+my $plot7b = {
+ name => "StartRateX_histbar_short",
+ file => "files/StartRateX_histbar_short",
+ entries => 400,
+ type => HPlot::TYPE_BARGRAPH,
+ output => HPlot::OUT_PNG,
+ titles => ["0","1","2","3","4","5","6","7","8","9","10","11"],
+ xlabel => "Time / 100 ms",
+ ylabel => "Hitrate [Hz]",
+ sizex => 950,
+ sizey => 330,
+ xmin => 0,
+ xmax => 400,
+ ymin => "0",
+ ymax => "100<*",
+ curves => 12,
+ xscale => 10, # xscale does not work with TYPE_BARGRAPH
+ buffer => 1,
+ stacked => 1,
+ curvewidth => .9,
+ key => 0,
+ additional => "
+ set obj 1 rect from -1, 7E7 to 200, 10E7 fc rgb '#ffffbb' behind \n
+ set obj 2 rect from -1, 10E7 to 200, 100E7 fc rgb '#ffdddd' behind
+ "
+ };
+HPlot::PlotInit($plot7b);
+
# my $plot8 = {
# name => "StartRateY_1histbar_VW",
# file => "files/StartRateY_1histbar_VW",
$str .= Hmon::MakeFooter();
Hmon::WriteFile("StartRateY_histbar_short",$str);
+$str = Hmon::MakeTitle(12, 7, "Start Summed Rates X",0);
+$str .= qq@<img src="%ADDPNG files/StartRateX_histbar_short.png%" type="image/png"><br>\n@;
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("StartRateX_histbar_short",$str);
+
+
# Spill for START
# $str = Hmon::MakeTitle(13, 32, "Start X Spill Summary",0);
# $str .= qq@<h3>Start X Spill</h3><img src="%ADDPNG files/StartRateX_histbar.png%" type="image/png"><br>\n@;
for my $i (0..11){
HPlot::PlotAdd("StartRateX_histbar",$summedRatesFor4Channels_X0[$i],$i);
HPlot::PlotAdd("StartRateY_histbar",$summedRatesFor4Channels_Y0[$i],$i);
+ HPlot::PlotAdd("StartRateX_histbar_short",$summedRatesFor4Channels_X0[$i],$i);
HPlot::PlotAdd("StartRateY_histbar_short",$summedRatesFor4Channels_Y0[$i],$i);
}
HPlot::PlotDrawFork('StartDutyFactorY_0');
HPlot::PlotJsonDump("StartRateY_histbar_short",Hmon::HMONDIR."/files/StartRateY_histbar_short.json");
+ HPlot::PlotJsonDump("StartRateX_histbar_short",Hmon::HMONDIR."/files/StartRateX_histbar_short.json");
}
if($inspill) {
# HPlot::PlotDrawFork('StartRateX_1histbar_VW') if ($iter == 5);
HPlot::PlotDrawFork('StartRateY_histbar') if ($iter == 6);
HPlot::PlotDrawFork('StartRateY_histbar_short') if ($iter == 7);
+ HPlot::PlotDrawFork('StartRateX_histbar_short') if ($iter == 8);
# HPlot::PlotDrawFork('StartRateY_1histbar_VW') if ($iter == 7);
$iter = 1 if ($iter++ == 10) #dont change
$qastatratio = QA::WARN;
}
- $ratiolongmsg = sprintf("counts per second %s/s - counts per spill %s",QA::SciNotation($start),QA::SciNotation($lastspillsumstart));
+ $ratiolongmsg = sprintf("counts per second %s/s - counts per spill %s",QA::SciNotation($startdirect),QA::SciNotation($lastspillsumstart));
QA::WriteQALog($fqa, "trg", "pt1rate", 10, $qastatratio, "Trg Ratios", $ratiomsg, $ratiolongmsg);
}
-
+# printf ("%8i\t%8i\n",$start,$startdirect);
+
}
$oldtb = $tb;
--- /dev/null
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+use Data::Dumper;
+use Data::TreeDumper;
+use Hmon;
+use QA;
+use HADES::TrbNet;
+use HPlot;
+use Time::HiRes qw(usleep time);
+use List::Util qw[min max sum];
+
+my $oldst;
+my $diff;
+my $iter = 0;
+my $tdiff; my $vdiff;
+
+HPlot::PlotInit({
+ name => "StartFalls",
+ file => "files/StartFalls",
+ entries => 200,
+ curves => 97,
+ type => HPlot::TYPE_HEATMAP,
+ output => HPlot::OUT_PNG,
+ xlabel => "Time [100ms]",
+ ylabel => "Start Channel",
+ cblabel => "Share of each stripe of total rate",
+ sizex => 900,
+ sizey => 480,
+ nokey => 1,
+ buffer => 1,
+ xmin => -0.5,
+ xmax => 199.5,
+ ymin => 96.5,
+ ymax => -0.5,
+ cbmin => "0",
+# cbmax => "1000<*",
+# additional => "set logscale cb",
+});
+
+
+my $str = Hmon::MakeTitle(12, 10, "Start Falls");
+ $str .= qq@<img src="%ADDPNG files/StartFalls.png%" type="image/png"><br>\n@;
+ $str .= Hmon::MakeFooter();
+ Hmon::WriteFile("StartFalls",$str);
+
+
+trb_init_ports() or die trb_strerror();
+
+my $channels_x_1 = [
+ { pch => 2, tdc => 6, ch => int(1 /2)}, # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
+ { pch => 1, tdc => 6, ch => int(3 /2)}, # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
+ { pch => 4, tdc => 6, ch => int(5 /2)},
+ { pch => 3, tdc => 6, ch => int(7 /2)},
+ { pch => 6, tdc => 6, ch => int(9 /2)},
+ { pch => 5, tdc => 6, ch => int(11/2)},
+ { pch => 8, tdc => 6, ch => int(13/2)},
+ { pch => 7, tdc => 6, ch => int(15/2)},
+ { pch => 10, tdc => 6, ch => int(17/2)},
+ { pch => 9, tdc => 6, ch => int(19/2)},
+ { pch => 12, tdc => 6, ch => int(21/2)},
+ { pch => 11, tdc => 6, ch => int(23/2)},
+ { pch => 14, tdc => 6, ch => int(25/2)},
+ { pch => 13, tdc => 6, ch => int(27/2)},
+ { pch => 16, tdc => 6, ch => int(29/2)},
+ { pch => 15, tdc => 6, ch => int(31/2)},
+ { pch => 18, tdc => 6, ch => int(33/2)},
+ { pch => 17, tdc => 6, ch => int(35/2)},
+ { pch => 20, tdc => 6, ch => int(37/2)},
+ { pch => 19, tdc => 6, ch => int(39/2)},
+ { pch => 22, tdc => 6, ch => int(41/2)},
+ { pch => 21, tdc => 6, ch => int(43/2)},
+ { pch => 24, tdc => 6, ch => int(45/2)},
+ { pch => 23, tdc => 6, ch => int(47/2)},
+ { pch => 34, tdc => 7, ch => int(1 /2)},
+ { pch => 33, tdc => 7, ch => int(3 /2)},
+ { pch => 36, tdc => 7, ch => int(5 /2)},
+ { pch => 35, tdc => 7, ch => int(7 /2)},
+ { pch => 38, tdc => 7, ch => int(9 /2)},
+ { pch => 37, tdc => 7, ch => int(11/2)},
+ { pch => 40, tdc => 7, ch => int(13/2)},
+ { pch => 39, tdc => 7, ch => int(15/2)},
+ { pch => 42, tdc => 7, ch => int(17/2)},
+ { pch => 41, tdc => 7, ch => int(19/2)},
+ { pch => 44, tdc => 7, ch => int(21/2)},
+ { pch => 43, tdc => 7, ch => int(23/2)},
+ { pch => 46, tdc => 7, ch => int(25/2)},
+ { pch => 45, tdc => 7, ch => int(27/2)},
+ { pch => 48, tdc => 7, ch => int(29/2)},
+ { pch => 47, tdc => 7, ch => int(31/2)},
+ { pch => 26, tdc => 7, ch => int(33/2)},
+ { pch => 25, tdc => 7, ch => int(35/2)},
+ { pch => 28, tdc => 7, ch => int(37/2)},
+ { pch => 27, tdc => 7, ch => int(39/2)},
+ { pch => 30, tdc => 7, ch => int(41/2)},
+ { pch => 29, tdc => 7, ch => int(43/2)},
+ { pch => 32, tdc => 7, ch => int(45/2)},
+ { pch => 31, tdc => 7, ch => int(47/2)}
+ ];
+
+my $channels_x_0 = [
+ { pch => 15 , tdc => 4, ch => int(1 /2)}, # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
+ { pch => 16 , tdc => 4, ch => int(3 /2)}, # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
+ { pch => 13 , tdc => 4, ch => int(5 /2)},
+ { pch => 14 , tdc => 4, ch => int(7 /2)},
+ { pch => 11 , tdc => 4, ch => int(9 /2)},
+ { pch => 12 , tdc => 4, ch => int(11/2)},
+ { pch => 9 , tdc => 4, ch => int(13/2)},
+ { pch => 10 , tdc => 4, ch => int(15/2)},
+ { pch => 7 , tdc => 4, ch => int(17/2)},
+ { pch => 8 , tdc => 4, ch => int(19/2)},
+ { pch => 5 , tdc => 4, ch => int(21/2)},
+ { pch => 6 , tdc => 4, ch => int(23/2)},
+ { pch => 3 , tdc => 4, ch => int(25/2)},
+ { pch => 4 , tdc => 4, ch => int(27/2)},
+ { pch => 1 , tdc => 4, ch => int(29/2)},
+ { pch => 2 , tdc => 4, ch => int(31/2)},
+ { pch => 31 , tdc => 4, ch => int(33/2)},
+ { pch => 32 , tdc => 4, ch => int(35/2)},
+ { pch => 29 , tdc => 4, ch => int(37/2)},
+ { pch => 30 , tdc => 4, ch => int(39/2)},
+ { pch => 27 , tdc => 4, ch => int(41/2)},
+ { pch => 28 , tdc => 4, ch => int(43/2)},
+ { pch => 25 , tdc => 4, ch => int(45/2)},
+ { pch => 26 , tdc => 4, ch => int(47/2)},
+ { pch => 47 , tdc => 5, ch => int(1 /2)},
+ { pch => 48 , tdc => 5, ch => int(3 /2)},
+ { pch => 45 , tdc => 5, ch => int(5 /2)},
+ { pch => 46 , tdc => 5, ch => int(7 /2)},
+ { pch => 43 , tdc => 5, ch => int(9 /2)},
+ { pch => 44 , tdc => 5, ch => int(11/2)},
+ { pch => 41 , tdc => 5, ch => int(13/2)},
+ { pch => 42 , tdc => 5, ch => int(15/2)},
+ { pch => 39 , tdc => 5, ch => int(17/2)},
+ { pch => 40 , tdc => 5, ch => int(19/2)},
+ { pch => 37 , tdc => 5, ch => int(21/2)},
+ { pch => 38 , tdc => 5, ch => int(23/2)},
+ { pch => 35 , tdc => 5, ch => int(25/2)},
+ { pch => 36 , tdc => 5, ch => int(27/2)},
+ { pch => 33 , tdc => 5, ch => int(29/2)},
+ { pch => 34 , tdc => 5, ch => int(31/2)},
+ { pch => 23 , tdc => 5, ch => int(33/2)},
+ { pch => 24 , tdc => 5, ch => int(35/2)},
+ { pch => 21 , tdc => 5, ch => int(37/2)},
+ { pch => 22 , tdc => 5, ch => int(39/2)},
+ { pch => 19 , tdc => 5, ch => int(41/2)},
+ { pch => 20 , tdc => 5, ch => int(43/2)},
+ { pch => 17 , tdc => 5, ch => int(45/2)},
+ { pch => 18 , tdc => 5, ch => int(47/2)}
+ ];
+my $channels_y_1 = [
+ { pch => 2, tdc => 2, ch => int(1 /2)}, # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
+ { pch => 1, tdc => 2, ch => int(3 /2)}, # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
+ { pch => 4, tdc => 2, ch => int(5 /2)},
+ { pch => 3, tdc => 2, ch => int(7 /2)},
+ { pch => 6, tdc => 2, ch => int(9 /2)},
+ { pch => 5, tdc => 2, ch => int(11/2)},
+ { pch => 8, tdc => 2, ch => int(13/2)},
+ { pch => 7, tdc => 2, ch => int(15/2)},
+ { pch => 10, tdc => 2, ch => int(17/2)},
+ { pch => 9, tdc => 2, ch => int(19/2)},
+ { pch => 12, tdc => 2, ch => int(21/2)},
+ { pch => 11, tdc => 2, ch => int(23/2)},
+ { pch => 14, tdc => 2, ch => int(25/2)},
+ { pch => 13, tdc => 2, ch => int(27/2)},
+ { pch => 16, tdc => 2, ch => int(29/2)},
+ { pch => 15, tdc => 2, ch => int(31/2)},
+ { pch => 18, tdc => 2, ch => int(33/2)},
+ { pch => 17, tdc => 2, ch => int(35/2)},
+ { pch => 20, tdc => 2, ch => int(37/2)},
+ { pch => 19, tdc => 2, ch => int(39/2)},
+ { pch => 22, tdc => 2, ch => int(41/2)},
+ { pch => 21, tdc => 2, ch => int(43/2)},
+ { pch => 24, tdc => 2, ch => int(45/2)},
+ { pch => 23, tdc => 2, ch => int(47/2)},
+ { pch => 34, tdc => 3, ch => int(1 /2)},
+ { pch => 33, tdc => 3, ch => int(3 /2)},
+ { pch => 36, tdc => 3, ch => int(5 /2)},
+ { pch => 35, tdc => 3, ch => int(7 /2)},
+ { pch => 38, tdc => 3, ch => int(9 /2)},
+ { pch => 37, tdc => 3, ch => int(11/2)},
+ { pch => 40, tdc => 3, ch => int(13/2)},
+ { pch => 39, tdc => 3, ch => int(15/2)},
+ { pch => 42, tdc => 3, ch => int(17/2)},
+ { pch => 41, tdc => 3, ch => int(19/2)},
+ { pch => 44, tdc => 3, ch => int(21/2)},
+ { pch => 43, tdc => 3, ch => int(23/2)},
+ { pch => 46, tdc => 3, ch => int(25/2)},
+ { pch => 45, tdc => 3, ch => int(27/2)},
+ { pch => 48, tdc => 3, ch => int(29/2)},
+ { pch => 47, tdc => 3, ch => int(31/2)},
+ { pch => 26, tdc => 3, ch => int(33/2)},
+ { pch => 25, tdc => 3, ch => int(35/2)},
+ { pch => 28, tdc => 3, ch => int(37/2)},
+ { pch => 27, tdc => 3, ch => int(39/2)},
+ { pch => 30, tdc => 3, ch => int(41/2)},
+ { pch => 29, tdc => 3, ch => int(43/2)},
+ { pch => 32, tdc => 3, ch => int(45/2)},
+ { pch => 31, tdc => 3, ch => int(47/2)}
+ ];
+
+
+my $channels_y_0 = [
+ { pch => 15 , tdc => 0 , ch => int(1 /2)}, # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
+ { pch => 16 , tdc => 0 , ch => int(3 /2)}, # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
+ { pch => 13 , tdc => 0 , ch => int(5 /2)},
+ { pch => 14 , tdc => 0 , ch => int(7 /2)},
+ { pch => 11 , tdc => 0 , ch => int(9 /2)},
+ { pch => 12 , tdc => 0 , ch => int(11/2)},
+ { pch => 9 , tdc => 0 , ch => int(13/2)},
+ { pch => 10 , tdc => 0 , ch => int(15/2)},
+ { pch => 7 , tdc => 0 , ch => int(17/2)},
+ { pch => 8 , tdc => 0 , ch => int(19/2)},
+ { pch => 5 , tdc => 0 , ch => int(21/2)},
+ { pch => 6 , tdc => 0 , ch => int(23/2)},
+ { pch => 3 , tdc => 0 , ch => int(25/2)},
+ { pch => 4 , tdc => 0 , ch => int(27/2)},
+ { pch => 1 , tdc => 0 , ch => int(29/2)},
+ { pch => 2 , tdc => 0 , ch => int(31/2)},
+ { pch => 31 , tdc => 0 , ch => int(33/2)},
+ { pch => 32 , tdc => 0 , ch => int(35/2)},
+ { pch => 29 , tdc => 0 , ch => int(37/2)},
+ { pch => 30 , tdc => 0 , ch => int(39/2)},
+ { pch => 27 , tdc => 0 , ch => int(41/2)},
+ { pch => 28 , tdc => 0 , ch => int(43/2)},
+ { pch => 25 , tdc => 0 , ch => int(45/2)},
+ { pch => 26 , tdc => 0 , ch => int(47/2)},
+ { pch => 47 , tdc => 1 , ch => int(1 /2)},
+ { pch => 48 , tdc => 1 , ch => int(3 /2)},
+ { pch => 45 , tdc => 1 , ch => int(5 /2)},
+ { pch => 46 , tdc => 1 , ch => int(7 /2)},
+ { pch => 43 , tdc => 1 , ch => int(9 /2)},
+ { pch => 44 , tdc => 1 , ch => int(11/2)},
+ { pch => 41 , tdc => 1 , ch => int(13/2)},
+ { pch => 42 , tdc => 1 , ch => int(15/2)},
+ { pch => 39 , tdc => 1 , ch => int(17/2)},
+ { pch => 40 , tdc => 1 , ch => int(19/2)},
+ { pch => 37 , tdc => 1 , ch => int(21/2)},
+ { pch => 38 , tdc => 1 , ch => int(23/2)},
+ { pch => 35 , tdc => 1 , ch => int(25/2)},
+ { pch => 36 , tdc => 1 , ch => int(27/2)},
+ { pch => 33 , tdc => 1 , ch => int(29/2)},
+ { pch => 34 , tdc => 1 , ch => int(31/2)},
+ { pch => 23 , tdc => 1 , ch => int(33/2)},
+ { pch => 24 , tdc => 1 , ch => int(35/2)},
+ { pch => 21 , tdc => 1 , ch => int(37/2)},
+ { pch => 22 , tdc => 1 , ch => int(39/2)},
+ { pch => 19 , tdc => 1 , ch => int(41/2)},
+ { pch => 20 , tdc => 1 , ch => int(43/2)},
+ { pch => 17 , tdc => 1 , ch => int(45/2)},
+ { pch => 18 , tdc => 1 , ch => int(47/2)}
+ ];
+
+
+
+while (1) {
+ my $st = trb_registertime_read_mem(0xfe76,0xdfc0,0,24);
+
+
+
+ if (defined $oldst) {
+
+ foreach my $b (keys %$st) {
+ next if ($b < 0x5000 || $b > 0x5008);
+ my $s = ($b & 0xF)*24;
+ my $tdiff = $st->{$b}{time}[0] - ($oldst->{$b}{time}[0]||0);
+ $tdiff += 2**16 if ($tdiff <= 0);
+ $tdiff = ($tdiff * 16 / 1E6) || 1;
+ for my $v (0..23) {
+ $vdiff = (($st->{$b}{value}[$v]||0)&0xffffff) - (($oldst->{$b}{value}[$v]||0)&0xffffff);
+ $vdiff += 2**24 if ($vdiff < 0);
+ $diff->{$b}->[$v] = $vdiff/$tdiff;
+# print (($s+$v)."\t".$diff->{$b}->[$v]."\n");
+
+
+ }
+ }
+ my $startdirectx = sum(@{$diff->{0x5004}},@{$diff->{0x5005}},@{$diff->{0x5006}},@{$diff->{0x5007}});
+ my $startdirecty = sum(@{$diff->{0x5000}},@{$diff->{0x5001}},@{$diff->{0x5002}},@{$diff->{0x5003}});
+ my @y; my @x;
+ for my $e (0..47) {
+
+ my $b = 0x5000 + $channels_y_0->[$e]->{tdc};
+ my $v = $channels_y_0->[$e]->{ch};
+ $y[$channels_y_0->[$e]->{pch}] += $diff->{$b}->[$v];
+
+ $b = 0x5000 + $channels_y_1->[$e]->{tdc};
+ $v = $channels_y_1->[$e]->{ch};
+ $y[$channels_y_1->[$e]->{pch}] += $diff->{$b}->[$v];
+
+ $b = 0x5000 + $channels_x_0->[$e]->{tdc};
+ $v = $channels_x_0->[$e]->{ch};
+ $x[$channels_x_0->[$e]->{pch}] += $diff->{$b}->[$v];
+
+ $b = 0x5000 + $channels_x_1->[$e]->{tdc};
+ $v = $channels_x_1->[$e]->{ch};
+ $x[$channels_x_1->[$e]->{pch}] += $diff->{$b}->[$v];
+
+# HPlot::PlotAdd("StartFalls",$diff->{$b}->[$v]+$diff->{$b}->[$v]/$startdirect,$channels_y_0->[$e]->{pch});
+# # $b = 0x5000 + $channels_y_1->[$e]->{tdc};
+# # $v = $channels_y_1->[$e]->{ch};
+# # HPlot::PlotAdd("StartFalls",$diff->{$b}->[$v]/$startdirect,$channels_y_1->[$e]->{pch}+48);
+# $b = 0x5000 + $channels_x_0->[$e]->{tdc};
+# $v = $channels_x_0->[$e]->{ch};
+# HPlot::PlotAdd("StartFalls",$diff->{$b}->[$v]/$startdirect,$channels_x_0->[$e]->{pch}+96);
+# # $b = 0x5000 + $channels_x_1->[$e]->{tdc};
+# # $v = $channels_x_1->[$e]->{ch};
+# # HPlot::PlotAdd("StartFalls",$diff->{$b}->[$v]/$startdirect,$channels_x_1->[$e]->{pch}+144);
+ }
+ for my $e (0..47) {
+# print $e."\n";
+ HPlot::PlotAdd("StartFalls",$y[$e+1]/$startdirecty,$e);
+ HPlot::PlotAdd("StartFalls",$x[$e+1]/$startdirectx,$e+49);
+ HPlot::PlotAdd("StartFalls","NaN",48);
+ }
+ }
+ $oldst = $st;
+
+ HPlot::PlotDrawFork("StartFalls") if $iter == 100;
+
+ $iter = 0 if $iter++ == 100;
+
+ usleep(100000);
+ }
<li><a href="../daqtools/index.pl" target="_blank">Web Tools (daqtools)</a></li>
<li><a href="../eb/?browser=fix" target="_blank">Eventbuilder Monitor</a></li>
<li><a href="../rawmon/" target="_blank">Raw Data Monitor</a></li>
-<li><a href="http://web-docs.gsi.de/~webhades/media/logbook/feb22/hades-online.html" target="_blank">Accumulated Run Statistics</a>
+<li><a href="https://web-docs.gsi.de/~webhades/onlineMon/feb22/hades-online.html" target="_blank">Accumulated Run Statistics</a>
</ul></div>
<div class="linkbox" style="float:right"><h4>Documents</h4><ul>
<li style="width:600px;"><a href="monitor.cgi?1-window-QA">Main Screen 0</a> Tactical Overview
<li style="width:600px;"><a href="monitor.cgi?1-window9x21-busyhist-eventratelong-eventrateshort-StartBars">Main Screen 1</a> Eventrate & Busy
<li style="width:600px;"><a href="monitor.cgi?1-window8x26-busy-DutyFactor-Pt3AcceptRatio-EvtsPerSpill-StartCountSpill">Main Screen 2</a> Spill Info
-<li style="width:600px;"><a href="monitor.cgi?1-window14x14-EBSummary-hldlast-CTSRates">Main Screen 3</a> EBs</li>
-<li style="width:600px;"><a href="monitor.cgi?2-window18x16-EcalSimpleRate-RpcRate-StsRate-TofRate-ItofRate-StartRateSimple-FrpcRate">Main Screen 4</a> Tof Rpc STS Ecal iTOF fRPC Start rates</li>
-<li style="width:600px;"><a href="monitor.cgi?2-window13x18-HodoRate-ItofRateNumbers-StartRateNumbers-TriggerRatesPerSector">Main Screen 5</a> Positional map for Start Veto iTOF</li>
+<li style="width:600px;"><a href="monitor.cgi?1-window14x8-EBSummary-hldlast">Main Screen 3</a> EBs</li>
+<li style="width:600px;"><a href="monitor.cgi?2-window19x16-EcalSimpleRate-RpcRate-StsRate-TofRate-ItofRate-StartRateSimple-FrpcRate">Main Screen 4</a> Tof Rpc STS Ecal iTOF fRPC Start rates</li>
+<li style="width:600px;"><a href="monitor.cgi?2-window13x23-StartFalls-ItofRateNumbers-TriggerRatesPerSector-CTSRates">Main Screen 5</a> Positional map for Start and iTOF, Trigger Rates</li>
+<li style="width:600px;"><a href="monitor.cgi?2-window12x21-RpcTofSectorRate_highres-StartRateX_histbar-StartRateY_histbar">Main Screen 6</a> Beam Intensities</li>
</ul></div>
<div class="linkbox" style="clear:both;width:730px;"><h4>Other Ressources</h4><ul>
<!--<li class="outdated"><a href="../spillmon/?browser=no&monitoring=1000&layout=grid4x4&items=[%22EventBuilder/Run/HLD/HLD_HitsFast%22,%22EventBuilder/Run/HLD/HLD_HitsSlow%22,%22EventBuilder/Run/HLD/HLD_TrendX%22,%22EventBuilder/Run/HLD/HLD_TrendY%22,%22EventBuilder/Run/HLD/HLD_BeamX%22,%22EventBuilder/Run/HLD/HLD_BeamY%22,%22EventBuilder/Run/HLD/HLD_VETO_Patt%22,%22EventBuilder/Run/HLD/HLD_QSlow%22,%22EventBuilder/Run/HLD/HLD_HALO_Patt%22,%22EventBuilder/Run/HLD/HLD_XHALOSlow%22,%22EventBuilder/Run/HLD/HLD_YHALOSlow%22,%22EventBuilder/Run/HLD/HLD_LastSpill_Q_factor%22]">Beam Properties</a></li>-->
<li class="outdated"><a href="http://lxhadeb06/icinga">Icinga Server Monitoring (local access only)</a>
<li><a href="/calib">Calibration Monitor</a>
-<li><a href="../munin">Munin Server Monitoring</a></li>
+<li><a href="/munin">Munin Server Monitoring</a></li>
<li style="width:600px;"><a href="archive/?C=M;O=D">Archive of Hmon Windows (updated every 10 minutes)</a></li>
</ul></div>
my $str = <$MYF>;
close($MYF);
$str =~ /width(\d+)\sheight(\d+)/;
- $width = 80*$1-4;
+ $width = 80*$1+4;
$height = 50*$2;
}
use POSIX qw/floor ceil/;
use Hmon;
use QA;
+use Perl2Epics;
my $fqa = QA::OpenQAFile();
my @res;
+my @oldres= ("R22222222 #20", "R22222222 #21", "R22222222 #30", "R22222222 #22");
my $cmd = 'ssh hadaq@hadeswrp02 "~/bin/readreg.sh"';
my $longtext;
my $value = "";
my $qastate;
my $laststate = QA::ERROR;
+my $iterator = 0;
+Perl2Epics::Connect("fpga", "HAD:BEAM:beamAbort:status:FPGA");
+Perl2Epics::Connect("soft", "HAD:BEAM:beamAbort:status:soft");
+Perl2Epics::Connect("hard", "HAD:BEAM:beamAbort:status:hard");
+Perl2Epics::Connect("latch", "HAD:BEAM:beamAbort:status:latch");
+Perl2Epics::Connect("iterator", "HAD:BEAM:beamAbort:status:filler");
while (1) {
@res = qx($cmd);
# print Dumper @res;
- if(!defined $res[0] || !defined $res[1] || !defined $res[2]) {
+ if(!defined $res[0] || !defined $res[2] || !defined $res[3]) {
$qastate = QA::WARN_2;
$value = "read failed";
$longtext = "reading status from adapter board failed";
- }
+ }
else {
- $qastate = QA::OK;
- $longtext = "";
- $value = "";
- $longtext .= "Inputs: <br>";
- $longtext .= "FPGA: ";
- $longtext .= "active" if (substr($res[0],5,2) eq "01" || substr($res[0],5,2) eq "10");
- $longtext .= "inactive" if (substr($res[0],5,2) eq "11");
- $longtext .= "ABORT" if (substr($res[0],5,2) eq "00");
-
- $longtext .= "<br>";
- $longtext .= "Soft Override: ";
- $longtext .= "none" if (substr($res[2],7,2) eq "00");
- $longtext .= "inactive" if (substr($res[2],7,2) eq "10");
- $longtext .= "ABORT" if (substr($res[2],8,1) eq "1");
-
- $longtext .= "<br>";
- $longtext .= "Hard Override: ";
- $longtext .= "none" if (substr($res[0],7,2) eq "00");
- $longtext .= "inactive" if (substr($res[0],7,2) eq "10");
- $longtext .= "ABORT" if (substr($res[0],8,1) eq "1");
-
- $longtext .= "<br>";
- $longtext .= "Beam Abort Latch: ";
- $longtext .= "none" if (substr($res[3],3,1) ne "1");
- $longtext .= "ABORTED" if (substr($res[3],3,1) eq "1");
-
- $value = "inactive" if $longtext =~ /inactive/;
- $value = "ABORT" if $longtext =~ /ABORT/;
- $value = "ABORTED" if $longtext =~ /ABORTED/;
- $qastate = QA::WARN if $longtext =~ /inactive/;
- $qastate = QA::FATAL if $longtext =~ /ABORT/;
- $qastate = QA::ERROR if $longtext =~ /ABORTED/;
+ $qastate = QA::OK;
+ $longtext = "";
+ $value = "";
+ $longtext .= "Inputs: <br>";
+ $longtext .= "FPGA: ";
+ $longtext .= "active" if (substr($res[0],5,2) eq "01" || substr($res[0],5,2) eq "10");
+ $longtext .= "inactive" if (substr($res[0],5,2) eq "11");
+ $longtext .= "ABORT" if (substr($res[0],5,2) eq "00");
+
+ $longtext .= "<br>";
+ $longtext .= "Soft Override: ";
+ $longtext .= "none" if (substr($res[2],7,2) eq "00");
+ $longtext .= "inactive" if (substr($res[2],7,2) eq "10");
+ $longtext .= "ABORT" if (substr($res[2],8,1) eq "1");
+
+ $longtext .= "<br>";
+ $longtext .= "Hard Override: ";
+ $longtext .= "none" if (substr($res[0],7,2) eq "00");
+ $longtext .= "inactive" if (substr($res[0],7,2) eq "10");
+ $longtext .= "ABORT" if (substr($res[0],8,1) eq "1");
+
+ $longtext .= "<br>";
+ $longtext .= "Beam Abort Latch: ";
+ $longtext .= "none" if (substr($res[3],3,1) ne "1");
+ $longtext .= "ABORTED" if (substr($res[3],3,1) eq "1");
+
+ $value = "inactive" if $longtext =~ /inactive/;
+ $value = "ABORT" if $longtext =~ /ABORT/;
+ $value = "ABORTED" if $longtext =~ /ABORTED/;
+ $qastate = QA::WARN if $longtext =~ /inactive/;
+ $qastate = QA::WARN_2 if $longtext =~ /Soft\sOverride:\sinactive/;
+ $qastate = QA::FATAL if $longtext =~ /ABORT/;
+ $qastate = QA::ERROR if $longtext =~ /ABORTED/;
+
+
+ # EPICS part
+# if( substr($res[0],5,2) ne substr($oldres[0],5,2)
+# || substr($res[2],7,2) ne substr($oldres[2],7,2)
+# || substr($res[0],7,2) ne substr($oldres[0],7,2)
+# || substr($res[3],3,1) ne substr($oldres[3],3,1)
+# ) {
+ # print substr($res[0],5,2)." ".substr($res[2],7,2)." ".substr($res[0],7,2)." ".substr($res[3],3,1);
+ Perl2Epics::Put("fpga",0) if substr($res[0],5,2) eq "11";
+ Perl2Epics::Put("fpga",1) if substr($res[0],5,2) eq "01" || substr($res[0],5,2) eq "10";
+ Perl2Epics::Put("fpga",2) if substr($res[0],5,2) eq "00";
+
+ Perl2Epics::Put("soft",0) if substr($res[2],7,2) eq "10";
+ Perl2Epics::Put("soft",1) if substr($res[2],7,2) eq "00";
+ Perl2Epics::Put("soft",2) if substr($res[2],8,1) eq "1";
+
+ Perl2Epics::Put("hard",0) if substr($res[0],7,2) eq "10";
+ Perl2Epics::Put("hard",1) if substr($res[0],7,2) eq "00";
+ Perl2Epics::Put("hard",2) if substr($res[0],8,1) eq "1";
+
+ Perl2Epics::Put("latch",1) if substr($res[3],3,1) ne "1";
+ Perl2Epics::Put("latch",2) if substr($res[3],3,1) eq "1";
+ Perl2Epics::Update(0.2);
+# }
+ }
+
+ if($iterator == 1) {
+ my $curr_it = Perl2Epics::Get("iterator");
+ Perl2Epics::Put("iterator",$curr_it+1);
+ $iterator = 0;
}
QA::WriteQALog($fqa,"main","beamabort",30,$qastate,'Beam Abort',$value,$longtext);
if($qastate >= QA::ERROR && $laststate == QA::OK) {
system("ssh hadaq\@hadesp33 'cd /home/hadaq/trbsoft/daq/hmon; PERL5LIB=. perl ./permanent/hmon_archiver.pl once'");
- }
+ Hmon::Speak('beamabort',"Beam abort. Beam abort.");
+ }
$laststate = $qastate;
+ @oldres = @res;
+ ++$iterator;
sleep 5;
- }
+}
# irq: servicing interrupts
# softirq: servicing softirqs
-#my @srv = qw(lxhadeb01 lxhadeb02 lxhadeb03 lxhadeb04 lxhadeb05 lxhadeb06 lxhadesdaq hadesdaq01 hadesdaq02 hades30 hades31 hades33); #dcs02-07
-# my @srv = qw( lxhadeb08 lxhadeb09 lxhadeb10 lxhadeb11 lxhadeb12 lxhadesdaq lxhadeb06 lxhadeb07 lxhadeb13 hadesdaq03 hadesdaq04 hades30 hadesp50 hadesp31 depcp418 hades33 lxhaddcs03
-# lxhaddcs05 lxhaddcs06 lxhaddcs10 lxhaddcs11);
# JAM 6.1.2020 - for the moment exlude hosts depcp418 and lxhaddcs03 not available
-my @srv = qw( lxhadeb08 lxhadeb09 lxhadeb10 lxhadeb11 lxhadeb12 lxhadeb14 lxhadeb15 lxhadeb16 lxhadesdaq lxhadeb07 lxhadeb13 hadesdaq03 hadesdaq04 hades30 hadesp57 hadesp31 hades33 hades63 hades66 hadesp70 lxhaddcs05 lxhaddcs06 lxhaddcs10 lxhaddcs11);
+# MT 2022.02.09 - all to internal HADES-VLAN CPU-names
+my @srv = qw( lxhadeb08p lxhadeb09p lxhadeb10p lxhadeb11p lxhadeb12p lxhadeb14p lxhadeb15p lxhadeb16p lxhadesdaqp lxhadeb07p lxhadeb13p hadesdaqp03 hadesdaqp04 hadesp30 hadesp57 hadesp31 hadesp33 hadesp63 hadesp66 hadesp70 lxhaddcs05p lxhaddcs06p lxhaddcs10p lxhaddcs11p lxhaddcs12p lxhaddcs13p);
my $template .= "\n<table class=\"colorfields cpu\">\n<tr><th>";
for(my $d=1;$d<=32;$d++) {
my $maxstr = "";
my $busystr = "";
if (defined $laststore->{0}->{0}->{'idle'}) {
- $str = Hmon::MakeTitle(9,13,"Server CPU Usage");
+ $str = Hmon::MakeTitle(9,16,"Server CPU Usage");
$str .= $template;
for(my $s = 0; $s < scalar @srv; $s++) {
$str .= "\n<tr><th class=\"title\">$srv[$s]";
# with this switch disable qalog and enable printout only JAM
my $opt_debug = 0;
my $error_counter = 0;
+# JAM 15-feb-2022 - try to reduce flicker of red errors for temporary missing datarates:
+my $input_err_counter = 0;
+my $builder_err_counter = 0;
my $persistent_error_state;
my $speak_counter =0;
# here check mismatch between running bnet nodes and active ones:
if ($num_bnetin>$num_act_ins) {
- $qastate = QA::ERROR;
+ $input_err_counter++;
+ if($input_err_counter> 20){
+ # only give error after 20 retries, about 2 spills for feb22...
+ $qastate = QA::ERROR;
+ }
$qamsg .= "Only $num_act_ins nodes of $num_bnetin BNET inputs receive data! ";
} else {
+ $input_err_counter=0;
$qamsg .= "Input nodes: $num_bnetin. ";
}
if ($num_bnetbuild>$num_act_build) {
- $qastate = QA::ERROR;
+ $builder_err_counter++;
+ if($builder_err_counter> 20){
+ $qastate = QA::ERROR;
+ }
$qamsg .= "Only $num_act_build nodes of $num_bnetbuild BNET builders are building events! ";
} else {
+ $builder_err_counter=0;
$qamsg .= "Builder nodes: $num_bnetbuild. ";
}
# if (defined $masterstate)
while(1) {
- my $out = Hmon::MakeTitle(4,11,"Last *.hld files");
- $out .= "<pre style='text-align:left;font-size:12px;'> ";
+ my $out = Hmon::MakeTitle(4,8,"Last *.hld files");
+ $out .= "<pre style='text-align:left;font-size:10px;'> ";
foreach my $i (8,9,14,15,16) {
my $server = sprintf("lxhadeb%02i",$i);
$out .= "<b>$server</b>\n";
$out .= $s;
}
}
- $out .= "<br>All files are available in <br> /store/NN/01/data/<br>on hades63";
+ $out .= "<br>All files /store/NN/01/data/";
$out .= "</pre>";
$out .= Hmon::MakeFooter();
Hmon::WriteFile("hldlast",$out);
my $flog = QA::OpenQAFile();
+Perl2Epics::Connect("voltage", "HAD:iTOF:HV:vmon");
+Perl2Epics::Connect("current", "HAD:iTOF:HV:imon");
+
while(1) {
my @vals = split('&',$ret[0]);
+
+ if(!defined $vals[1] || !defined $vals[2] || $vals[1] eq '' || $vals[2] eq '' || $vals[1] eq 'NaN' || $vals[2] eq 'NaN') {sleep 5; next;}
my $value = QA::SciNotation( $vals[1])."V / ".QA::SciNotation( $vals[2])."A";
$value = "HV is OFF" if $vals[1] < 20 || $QA::ItofHvOff == 1;
my $qastate = QA::OK;
- $qastate = QA::ERROR if $vals[1] < 20;
- $qastate = QA::NOTE if $QA::ItofHvOff == 1;
+ $qastate = QA::WARN_2 if $vals[2] >= 0.015;
+ $qastate = QA::ERROR if $vals[1] <= 29.5;
+ $qastate = QA::ERROR if $vals[1] >= 30.5;
+ $qastate = QA::NOTE if $QA::ItofHvOff == 1;
QA::WriteQALog($flog,"hv2","itofhv",30,$qastate,"iTOF HV",$value,"");
- sleep(10);
+ Perl2Epics::Put("voltage",$vals[1]);# if (defined $vals[1] && $vals[1]>=0 && $vals[1] ne 'NaN');
+ Perl2Epics::Put("current",$vals[2]) if (defined $vals[2] && $vals[2]>=0 && $vals[2] ne 'NaN') ;
+ Perl2Epics::Update(0.2);
+ sleep(5);
}
next if ($a =~ /ALL CONNECTIONS FINISHED/);
}
+ next if ($a =~ /data missing:/);
# next if ($a =~ /30 boards complain: Event not found: 3000/);
# next if ($a =~ /30 boards complain: frontend not configured: 3000/);
# next if ($a =~ /30 boards complain: error: 3000/);
use warnings;
use v5.10.0;
-my @cpus = qw |lxhadeb07 lxhadeb08 lxhadeb09 lxhadeb10 lxhadeb11 lxhadeb12 lxhadeb13 lxhadeb14 lxhadeb15 lxhadeb16 lxhaddcs05 lxhaddcs06 lxhaddcs11 lxhadesdaq hadesdaq01 hades30 hadesp31 hades33 lxhadeb07p lxhadeb08p lxhadeb09p lxhadeb10p lxhadeb11p lxhadeb12p lxhadeb13p lxhadeb14p lxhadeb15p lxhadeb16p lxhaddcs05p lxhaddcs06p lxhaddcs11p lxhadesdaqp hadesdaqp02 hadesdaqp03 hadesdaqp04 hadesp30 hadesp33 hadesp57 hadesp70|;
+
+my @cpus = qw |
+hades30 hades33 hadesdaq01 hadesdaqp02 hadesdaqp03 hadesdaqp04 hadesp30 hadesp31 hadesp33 hadesp57 hadesp63 hadesp66 hadesp70 lxhaddcs05p lxhaddcs06p lxhaddcs10p lxhaddcs11p lxhaddcs12p lxhaddcs13p lxhadeb07p lxhadeb08p lxhadeb09p lxhadeb10p lxhadeb11p lxhadeb12p lxhadeb13p lxhadeb14p lxhadeb15p lxhadeb16p lxhadesdaqp
+|;
+
+#lxhadeb07 lxhadeb08 lxhadeb09 lxhadeb10 lxhadeb11 lxhadeb12 lxhadeb13 lxhadeb14 lxhadeb15 lxhadeb16 lxhaddcs05 lxhaddcs06 lxhaddcs11 lxhadesdaq hadesdaq01 hades30 ha#desp31 hades33 lxhadeb07p lxhadeb08p lxhadeb09p lxhadeb10p lxhadeb11p lxhadeb12p lxhadeb13p lxhadeb14p lxhadeb15p lxhadeb16p lxhaddcs05p lxhaddcs06p lxhaddcs11p lxhad#esdaqp hadesdaqp02 hadesdaqp03 hadesdaqp04 hadesp30 hadesp33 hadesp57 hadesp70
for my $cpu (@cpus) {
- my $c = "~/trbsoft/hadesdaq/hmon/hmon_ssh hadaq\@$cpu -N -f </dev/null >/dev/null&";
- print "command: $c\n";
- system($c);
+ my $c = "~/trbsoft/hadesdaq/hmon/hmon_ssh hadaq\@$cpu -N -f </dev/null >/dev/null&";
+ #my $c = "~/trbsoft/hadesdaq/hmon/hmon_ssh hadaq\@$cpu -N -f";
+ print "command: $c\n";
+ system($c);
}
entries => 1200,
type => HPlot::TYPE_HISTORY,
output => HPlot::OUT_PNG,
- titles => ["Isobutan Scale0","Isobutan Scale1"],
+ titles => ["Isobutan Scale1","Isobutan Scale2"],
xlabel => "Hour",
ylabel => "bottle weight [kg]",
sizex => 400,
Perl2Epics::Connect("IsoO2Concentr","HAD:RICH:GAS:concentration:O2:average");
Perl2Epics::Connect("IsoRefRatio","HAD:RICH:GAS:reflowRatioIsob:average");
-Perl2Epics::Connect("IsoScale0","HAD:scale:1:net");
-Perl2Epics::Connect("IsoScale1","HAD:scale:2:net");
+Perl2Epics::Connect("IsoScale1","HAD:scale:1:net");
+Perl2Epics::Connect("IsoScale2","HAD:scale:2:net");
print "Connected.\n";
my $IsobRefR = $data->{"IsoRefRatio"}->{val};
my $IsobRefRStr = sprintf("Isobutan reflow ratio: %.1f %",$IsobRefR);
- my $IsobScale0 = $data->{"IsoScale0"}->{val};
my $IsobScale1 = $data->{"IsoScale1"}->{val};
+ my $IsobScale2 = $data->{"IsoScale2"}->{val};
$str = Hmon::MakeTitle(6, 16, "RICH Isobutan", 1, "");
if( $timer % 4 == 0) {
$value = sprintf("%.1f|%.0f|%.0f",$IsobPress,$IsobO2,$IsobRefR);
- $longtext = sprintf("isobutan pressure : %.2f bar | O2 concentration: %.1f ppm <br>|Isobutanoutput ratio: %.2f | Scales: %.1fkg / %.1fkg",$IsobPress,$IsobO2,$IsobRefR,$IsobScale0,$IsobScale1);
+ $longtext = sprintf("isobutan pressure : %.2f bar | O2 concentration: %.1f ppm <br>|Isobutanoutput ratio: %.2f | Scales: %.1fkg / %.1fkg",$IsobPress,$IsobO2,$IsobRefR,$IsobScale1,$IsobScale2);
QA::WriteQALog($flog,"rich","isob",30,$qastate,"Gas".($QA::RichGasOff?" OFF":""),$value,$longtext);
}
}
- if ( $timer % 240 == 0) {
- HPlot::PlotAdd('RichIsobScale',$IsobScale0,0);
- HPlot::PlotAdd('RichIsobScale',$IsobScale1,1);
+ if ( $timer % 180 == 0) {
+ HPlot::PlotAdd('RichIsobScale',$IsobScale1,0);
+ HPlot::PlotAdd('RichIsobScale',$IsobScale2,1);
HPlot::PlotDraw('RichIsobScale');
}
trb_init_ports() or die trb_strerror();
-trb_register_write(0xffff,0xb805,200000); #50000 = 1s offset to spill start
my $round = 0;
while(1) {
$o = trb_register_read(0xf3c0,0xb806);
if($o->{0xf3c0} == 3) {
$o = trb_register_read_mem(0xf3c0,0xb811,1,6000) or print trb_strerror() or sleep 5 and next;
+
+ trb_register_write(0xffff,0xb805,200000); #50000 = 1s offset to spill start
+ trb_register_write(0xffff,0xb804,0x00003559); #Only 5000/5001 as source
foreach my $b (keys %$o) {
#pkill -f "sshfs -o allow_other hadaq@hadesp66:/home/hades-qa/online/5.34.38/pics"
fusermount -u qa
-sshfs -o allow_other hadaq@hadesp66:/home/hades-qa/online/5.34.38/pics `pwd`/qa
+timeout 2 bash -c "sshfs -o allow_other hadaq@hadesp66:/home/hades-qa/online/5.34.38/pics `pwd`/qa"
fusermount -u vertex
-sshfs -o allow_other hadaq@hadesp66:/home/hades-qa/online/5.34.38/feb22/vertex/pics `pwd`/vertex
+timeout 2 bash -c "sshfs -o allow_other hadaq@hadesp66:/home/hades-qa/online/5.34.38/feb22/vertex/pics `pwd`/vertex"
#pkill -f "sshfs -o allow_other hadaq@hadesp63:/home/hadaq/local/tdcmon/dabc/cal"
fusermount -u calibration
-sshfs -o allow_other hadaq@hadesp63:/home/hadaq/local/tdcmon/dabc/cal `pwd`/calibration
+timeout 2 bash -c "sshfs -o allow_other hadaq@hadesp63:/home/hadaq/local/tdcmon/dabc/cal `pwd`/calibration"
echo " <Hmon> Linking files to server..."
body>div>div {
float:left;
- margin: 0px 3px 0px 0;
+ margin: 0px 2px 0px 0;
padding: 0 0 10px 0 ;
border: 1px solid #777;
border-width:0 1px 1px 1px;